Forum Moderators: coopster

Message Too Old, No Replies

php5 and apache2 not seeing php extensions

php gets installed but not it's extensions

         

watstuts

4:29 pm on Mar 24, 2005 (gmt 0)

10+ Year Member



Hi All. I've had a torid time installing php5 on my windows xp machine, not so much in installing the php core itself, but getting apache or php itself, i'm not sure which, to recognize the installed php extensions. I have gone through the install.txt file numerous times, read the php mannual, reviewed the apache docs just as frequently, even found this site through google and read up on the installation instructions provided by this forum's moderator, moved the php.ini file and the dll extension files from the default c:\php directory to the c:\windows directory, and then moved the dll files to the windows\system32 directory, then recreated the path to the appropiate extension directory in the php.ini file, all to no avail. When I made the appropiate changes, then restart apache2, I get a message saying that the extensions cannot be found. No matter where I put the extension dlls and no matter how accurately I change the extension_dir in the php.ini file, I am getting the same negative result. What do I do now? As I said, Php itself is working, my phpinfo file confirms that. Now, I cannot even write a mysql_connect function without php or apache saying that the function is undefined and cannot be executed because the mysql extension is not loaded. Please help. Cheers!

jatar_k

5:22 pm on Mar 24, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld watstuts,

maybe try these 2 threads and then see if that helps.

Installing a new web server: Apache2, PHP5, MySQL4 and PHPmyAdmin. [webmasterworld.com]
Installing PHP5 Under Windows XP and Apache [webmasterworld.com]

if it doesn't then we can see if we can help you figure it out from there ;)

you will want to look at the second thread first

coopster

6:43 pm on Mar 24, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Also have a look at this thread which details some troubleshooting steps...

[webmasterworld.com...]

watstuts

4:29 am on Mar 25, 2005 (gmt 0)

10+ Year Member



HI Friends. I got my problem resolved partly. I got the mysql extension to work at last. Here are the steps i took:
1. I copied the php.ini file to the apache2 server directory, in this case, c:\program files\Apache Group\Apache2 as suggested in the trouble shooting forum that I was recommended to take a look at.
2. I copied the lib_mysql.dll to the c:\windows\system32 directory, again as recommended in the trouble shooting forum.
3. I opened the apache.conf file and change the phpini_dir directive to reflect the change of location of the php.ini file, phpini_dir ="c:/program files/Apache Group/Apache2.
4. Open up your phpinfo file. If the above steps were observed propperly, you should see, in table 13, "mysql support, enabled", which tells you that the mysql extension has been successfully installed.
Well, my mysql extension inigma is now resolved. Note: I've had to reinstall mysql because i think somewhere along the line when I was trying to get Apache, php and Mysql to reach an understanding with each other, the mysql security configuration got massed up. From this experience, I would suggest that the order of installation for these 3 apps should be as follows: apache, then php, then mysql last of all.

Ok, my mysql dilema is now resolved, but when I try to install the default extensions as noted on the php.ini file, my apache crashes. I am guessing that the documented extensions are php4 compatible rather than php5 compatible, and so I'll have to get the extensions packaged with the php5 distribution installed instead, Am i correct here? My deepest thanks go to the 2 moderators for their invaluable help. Also, if i can contribute anything towards web accessibility, please let me know. Being a blind developer myself, web accessibility is very high on my list and I will be very keen to participate or contribute in any way I can. Cheers!

jatar_k

6:43 am on Mar 25, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> the extensions packaged with the php5 distribution installed instead

I had that same problem actually, started with 4 and then had some issues so went to 5, got a little crossed up. I think I started from scratch 3 times, hehe.

I had to delete everything and search around for a few stray files that were continuing to make life difficult as well. When I finally got it all cleaned and started with a fresh full 5 and followed the steps, again, I got it rolling no problem.

it is just so easy on freebsd and solaris. I guess it comes down to what you are used to. ;)