Jump to content

Schizophrenic PHP under Win2003 server


Recommended Posts

I am experiencing a MAJOR issue on getting PHP to run properly under Windows Server 2003.

 

Each and every time I worked with PHP I double-checked several places:

  • The Web Server Extensions inside Computer Management / Internet Information Services (C:\php5\php5isapi.dll)
  • The Application Extensions inside Computer Management / Internet Information Services / Web Sites Properties / Application Configuration (C:\php5\php5isapi.dll)
  • The Path inside My Computer / System Properties / Environment Properties (C:\PHP5\; )

Each and every time, these were set to what they should have been.

 

The first several times, I tried to use the MSI Installer. This would work for one or two tries (of loading phpinfo.php), and then it would crash, especially so after restarting the www service. Even rebooting didn't fix the problem. Once PHP crashed, it would crash PERMANENTLY, without any chance of reversing the problem except by uninstalling and reinstalling. All it would give is either a totally blank page, or a complaint about an exception. Rebooting didn’t solve the problem, and neither did leaving it alone for a day or two. Once the error occurred, that was it. Game over.

 

Then I tried using the plain ZIP package, and unzipped PHP into its own directory under C:. This *did* work, and still does work, somewhat. However, I am unable to change any PHP options, BECAUSE IT SEEMS TO COMPLETELY IGNORE PHP.INI

 

Yes, you read right. My PHP installation completely ignores the php.ini file, no matter where I put it (such as C:\Windows... yes, that too is ignored). As such, I am unable to get PHP to connect (via phpMyAdmin) to the MySQL server I have installed, and I am unable to get PHP to accept any other config options (such as setting the correct time zone to America/Vancouver). Once again, rebooting does not solve the problem.

 

Could someone either tell me where I need to put php.ini in order for PHP to truly “see” it, or tell me where the “master config file” that PHP really uses (prior to accessing php.ini) is.

 

PS, I only have one machine available to act as a server, and it already is doing a lot of jobs, so setting up a second server - such as a dedicated Linux box - is currently not possible.

Link to comment
Share on other sites

  • 9 years later...

I don't know about 2003, but on 2008 R2 I just use the ZIP file distribution and setup fast cgi. Make sure you install the necessary VC runtime for whatever PHP version you download. Then it's fairly simple:

 

From memory, the process is something like

  • Extract zip file to c:\php
  • Setup c:\php\php.ini as desired
  • In IIS manager create a Fast CGI application entry for c:\php\php-cgi.exe
  • In the Fast CGI configuration, define the PHPRC=c:\php environment variable
  • Add a handler for .php files using the Fast cgi module
  • Enjoy
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.