Jump to content

Recommended Posts

Posted

Hi there,

 

I've been trying to make LDAP work with PHP on our Windows Server 2003 web server - to do so I was instructed (by online instructions) to make a tiny change in the PHP.ini file, which I did. I was then advised to reboot the server, which I also did....here the problem arises:

 

Since rebooting the server, no PHP pages are loading. I can access HTML pages alright, but if there is any heavy use of PHP, it throws a HTTP 500 error. I say HEAVY use of PHP because a simple test.php file (saved to the same folder as the other pages which will not load) will work just fine - thought it only contains the <?php phpnifo() ?> command and a simple 'echo HELLO WORLD'.

 

So I undid the change I made to the PHP.ini and re-reboot the server, but still no luck. I even rolled back the system to a couple of days before I started playing around (using our BackupExec software)...BackupExec wanted me to reboot the server in order for the restore to take effect, so I did....but still no PHP!

 

The common theme here seems to be rebooting the server - is there something which needs to be kicked off upon rebooting? I've checked the running services and everythink seems hunky dorey. Apache Tomcat is running automatically (which it MUST be because my simple PHP test page worked okay)....just nothing useful!!

 

Does anybody have any suggestions?

 

Pretty please?

Posted

Does your simple php info page work?

 

I have not had much experience running php on windows but have loads running on Linux...LAMP server

Posted
Thanks for such a quick reply! Yes the simple PHP page works - the phpinfo() command pumps out all the appropriate PHP information, which must mean PHP is up and running. But our main school website (http://www.lytchett.org.uk) is still falling over. I'm trying to look at the log file now, but it's >900MB so it's a tad slow!
Posted (edited)

have you ever used an app called mTail?

 

Its the same as tail in Linux...point it at the log and it will pump the latest entries going to the log, then you can refresh the page and see what is being created in the log

 

here you go if your interested

 

http://ophilipp.free.fr/op_tail.htm

Edited by rodent43
adding link
Posted

Thanks buddy - I've managed to look at the log file now. It is vast. Scrolling down to whereabouts I think it all started going wrong, it seems I'm seeing a lot of "PHP Fatal error: Call to undefined function mysql_connect()" error messages - which is a point because the4 majority of our website is using PHP to talk MySQL. So perhaps the SQL server needs a reboot too?

 

I'm thinking SQL could be involved in this horrid scenario somewhere along the line!

Posted

mysql_connect would indeed be the connection to mysql database...so I would check to see if it running

 

using mTail or looking through logs you can find most point at which php is falling over :)

Posted

Hey, thanks for helping out with this. I do have the php_mysql.dll extension uncommented in the PHP.ini file. Looking through the logs, I'm fairly sure it's mySql that's the issue. If I load phpMyAdmin (our SQL monitoring software) I get the following error message: "phpMyAdmin - Error. Cannot load mysql extension. Please check you PHP configuration".

 

My phpinfo() output does not have a section on mysql. It must have done at some point because up until now I was running all sorts of SQL commands (successfully).

 

No joy as yet I'm afraid! So far I've clocked up 20+ hours in 3 days trying to fix this!

Posted

My phpinfo() output does not have a section on mysql. It must have done at some point because up until now I was running all sorts of SQL commands (successfully).

!

 

Interesting...I would of thought you would find a whole block for mysql...the first part of the block with

 

MySQL Support enabled

 

it sound to me that php is not loading the mysql externsion...phpmyadmin is a great piece of kit for admin of MySQL...but it will fail to connect if your php is not running mysql extension

 

I google windows php install to see how the dll are stored and post back asasp

Posted

Can you check something for me please...

 

in your php.ini is the following uncommented to

 

php_mysqli.dll

 

having a quick look most sites suggest mysql is enabled by default

  • Thanks 1
Posted

Hi, I've been away from work all weekend. Just came in this morning to see you post - I checked the php.ini file and for some reason the php_mysqli.dll extension was repeated twice (once commented, once uncommented) - so I have removed the commented one and made sure that the dll file is uncommented...I am very pleased to say it works!!

 

So thanks so much for your continued assistance with this. One funny thing is that if I put the php.ini file back how it was (i.e. with two instances of php_mysqli.dll, both commented and uncommented) it still works? Very strange...

 

Either way mySql is up and running and I've you to thank sir.

 

...Thanks!

Posted
Tip for the future... make a copy of php.ini to php.[date].bak before you make a change in future, then you can just copy & rename it back again and be back up n' running if your edits go pearshaped. Same goes for any/all conf files to do with Apache / MySQL / PHP.
  • Thanks 1
Posted
Tip for the future... make a copy of php.ini to php.[date].bak before you make a change in future, then you can just copy & rename it back again and be back up n' running if your edits go pearshaped. Same goes for any/all conf files to do with Apache / MySQL / PHP.

 

Agreed...I have read of some zend framework mucking up mysql_connect for some reason but I have not used zend really

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...