rondog Posted July 28, 2007 Share Posted July 28, 2007 Hi, I have php 5.2.3 installed on a win2k machine with IIS. It is working because I can see phpinfo(); My problem is there is no php.ini file in c:\WINNT which is what phpinfo says for my configuration path. There is a php.ini folder in c:\php where I installed it. I tried copying php.ini into that folder and then it just displays <? phpinfo(); ?> Where is phpinfo reading this stuff from?? I cant find the file to edit it. http://movfactory.com/phpinfo.php Thanks for any help. -Ronnie Quote Link to comment https://forums.phpfreaks.com/topic/62120-phpini-not-in-cwinnt/ Share on other sites More sharing options...
tibberous Posted July 28, 2007 Share Posted July 28, 2007 You don't have to have a php.ini file. I'm not sure of winnt but with XP you have to start by moving the php.ini to the %systemroot%. Worst case, just run a file search for PHP.ini. Quote Link to comment https://forums.phpfreaks.com/topic/62120-phpini-not-in-cwinnt/#findComment-309281 Share on other sites More sharing options...
rondog Posted July 28, 2007 Author Share Posted July 28, 2007 what do you mean you dont have to have one? php.ini contains all the php settings..and I tried moving php.ini into c:\winnt and when I load up phpinfo it displays <? phpinfo(); ?> and doesnt work I did the search..all it found was php.ini inside c:\php Quote Link to comment https://forums.phpfreaks.com/topic/62120-phpini-not-in-cwinnt/#findComment-309337 Share on other sites More sharing options...
wildteen88 Posted July 28, 2007 Share Posted July 28, 2007 IF the configuration path line is set to C:/WINNT then it is not reading any php.ini configuration file. Only when it is set a full path and has php.ini added onto the end of it, eg: C:/WINNT/php.ini then PHP is reading that php.ini file. I would recommend you to add the php folder to the Windows PATH. PHP should then be able to read the php.ini inside C:\php. For adding the php to the path please This PHP FAQ. Also you should use the full PHP tags syntax (<?php ?>) and not shorthand PHP syntax (<? ?> or <?= ?>)as by default PHP has short tags disabled. Also coding in full PHP tags syntax allows for your code to be more portable. Quote Link to comment https://forums.phpfreaks.com/topic/62120-phpini-not-in-cwinnt/#findComment-309520 Share on other sites More sharing options...
Daniel0 Posted July 28, 2007 Share Posted July 28, 2007 Also you should use the full PHP tags syntax (<?php ?>) and not shorthand PHP syntax (<? ?> or <?= ?>)as by default PHP has short tags disabled. Also coding in full PHP tags syntax allows for your code to be more portable. And it triggers syntax highlighting within the -tags on this forum... Quote Link to comment https://forums.phpfreaks.com/topic/62120-phpini-not-in-cwinnt/#findComment-309527 Share on other sites More sharing options...
rondog Posted July 30, 2007 Author Share Posted July 30, 2007 IF the configuration path line is set to C:/WINNT then it is not reading any php.ini configuration file. Only when it is set a full path and has php.ini added onto the end of it, eg: C:/WINNT/php.ini then PHP is reading that php.ini file. I would recommend you to add the php folder to the Windows PATH. PHP should then be able to read the php.ini inside C:\php. For adding the php to the path please This PHP FAQ. Also you should use the full PHP tags syntax (<?php ?>) and not shorthand PHP syntax (<? ?> or <?= ?>)as by default PHP has short tags disabled. Also coding in full PHP tags syntax allows for your code to be more portable. I was going to add php to the windows path and add ;C:/php, but it was already there and in the very front. So any more suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/62120-phpini-not-in-cwinnt/#findComment-311016 Share on other sites More sharing options...
wildteen88 Posted July 30, 2007 Share Posted July 30, 2007 Have you restarted IIS?. Also make sure you have restarted Windows too when you added PHP to the path. I am not experienced with IIS. Quote Link to comment https://forums.phpfreaks.com/topic/62120-phpini-not-in-cwinnt/#findComment-311025 Share on other sites More sharing options...
rondog Posted July 30, 2007 Author Share Posted July 30, 2007 funny. doing <?php rather than <? made it display correctly. I have done <? many times on a dif server and it worked, so is that a setting in the ini file for short tagging or something? Quote Link to comment https://forums.phpfreaks.com/topic/62120-phpini-not-in-cwinnt/#findComment-311363 Share on other sites More sharing options...
Daniel0 Posted July 30, 2007 Share Posted July 30, 2007 short_open_tag Quote Link to comment https://forums.phpfreaks.com/topic/62120-phpini-not-in-cwinnt/#findComment-311472 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.