Im having problems switching from php 5.0.4 to php 5.2.9. Using ISAPI I get “Invalid access to memory location.”

Im doing a manual install and unzipping to C:\php (old one was at c:\php5) I then renamed the php.ini-recommended to just .ini, no changes were made. Previous install doesn’t even have a php.ini file. I added C:\PHP\php5isapi.dll to the web service extensions and application extensions also made PATH point to c:\php. Where can I go from here.

Ive tried using C:\PHP\php-cgi.exe and it works ok, but it breaks my site as Im using irregular URL’s like index.php/business/jobs and then parsing it with request_uri and it doesn’t seem to like that much. So 5.0.4 worked fine as ISAPI and I would like 5.2.9 to work as well, Please help me.

-James

    5 days later

    Ive found my answer, php has always run better on apache, sooo i just installed apache webserver to work along with IIS and then when I got it all working i just disabled IIS alltogether. Guide is here:

    http://www.devarticles.com/c/a/Apache/Installing-PHP-under-Windows/

    Tips during install, since its an older guide and if you already have a website up and dont want to mess it up do the following:

    Install apache to c:\apache\ also have it run as a service on port 80, then after install open C:\Apache\conf\http.conf and look for listen 80 and switch it to 8080. that way you can have IIS on 80 and apache on 8080.

    after you install PHP the files that they refer to are older php4 files so do the same file copy but notice that they will be php5 instead of 4, also if your like me then you will have installed apache 2.2 and will have to use the 2_2 file.

    as for the code to be entered into http.conf the worked for me:

    LoadModule php5_module php5apache2_2.dll
    AddType application/x-httpd-php .php

      Only problem I had was this:

      You will now need to copy some files to your Apache Directory (C:\Program Files\Apache Group\Apache2)

      That's entirely false.

      You should never have to copy any PHP-related files outside of the main C:\PHP\ directory you extract PHP to. Never.

        what is the propper way of doing it then? Please enlighten all of us. My php site is fully functional everything works. But i would like it to be done the correct way. Thank you much.

          While the plethora of How-To guides on installing PHP/Apache may seem to make the process easy, the sheer number of them and the sight variations between them are enough to make me lose faith in all of them.

          When I first started learning PHP, it only made sense to me to use the PHP Manual to install PHP (e.g. [man]install.windows[/man]). If you bought a Honda car and wanted to know how to use it, would you look at a service manual from Honda or one from Chevrolet? I got PHP from php.net, so it just made sense to me to go to php.net to learn how to install it.

          As for the specifics, here's the four lines I added to my Apache's httpd.conf file:

          LoadModule php5_module "C:/php/php5apache2_2.dll"
          AddHandler application/x-httpd-php .php
          AddHandler application/x-httpd-php-source .phps
          PHPIniDir "C:/php/"

          Now, when I go to upgrade PHP, I simply extract the new files into c:\php\, restart Apache, and browse to a phpinfo() readout to confirm everything went as planned.

            Write a Reply...