IvanAndreevich Posted October 4, 2008 Share Posted October 4, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/126989-php-files-stopped-executing/ Share on other sites More sharing options...
wildteen88 Posted October 4, 2008 Share Posted October 4, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/126989-php-files-stopped-executing/#findComment-656943 Share on other sites More sharing options...
IvanAndreevich Posted October 4, 2008 Author Share Posted October 4, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/126989-php-files-stopped-executing/#findComment-657097 Share on other sites More sharing options...
IvanAndreevich Posted October 5, 2008 Author Share Posted October 5, 2008 Anybody? If you need any extra details, or you want me to post my apache config file, just ask. It's halting my development! Quote Link to comment https://forums.phpfreaks.com/topic/126989-php-files-stopped-executing/#findComment-657406 Share on other sites More sharing options...
wildteen88 Posted October 5, 2008 Share Posted October 5, 2008 Can you post a screenshot of the problems you're having and attach Apaches configuration too. Quote Link to comment https://forums.phpfreaks.com/topic/126989-php-files-stopped-executing/#findComment-657445 Share on other sites More sharing options...
IvanAndreevich Posted October 6, 2008 Author Share Posted October 6, 2008 Ho ho I am an idiot The problem was trivial. For some reason, I began accessing the PHP file I was working on through the full path - i.e. c:\dir\test.php instead of localhost:8080\test.php No wonder Apache wasn't executing the script Quote Link to comment https://forums.phpfreaks.com/topic/126989-php-files-stopped-executing/#findComment-658164 Share on other sites More sharing options...
wildteen88 Posted October 6, 2008 Share Posted October 6, 2008 Yes, always make sure you go to http://localhost whenever you're executing your PHP scripts Quote Link to comment https://forums.phpfreaks.com/topic/126989-php-files-stopped-executing/#findComment-658195 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.