Fishcakes Posted July 1, 2021 Share Posted July 1, 2021 See below my website is showing like this I think debian upgraded from php 7.3 or 4 to 8.0 I am wondering if I am missing some php packages if run php -v at terminal I get php -v PHP 8.0.7 (cli) (built: Jun 4 2021 23:17:30) ( NTS ) Copyright (c) The PHP Group Zend Engine v4.0.7, Copyright (c) Zend Technologies with Zend OPcache v8.0.7, Copyright (c), by Zend Technologies and if I run php -m at terminal i get php -m [PHP Modules] calendar Core ctype date dom exif FFI fileinfo filter ftp gd gettext hash iconv json libxml mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix readline Reflection session shmop SimpleXML sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter xsl Zend OPcache zlib [Zend Modules] Zend OPcache Quote Link to comment https://forums.phpfreaks.com/topic/313017-after-a-debian-upgrade-my-php-doesnt-seem-to-work-s/ Share on other sites More sharing options...
gw1500se Posted July 1, 2021 Share Posted July 1, 2021 Post the actual code and the actual error message. Be sure to use the code icon (<>) in the top menu and specify PHP. Quote Link to comment https://forums.phpfreaks.com/topic/313017-after-a-debian-upgrade-my-php-doesnt-seem-to-work-s/#findComment-1587710 Share on other sites More sharing options...
Fishcakes Posted July 1, 2021 Author Share Posted July 1, 2021 This is the code of my indexx file I don't think it's a problem with my code though as even my previous backups of my website aren't working. And I also tried creating a phpinfo file with only phpinfo(); inside it and that isn't showing the php info screen So I think it's more a problem with my PHP install on debian and maybe I'm missing some php modules on debian for php 8.0 or something <?php include('classHeader.php'); include 'dbconnect.php'; session_start(); //Outputs header located in classHeader.php $HeaderFromClass = new HeaderClass(); echo $HeaderFromClass->get_Header(); //Second part changes depending on whether a user is logged in echo $HeaderFromClass->get_Header2ndPart(); ?> <body> <div class ='grid-container'> <?php //Get the Threads and output them onto the screen in a grid container $query = mysqli_query($conn, "select Threads.id as ThreadId, Title, Users, filename,url, LEFT(ThreadBody, 8000) as body, date_format(Thread_date, '%D %b %Y %l:%i %p') as ftime , count(Posts.IdOfThread) as num_posts from Threads Left join Posts on Threads.id = Posts.IdOfThread group by Threads.id order by Thread_date desc;") or die (mysqli_error($conn)); while ($row = mysqli_fetch_array($query)) { $videoURL = 'upload/' . rawurlencode($row["filename"]); $imageURL = 'upload/Thumbnails/'.rawurlencode($row["filename"]); $PostBody = nl2br($row['body']); echo " <div class ='grid-item'> <div class='ThreadComment'> <a href='viewthread.php?id={$row['ThreadId']}'> Comments:{$row['num_posts']} </a><br> </div> <div class='ThreadNumber'> <a href='viewthread.php?id={$row['ThreadId']}'> Post {$row['ThreadId']}</a><br> </div> <div class='indexpageUser'><a href='profile.php?id={$row['Users']}'> {$row['Users']} </a></div> <h2><a href='viewthread.php?id={$row['ThreadId']}'> {$row['Title']} </a></h2> <a href='{$row['url']}'> {$row['url']}</a> <div class='mainpageUpvoteCount'> {$row['upvotes']} </div>" ; //If user is logged in display upvote arrows. if(isset($_SESSION['username'])){ echo " <div class='mainpageupvote' id='upvote'><form action='upvotes.php' method='post' enctype='multipart/form-data' ><button name='ThreadID' value={$row['ThreadId']}> ⬆ </button></form></div> <div class='mainpagedownvote'><button onclick='downvote()' value={$row['ThreadId']} > ⬇</button></div> "; } echo "<div class ='img-block'>" ; //If file is a PDF display standard PDF icon else select the filename from the uploads folder if(strpos($imageURL, "pdf") !== false){ echo "<a href='viewthread.php?id={$row['ThreadId']}'><img src='Icons/PDF.jpg' alt='' /> </a> " ; } if(strpos($videoURL, "mp4") !== false){ $videocode = "<embed src=$videoURL autostart='false' height='200' width='200'/></embed>" ; echo $videocode ; } if(strpos($videoURL, "webm") !== false){ $videocode = "<embed src=$videoURL autostart='false' height='200' width='200'/></embed>" ; echo $videocode ; } else { echo "<a href='viewthread.php?id={$row['ThreadId']}'><img src={$row['$imageURL']}$imageURL alt='' /> </a>"; } echo " </div> <p>$PostBody </p> </div> \n"; } /* " <div class ='grid-item'> <div class='ThreadComment'> <a href='viewthread.php?id={$row['ThreadId']}'> Comments:{$row['num_posts']} </a><br> </div> <div class='ThreadNumber'> <a href='viewthread.php?id={$row['ThreadId']}'> Post {$row['ThreadId']}</a><br> </div> <div class='indexpageUser'>{$row['Users']} </div> <h2><a href='viewthread.php?id={$row['ThreadId']}'> {$row['Title']} </a></h2> <div class='mainpageUpvoteCount'> {$row['upvotes']} </div> <div class='mainpageupvote' id='upvote'><button onclick='upvote()' class='upvotes' value={$row['ThreadId']}> ⬆ </button></div> <div class='mainpagedownvote'><button onclick='downvote()' class='upvotes' value={$row['ThreadId']} > ⬇</button></div> <div class ='img-block'>" ; //If file is a PDF display standard PDF icon else select the filename from the uploads folder if(strpos($imageURL, "pdf") !== false){ echo "<a href='viewthread.php?id={$row['ThreadId']}'><img src='Icons/PDF.jpg' alt='' /> </a> " ; } else { echo "<a href='viewthread.php?id={$row['ThreadId']}'><img src={$row['$imageURL']}$imageURL alt='' /> </a>"; } echo " </div> <p>$PostBody </p> </div> \n"; */ ?> </body> </html> <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> <script> $('#grid-container').click(function(){ $('#grid-item').animate({height:'600px'}, 500); $('#grid-item').animate({width:'600px'}, 500); }); function upvote(){ $.ajax({ type: "POST", url: "upvotes.php", data: {$row['ThreadId']}, success:function( msg ) { alert( "Data Saved: " + msg ); } }); } </script> <script> function downvote(){ $.ajax({ type: "POST", url: "upvotes.php", data: name: $("select[name='players']").val()}, success:function( msg ) { alert( "Data Saved: " + msg ); } }); } </script> Quote Link to comment https://forums.phpfreaks.com/topic/313017-after-a-debian-upgrade-my-php-doesnt-seem-to-work-s/#findComment-1587711 Share on other sites More sharing options...
kicken Posted July 1, 2021 Share Posted July 1, 2021 Your missing the configuration that integrates PHP with your web server. This may be provided by a different package that you need to install or you might have to update the configuration by hand. Search how to install php on whatever webserver you're using on debian and you can probably find instructions. Quote Link to comment https://forums.phpfreaks.com/topic/313017-after-a-debian-upgrade-my-php-doesnt-seem-to-work-s/#findComment-1587712 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.