Reputation: 27
After upgrading my OS I can't access the main page of my personel little local website anymore.
Last month I upgraded my Debian Squeeze to Jessie. Before upgrading I had copied all php files, image folders and the mysql database to an external hard disk. After the upgrade I put everything back. At first the problem was that I didn't have permission to access the main page even though I own every file and folder that's connected to this site. A little chmod a+rx seemingly fixed this but when I go to the main page, all I get is a blank screen. I checked the website's folder and found that a number of files have a second version ending in .php~. I never noticed this before and I'm sure I didn't create those files myself. (Actually I found a reference in an old thread somewhere to some editors creating automatic backups with this extension. Guess that's what happened here.) These extra files only show up in a terminal, not in a file manager.
So there is a file named hoofdmenu.php (main page) and one named hoofdmenu.php~. Hoofdmenu.php is my starting page and it only shows a blank screen. In Firebug all you see is:
<html>
<head></head>
<body></body>
</html>
However, if I go to hoofdmenu.php~ I get my webpage (minus a function I defined but that's a minor problem). I can also navigate from the main page to other pages and between other pages. Only when I go back to the main page (every page has a return home button) I get the same old blank screen.
The only difference between both files is the indentation of a few blocks of code. Given that hoofdmenu.php~ works I tried copying this file to hoofdmenu.php but then again I get the empty screen. Can anyone tell me what I'm missing here?
Thanks in advance.
Upvotes: 0
Views: 230
Reputation: 27
Checking /var/log/apache2/error.log pointed to an unexpected end of file. I don't consciously use short tags but I went looking for them just to be sure and found a stray semicolon:
<?php;
Removing said semicolon solved the entire problem including the unresponsive function. Apparently some previous version of something didn't mind (last alteration of the file was February 19 so it worked at least six weeks with the semicolon in place). Everything is now running again as it's supposed to.
Upvotes: 1