Heero Posted April 27, 2007 Share Posted April 27, 2007 Hi, I am really bummed on this one issue with my php.ini file. When I place a php.ini file in the C:/windows directory it causes my apache server to be unable to read php files...however as soon as I remove the php.ini file the apache server can again read php files. I am completely shocked with what is going on...additionally running the code phpinfo() when the php.ini file does not exist in the directory results in it saying that the Configuration File (php.ini) Path is C:\WINDOWS...even though the file doesn't even exist! Can anyone help me here? Quote Link to comment https://forums.phpfreaks.com/topic/48906-the-phpini-file/ Share on other sites More sharing options...
scottybwoy Posted April 27, 2007 Share Posted April 27, 2007 are you on about where it mentions "Configuration File (php.ini) Path" Quote Link to comment https://forums.phpfreaks.com/topic/48906-the-phpini-file/#findComment-239657 Share on other sites More sharing options...
wildteen88 Posted April 27, 2007 Share Posted April 27, 2007 If php can't find the php.ini it will state C:\WINDOWS If php finds the php.ini in C:\WINDOWS it will show C:\WINDOWS\php.ini Quote Link to comment https://forums.phpfreaks.com/topic/48906-the-phpini-file/#findComment-239966 Share on other sites More sharing options...
Heero Posted April 28, 2007 Author Share Posted April 28, 2007 Ok yeah...php can't find the .ini file because it it saying C:\WINDOWS... But as soon as I put my php.ini file in there, it causes apache to not read php pages anymore...am I putting it in the wrong location or something? Quote Link to comment https://forums.phpfreaks.com/topic/48906-the-phpini-file/#findComment-240565 Share on other sites More sharing options...
wildteen88 Posted April 29, 2007 Share Posted April 29, 2007 What settings have you changed in the php.ini? Changing settings in the php.ini should only affect PHP it should "stop" Apache from working. Check Apaches error log for clues. Quote Link to comment https://forums.phpfreaks.com/topic/48906-the-phpini-file/#findComment-241059 Share on other sites More sharing options...
Heero Posted April 30, 2007 Author Share Posted April 30, 2007 I finally figured out what was wrong...really dumb. PHP 5.0.2 has the short tag configuration on the php.ini turned off by default. So in my phpinfo.php file I had the following code: <? phpinfo(); ?> It was not running this code, thus I automatically assumed that the Apache sever was not reading php files. Stupid me. Quote Link to comment https://forums.phpfreaks.com/topic/48906-the-phpini-file/#findComment-241291 Share on other sites More sharing options...
wildteen88 Posted April 30, 2007 Share Posted April 30, 2007 We do recommend that you code with the full style code tags not the short code tags. That way it makes your code more portable over different setups. So rather than doing this <? use <?php or <?=$var?> do <?php echo $var ?> Quote Link to comment https://forums.phpfreaks.com/topic/48906-the-phpini-file/#findComment-241744 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.