Forum Moderators: coopster

Message Too Old, No Replies

Cannot get the mysql module to load with php 5.2.4

         

NooK

5:20 pm on Oct 2, 2007 (gmt 0)

10+ Year Member



I am trying to get php, mysql and apache installed and working.

I am having a big problem with php and mysql. I install it, turn on the mysql modules and everything seems allright except the mysql module doesn't seem to load at all. It doesn't show mysql on phpinfo().

I have tried reinstalling php and turning on all sql related modules (Except for mssql which I am sure I don't need), SqlLite shows on the list of installed modules but mysql still doesn't.

PHP is working fine and so is apache. Anybody got any ideas. I have tried copying php.ini to the windows directory but that didn't change anything. I am going mad here with something that it is supposed to be simple.

I am using Apache 2.2.6 and PHP 5.2.4

Best Regards

NooK

eelixduppy

4:16 am on Oct 3, 2007 (gmt 0)



with php 5 the mysql mod isn't enabled by default. You have to go into your php.ini file and uncomment the mysql directive by removing the semicolon. Try that, restart your server, and see if that works.

cezuk

6:52 pm on Oct 11, 2007 (gmt 0)

10+ Year Member



I guess he found his solution, but I'm still struggling!

I'm using exactly the same apache / php versions as listed above. Installed PHP, tested, all OK. Activated some modules, restarted Apache, and all seemed OK until I tried to connect to the database and was told:

Call to undefined function mysql_connect()

No references to MySql are showing up when I run a phpinfo(). Strangely, the other modules I've actived (curl, gd) are showing up and working fine.

Any ideas?

NooK

12:09 pm on Oct 12, 2007 (gmt 0)

10+ Year Member



Sorry for delay on this one.

I haven't actually done anything, It fixed itself. When I came back home from work at night the database suddenly was appearing in the phpinfo.

Best Regards

NooK

cezuk

12:18 pm on Oct 12, 2007 (gmt 0)

10+ Year Member



"I haven't actually done anything, It fixed itself. When I came back home from work at night the database suddenly was appearing in the phpinfo."

Thats pretty crazy. Now I'm going to spend the day with my fingers crossed, hoping the scripting fairies have visited my PC during the day and waved their magical PHP configuration wands ;)

coopster

2:21 pm on Oct 15, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, cezuk.

There is a thread [webmasterworld.com] in our PHP Forum Library [webmasterworld.com] that may be helpful in troubleshooting your issue.

cezuk

5:15 pm on Oct 15, 2007 (gmt 0)

10+ Year Member



Coopster, you legend, 3 posts in and I've already fixed the problem.

Even though I read and re-read several tutorials and walkthroughs, its amazing how blind you can be to the obvious when you *think* you know how something is done. Ive installed AMP on my Windows machine around 15 times over the past few years, and I still managed to forget to copy the libmySQL.dll file into the windows\system\ folder. Whats strange is that I actually tried installing the MySQL binary at one point, so it surely it should have copied that .dll file over for me? Anyway, no point dwelling on that now!

<sigh> Well I wont make that mistake again (or did I say that last time? I cant remember!)

Thanks for pointing me in the right direction. Much appreciated.

eelixduppy

6:00 pm on Oct 15, 2007 (gmt 0)



>> It fixed itself.

Odds are you forgot to restart your server and it did while you weren't looking :) Just a guess, though, glad you got it