php.ini problem

Hi,
I hate windows XP because nothing works there as it should!
I placed php5 c:/php5/ and I use it with apache2.
I can't force php to read php.ini. phpinfo() tells c:/windows is the place for php.ini. Great, but it DOES NOT READ IT!, I had the same php.ini in:
c:/windows
c:/winnt
c:/apache2
c:/
c:/php5

I had the PHPIniDir "C:/php5" in httpd.conf - doesn't work!
I had the HKEY_LOCAL_MACHINESOFTWAREPHPIniFilePath set to c:/php5 - doesn't works

the problem is with extension_dir directive, which by default (whithout php.ini) points to php root dir, but I don't want to copy there 15 dll. I know I can set INI settings from httpd.conf and .htaccess, but php.ini are made for it.

I work usualy under Linux, but 1/2 of the day I must be under windows :(
Anybody know a solution ?

thanks.

Comments

  • First,no need to copy php.ini to other places and no need to *hate* windows XP,and seems like you're running PHP as SAPI instead of CGI,do you have these lines in httpd.conf?[code]LoadModule php5_module "c:/php/php5apache2.dll"
    AddType application/x-httpd-php .php[/code]btw,php-cgi works fine on win98 here;)
  • : First,no need to copy php.ini to other places and no need to *hate* windows XP,and seems like you're running PHP as SAPI instead of CGI,do you have these lines in httpd.conf?[code]LoadModule php5_module "c:/php/php5apache2.dll"
    : AddType application/x-httpd-php .php[/code]btw,php-cgi works fine on win98 here;)
    :

    I'm not new to PHP unther windows, those things I know well. I don't know what the problem was. I left one copy of php.ini in c:windows and I restarted XP. Everything started to work (except openssl :) )
  • I know this is after the fact, but in case anybody else stumbles in here with similar trouble... to the best of my knowledge, when run as an SAPI module, php.ini is read when your web server starts. This means if you make changes to php.ini you will need to restart your web server for those changes to take effect.

    : : First,no need to copy php.ini to other places and no need to *hate* windows XP,and seems like you're running PHP as SAPI instead of CGI,do you have these lines in httpd.conf?[code]LoadModule php5_module "c:/php/php5apache2.dll"
    : : AddType application/x-httpd-php .php[/code]btw,php-cgi works fine on win98 here;)
    : :
    :
    : I'm not new to PHP unther windows, those things I know well. I don't know what the problem was. I left one copy of php.ini in c:windows and I restarted XP. Everything started to work (except openssl :) )
    :

  • : I know this is after the fact, but in case anybody else stumbles in here with similar trouble... to the best of my knowledge, when run as an SAPI module, php.ini is read when your web server starts. This means if you make changes to php.ini you will need to restart your web server for those changes to take effect.

    This is true under linux and probably Win < XP, but (at least in my installation) you must restart windows :(

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories