Jump to content

PHP files stopped executing


Recommended Posts

Hello

 

I have Apache/PHP/MySQL installed. I am developing an application. Everything was going well, save my bugs. Then, for no apparent reason, PHP files stopped executing. When accessing the following script:

 

<?php

  phpinfo();

?>

 

I just get the exact same output to the browser. When I access a longer script, it outputs _PART_ of the source code, starting around 5 lines into the file (yeah, really).

 

I tried reinstalling Apache and PHP (deleting the config files for both) and it did absolutely nothing. I didn't have to modify the config files initially when everything worked fine.

 

Any ideas?

Link to comment
Share on other sites

There one two problems I can think of,

1. Apache is not configured correctly for handling .php files. How did you install Apache and PHP, and how is Apache configured?

 

2. Your scripts use short tags (<? ?>, or <?= ?>). PHP disables short tags by default when installed. You can enable short tags via the php.ini by enabling a setting called short_open_tag. If your script uses short tags and they are disabled then you can get irregular results like this. It is recommended that you do not use short tags.

Link to comment
Share on other sites

I forgot to mention that this is on XP SP2 32-bit.

 

1. When I installed PHP with the installer, I browsed to the Apache conf directory. I then checked, and the conf was modified as I presume it should have been, since initially _it was working_ and the config file

was not modified. It then stopped working.

 

2. I don't use short tags.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.