Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PHP extensions on Apache


Dennis99

Recommended Posts

Windows XP, Apache, PHP

Installed apache, then PHP. PHP works, but I can't get the extensions to work, i.e. php_mysql.dll. Changed extensions_dir in PHP.ini every which way, with quotes, without quotes, forward slashes, back slashes, nothing works. I also uncommented the dll's. Any ideas? Do I have re-compile PHP or something? It was all working fine on IIS. Did I miss a step?

 

Also, if I delete php.ini, and restart Apache, PHP still works! It's like my changes to PHP.ini are having no effect. PHP.ini is under c:\Windows right?

 

Thanks in advance. :blink:

Link to comment
Share on other sites

Check to see if there are any more php.ini files on your computer. You are right in saying that it is normally c:\windows, but I have known there to be multiple copies on a computer. If you system is set up correctly you should not have to enable any of the drivers for php.

 

Vger

Link to comment
Share on other sites

When you restart apache do you get any error messages?

 

There is a file called libmysql.dll or something like that which you need to copy to your windows\system32 dir.

 

If you delete the php.ini from windows php will still run using default settings.

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

with the newer fixes of apache, if you read thru the httpd.conf file, it states that you no longer need to do anything with the mysql dll's to get it to work.

with iis, you need to set the path to the extensions directory in your ini file, uncoment any of the extensions you want to run and then you are better off to do a total reboot, not just a restart.

Link to comment
Share on other sites

Windows XP, Apache, PHP

Installed apache, then PHP.  PHP works, but I can't get the extensions to work, i.e. php_mysql.dll.  Changed extensions_dir in PHP.ini every which way, with quotes, without quotes, forward slashes, back slashes, nothing works.  I also uncommented the dll's.  Any ideas?  Do I have re-compile PHP or something?  It was all working fine on IIS.  Did I miss a step?

 

Also, if I delete php.ini, and restart Apache, PHP still works!  It's like my changes to PHP.ini are having no effect.  PHP.ini is under c:\Windows right?

 

Thanks in advance. :blink:

 

 

Thanks all: I figured it out, here's my answer:

 

code at the end of httpd.conf:

LoadModule php5_module "c:/php/php5apache2.dll"

AddType application/x-httpd-php .php

PHPIniDir "C:/windows"

 

the bugger that was causing the problem with extensions was I had PHPIniDir "C:/php" (recommended) i.e. I was pointing at the wrong place, php.ini is in c:\windows

 

But now I have another problem, which I will post separately.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...