Page 1 of 1

phantom php.ini file (is there, it is needed, but not used)

Posted: Thu Aug 31, 2006 2:11 am
by rdlfo
Hi, hope somebody help me...

I´ve been dealing with PHP5 and IIS 5.1 on a XP machine. Problem is php is runing, but my extensions won´t load. After some serious reading (php.net and 6 more tutos on the matter), i started to see that i´ve tried EVERYTHING, my installation seems to be perfect, on every variations i read. Then i see that the phpinfo summary was all wrong, just like if the php.ini wasn´t edited. I had the PATH variable edited (;C:\PHP), doc_root = c:\inetpub\wwwroot (and tried doc_root = " c:\inetpub\wwwroot"); same for extension_dir = c:\php\ext
, uncommented extensions, etc...

My summary shows doc_root empty and extension_dir is"C:\PHP5": which is completely wrong according to the INI settings, which happen to be set and uncommented....

I created this C:\PHP5 folder, put the extensions there but nothing. PHP.INI file is in C:\PHP, if i move it to windows, php won't show anything (this happens also with the windows registry tip in http://www.peterguy.com/php/install_IIS6.html, have to erase the registry so php work again). So, i don't understand what's going on, it appears that the INI file is needed right where it is, but it's not loading what is suppose to.

Also, the summary says that the INI file path is c:\WINDOWS, but that is also wrong, as i already said, it is in C:\PHP and if i move it to WINDOWS then php won't echo a thing..

I'm really mad about this, i've never have problem working with apache, but this iis matter is going too long... And can't change the server..

best regards,
rdlfo

Posted: Thu Aug 31, 2006 5:45 am
by Benjamin
Have you copied the dll files to your windows system directory?

Posted: Thu Aug 31, 2006 7:58 am
by volka
There's a list of locations php is looking for the ini file at http://de2.php.net/ini[quote]php.ini is searched in these locations (in order):[/quote]
phpinfo() tells you which php.ini is used. If no ini file was found phpinfo() show the last location of that list and php uses default values for all parameters.

Posted: Thu Aug 31, 2006 11:25 am
by rdlfo
Thanks for the quick answers.

I´ve copied some of the dll files, (something like gd32.dll and the libmysql.dll) to c:\windows\system32, according to another tuto, but it was all the same. What´s the suggestion, to copy all libraries in c:\php to c:\windows or c:\windows\system32 ?

i have seen the possible locations for php.ini, and, as i edited the PATH variable, supposed that the ini should be in c:\php; but it is not being read there, but if i change it from there, php won´t work. Now, from the link astions volka provided, i found this (http://de2.php.net/manual/en/faq.instal ... ceredirect):
13. How do I know if my php.ini is being found and read? It seems like it isn't as my changes aren't being implemented.

To be sure your php.ini is being read by PHP, make a call to phpinfo() and near the top will be a listing called Configuration File (php.ini). This will tell you where PHP is looking for php.ini and whether or not it's being read. If just a directory PATH exists than it's not being read and you should put your php.ini in that directory. If php.ini is included within the PATH than it is being read.

If php.ini is being read and you're running PHP as a module, then be sure to restart your web server after making changes to php.ini
That´s my problem, INI path in the summary is C:\WINDOWS, the real "physical" path is C:\PHP. But again, if i move it to c:\windows, then, this happens:
7. Unix/Windows: I have installed PHP, but when I try to access a PHP script file via my browser, I get a blank screen.

Do a 'view source' in the web browser and you will probably find that you can see the source code of your PHP script. This means that the web server did not send the script to PHP for interpretation. Something is wrong with the server configuration - double check the server configuration against the PHP installation instructions.
I got those blank screens with my code in the source. Then, returning that useless ini to c:\php will get my php running again but with this default parameters that are no good to me. :evil:

I´m repeating tthe INI file in both locations, but i don´t really expect something good out of it...
Also i´m trying astion's dll suggestion, but i´m not sure about it, i suppose that everything should go smooth if the ini file is found...

thanks,
rdlfo.

Posted: Thu Aug 31, 2006 2:19 pm
by rdlfo
It simply won't work.

I copied the ini twice, nope.

I copied the DLLs into WINDOWS with the php.ini NOPE

I erased the PATH and copied the DLLs into WINDOWS with the php.ini NOPE.

It seems imposible that the ini can be accurate read, this IIS is such a trash....

I'm tired of reading the same process over and over again, there´s nothing missing in my installation.... any suggestions, someone?

regards, rdlfo.

Posted: Thu Aug 31, 2006 2:21 pm
by feyd
Stop using IIS?

Posted: Thu Aug 31, 2006 2:35 pm
by rdlfo
that, actually, makes sense.... Got to prove the IT guy that apache works, that won´t be easy... damn!

cheers,
rdlfo.

Posted: Wed Sep 06, 2006 12:52 am
by rdlfo
Well, it seems i got it, not what i wanted really but the INI file is now being found and my extensions working... For those who are curious about it:

- ISAPI installation NEVER WORKED: Neither in XP running IIS5 nor on WIN2000 server running a lower IIS version.
- CGI inatallation works, but be sure to give IUSR_MACHINENAME permissions to read/execute the directory where php-cgi.exe (php5) is.

This one helped me out:
http://www.hostlibrary.com/Building-a-P ... ting-.html

And really: stop using IIS. Unfortunately, not my case :(

God Bless LAMP...

Regards,
rdlfo

I can't add my extensions on my PHP5 + Apache 1.33.34 either

Posted: Wed Oct 11, 2006 4:26 am
by nicodoggie
I tried everything the documentation said to do but then still nothing...

I added C:\php (the DLLs are in here and I'm sure that the ones I need are in here) to the system's PATH Environment Varable, I changed my extension_dir to C:\php\ext (where my extensions are) and uncommented the extension I want included...

I even tried to load php as CGI instead of an apache module, but it still didn't work...

Is this some sort of bug or something? Because when I try php -m my extensions seem to have been loaded, but then when I look for it internally (via the extension_loaded() function or via the phpinfo() function) it doesn't register! I didn't have this sort of problem on 5.0.1 when I first used php...

Thanks...

I run php 5.1.6 on apache 1.33.34 on my windows xp sp2