Page 1 of 1

php files not parsing.

PostPosted: 15. September 2015 17:33
by Mobiius
Hello, apologies if I'm posting in the wrong section, I'm new to the forums and the search is telling me I cant use it it this time. Also I'm posting in this board rather than the php board as I'm using a new fresh installation of XAMPP which is what I'm having issues with, rather than a php issue.

Ok, I've installed XAMPP, which works fine. I can navigate to http://localhost/file.htm and the file will load correctly. (I know about using a webserver to access files rather than just double clicking on the .htm file)

I've created a file called phpinfo.php which is below.
Code: Select all
      <title>PHP test</title>
      Php info??
      <?php phpinfo(); ?>

it loads fine in so much that I get a blank screen with Php info?? displayed. None of the phpinfo text appears.
If I check the source code, the file appears exactly as it exists on my hard drive. (It shows the <?php..... code which obviously shouldn't be there.)

After searching the internet and this forum for a few hours I can find no information which helps me resolve this issue. (It all seems to be things like, is the file called ???.php, are you running it through the webserver? Have you restarted the service? have you reinstalled the servers? which I've tried before going online)

Does anyone have any ideas of what I can try?

Re: php files not parsing.

PostPosted: 16. September 2015 09:23
by Mobiius
Never mind, it's working now. No changes were made, it just started working today. :)

Re: php files not parsing.

PostPosted: 16. September 2015 10:09
by Mobiius
Actually, I'm having the same issue with another php file. The original php file is working fine, but if I create a new file, or even copy the known working file and rename it, then php stops working again. HTML is parsed correctly, but the php is not.

Tell me I don't need to restart my machine every time I create a new php file??

I've restarted my machine again, and still have this issue. original php file works fine, any new ones do not.

Re: php files not parsing.

PostPosted: 16. September 2015 11:36
by Mobiius
If anyone's paying attention, I've fixed it again.

This time, I clicked a link to the none-working page from the working page, now all pages are working, even new ones.

I have no idea why it's doing this, but at least it's working again. (for now)