pyang Posted September 7, 2007 Share Posted September 7, 2007 Hi there, I'm using PHP5/Apache2/Mysql4.1 in my web-based application. I'm using the following code to verify my PHP configuration (phpInfo.php). <?php phpinfo(); ?> I get a blank page when I have PHPIniDir entry in my httpd.conf file. e.g. PHPIniDir "C:/PHP5/" However, if I comment this entry out and restart Apache2, phpInfo.php shows the right PHP version and other info; but it also shows some weired lines such as, Configuration File (php.ini) C:\WINDOWS Loaded Configuration File (none) As a result, MySQL section is not shown in the info page because the mysql library specified in php.ini fails to be loaded. Please note I don't have php.ini in C:\WINDOWS for now. Then I copy C:/PHP5/php.ini to C:/WINDOWS, and restart Apache2, pageInfo.php shows a blank page again. I'm thinking php.ini actually screws things up. Can anybody kindly help me with this? Thanks, Paul Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 8, 2007 Share Posted September 8, 2007 Looks like php is having a problem while reading the configuration in the php.ini. Go into the php.ini and enable a setting called display_startup_errors, by changing its default value Off to On. Save the php.ini try to startup Apache again. This time you should see error prompts being displayed if PHP is having a problem when loading. Quote Link to comment Share on other sites More sharing options...
pyang Posted September 10, 2007 Author Share Posted September 10, 2007 Hi, Thanks a lot for your reply. I went through the steps as suggested. But 1. when I restarted Apache2 via Start > Control Apache Server > Start, I didn't see any error reported. 2. there's no PHP loading error reported in ...\Apache2\logs or PHP5 install directory. Can you please tell me what I should watch for the debugging messages? Thanks, Paul Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 10, 2007 Share Posted September 10, 2007 Can you attach both your httpd.conf and php.ini here. Quote Link to comment Share on other sites More sharing options...
pyang Posted September 10, 2007 Author Share Posted September 10, 2007 Sure. The Apache error.log is also included. Thanks, Paul [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
pyang Posted September 10, 2007 Author Share Posted September 10, 2007 Hi there, Just more info about my issue. Initially I used PHP5 installer to install a copy of PHP5. Without getting it work successfully, I clean up the PHP5 installation, and used php-5.2.4-Win32.zip to set up PHP5. I'm wondering if the issue is caused by the previous PHP5 installation leftover? Thanks, Paul Quote Link to comment Share on other sites More sharing options...
pyang Posted September 11, 2007 Author Share Posted September 11, 2007 I think short_open_tag = Off screws the php.ini up. With it uncommented, I'm able to see the php info, including mysql section. Buy why short_open_tag = Off matters? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 11, 2007 Share Posted September 11, 2007 that settings shouldn't affect MySQL form loading. short_open_tag allows you to use <? ?> or <?= ?> instead of <?php or <?php echo ?> Oh, forgot to mention your httpd.conf and php.ini configuration is fine. So I don't know what the problem is. I noticed you have a few extensions enabled. Try commenting out all extensions. Then enable each extension one by one until come about the problem you are having. Quote Link to comment Share on other sites More sharing options...
pyang Posted September 12, 2007 Author Share Posted September 12, 2007 I commented "short_open_tag = Off" out; and I am now able to have mysql dll loaded. I now have my application up and running. Thanks for all your help. Quote Link to comment 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.