Forum Moderators: coopster

Message Too Old, No Replies

PHP installed on windows. extensions aren't working

Help needed getting extensions/modules to work on php (windows)

         

zRonin

4:30 am on Aug 24, 2006 (gmt 0)

10+ Year Member



I just installed php 5, mysql 5, oracle 10g, and apache 2.0 on my PC... and everything seems to be working except for PHP extensions.

The PHP files (and php.ini) are located in C:\php, and the extensions are located in C:\php\ext. In php.ini I have the extension directory set as ./ext, and I also have it set to load both the Oracle and MySQL modules. I also have dl() enabled.

When I run phpinfo() it says that no modules have been loaded, even though both exist in the extension directory (and PHP 5 should have MySQL support by default).

Even when a script (phpMyAdmin) uses dl(), the modules cannot be loaded.

Any suggestions?

coopster

1:18 pm on Aug 24, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Reboot the Apache server?

zRonin

3:42 pm on Aug 24, 2006 (gmt 0)

10+ Year Member



i've been restarting after changes to php.ini, and I know that some changes are taking effect (I can turn DL() on and off, etc) but the extensions wont load.

coopster

3:42 pm on Aug 24, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Have a look at this troubleshooting [webmasterworld.com] thread from our PHP Library [webmasterworld.com] to see if this resolves your issue.

hanglide

4:48 pm on Aug 24, 2006 (gmt 0)

10+ Year Member



FYI - php5 does NOT support Mysql by default.

Lately, I have had to copy the php.ini to my C:\windows directory to get mysql extensions to work. There have also been times when it did not seem to be necessary. Don't know why, just know that php worked fine but extensions wouldn't work until I copied the .ini to windows.

I also specify the full path: extension_dir = "c:\php5\ext\"
And I have personally had problems if I forgot the last \ after ext.

For my most recent installation, I HAD to download the dll's from mysql directly. (libmysql.dll & php_mysql) The ones that came with php5 didn't work.

Good luck,

Scott

FalseDawn

5:11 pm on Aug 24, 2006 (gmt 0)

10+ Year Member



I also have the full path in php.ini, but no trailing "/" and I have no problems:

extension_dir = C:/PHP5/ext

This may also help:
[webmasterworld.com...]

zRonin

2:48 am on Aug 25, 2006 (gmt 0)

10+ Year Member



Unfortunately these suggestions have not helped.

From php.ini:

extension=php_msql.dll
extension=php_mysql.dll

extension_dir = "C:\php\ext" (also tried ./ext and C:/php/ext with an without ""s)

From php_info printout:

extension_dirC:\php\extC:\php\ext
enable_dlOnOn

Under Additional Modules:

...none listed

orion_rus

5:53 am on Aug 25, 2006 (gmt 0)

10+ Year Member



run php -m
may be it show you something, or type phpinfo() here, version working path, working ini and others main paths and variables

hanglide

1:25 pm on Aug 25, 2006 (gmt 0)

10+ Year Member



It sure looks like something is stepping on your extension_dir.. Maybe multiple instances?

I'm not an expert by any means so all I can tell you is exactly what my settings are.

All I can say is:

extension_dir = "c:\php5\ext\"

was a direct cut and paste from my .ini (quotes are present in the ini)

Did you download the .dll's FROM Mysql? From version PHP5+ I had to, previous to that, the dll's in the PHP distribution worked.

Did you copy you your php.ini file to your windows dir? When you run phpinfo(); where does it show the .ini lives?

I've also heard that some people have had to copy the .dll's to windows as well (or set your paths correctly)

If you would like, I will email you my php.ini and httpd.conf. Send an email to rscottdoesnotwantspamcentroidcnc.com and I will reply

substitute @ for does not want spam.

FalseDawn

7:32 pm on Aug 25, 2006 (gmt 0)

10+ Year Member




I've also heard that some people have had to copy the .dll's to windows as well (or set your paths correctly)

It does sound like this is the problem - have you added c:\php and c:\php\ext to your PATH environment variable?

Control Panel>>System>>Advanced>>Environment Variables

zRonin

1:36 am on Aug 26, 2006 (gmt 0)

10+ Year Member



I edited the PATH variable to include the php directory and then left the extension_dir set to c:\php\ext\ as suggested above and everything started working fine

Thanks for all your help

coopster

12:20 pm on Aug 26, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



... which was mentioned in the troubleshooting link earlier but for clarity I'll the post the PHP manual page here for future readers:

How do I add my PHP directory to the PATH on Windows? [php.net]