Re: IIS 6 and php.ini not being friends

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/10/07, Bastien Koert <bastien_k@xxxxxxxxxxx> wrote:
>
>
> why not try searching the c:/windows folder for a copy of the php.inifile? Maybe there is a straggler that needs to be deleted.



Bastien - That may be a possibility... except I just built the machine
yesterday, so I know php.ini is not in there. But since I had the same
thought as you, I checked the directory to verify that it was not in there -
it wasn't.

Stut - I temporarily moved the ini file to C:\WINDOWS and I got "No input
file specified" with a page that just called phpinfo(). Besides, I wanted to
reference the ini file in C:\php. So, what I did was create a new
Environment variable called PHPRC and gave it a value of C:\php (I followed
this article: <http://www.iisadmin.co.uk/?p=4>). I removed the ini from
C:\WINDOWS (of course) and then it finally began reading my ini file.

There are some weird things happening still. I have a file named
phpinfo.phpwith the contents:

<?php phpinfo(); ?>

When I call this file, it says "No input file specified." If I rename the
file hi.php and then call it, it works just fine and spits out all the
appropriate info. So, anybody heard of that happening before? I'm going to
investigate migrating to Apache b/c I think IIS is playing mean games with
me. Thoughts?

Thanks,
~Philip



Philip Thompson wrote:
> Hi. I have installed PHP ~ a dozen times on Windows and *nix systems, so I
> don't consider myself to be a newbie at this. However, I've run into a
> problem that I have run out of ideas. I have Google'd many sites and none
of
> the suggestions provided worked for me. Specs:
>
> PHP 5.2.4 (Manual install)
> Windows (virtual) Server 2k3
> IIS 6, ISAPI
>
> Ok, getting there... When I view phpinfo(), for the "Configuration File (
> php.ini) Path" it shows C:\WINDOWS. However, I *know* that it's located in
> the PHP install directory: C:\php. I've put C:\php in my Windows PATH
> environment and I have even given "Everyone" full permissions on the .ini
> file - still no go. Thinking maybe I screwed something up in my .ini file,
I
> tested both the recommended and dist .ini files with no changes - still no
> go. Yes, I restarted IIS each time and verified permissions a lot.
>
> Any suggestions for what might be happening? Why can't these just play
> nicely together? Is it possible the .ini file PHP provided is corrupt so
> it's falling back to the *default* .ini?

Move php.ini to C:\WINDOWS. If it were finding a php.ini to work with it
would show the full path including the "php.ini" on the end. This
location is compiled into the PHP binaries.

-Stut

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux