Jump to content


Photo

Windows Installer for Current PHP version?


  • Please log in to reply
7 replies to this topic

#1 jwmh

jwmh
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 21 October 2006 - 03:48 AM

I am simply trying to install the latest PHP, phpMyAdmin, and Apache 2.2. No frills. I am not a php programmer, and have no plans for any use of php other than phpMyAdmin.

First problem... the PHP install docs talk about a basic Windows installer. But the only installer on the download page is for several releases back. Has phpMyAdmin abandoned the Windows installer for later releases?

I tried manual install using the instructions, and as far as I know, I got it all installed. But all phpMyAdmin commmands from Apache (and even a 1-liner test) gives me a 500 Server error.

So I simply went to the command line in the and typed php index.php. I get no output, and it simply returns to the command prompt. (I have another much older installation on another box. doing the same thing, I get a complete html dump of the page. So something is major different.

I can't find logs anywhere. I have no clue why it isn't working. The only difference between the older install and this one (other than versions) is that I used the now-non-existant Windows installer on the old install on the other box.

I'm pretty certain I've just got some magic config item that the installer does that I didn't do. I debug software for a living, and I'm pretty good at finding problems. But with no logs or any indication other than "it's broke" is making it very difficult.

So first of all, if I'm simply overlooking the current version windows installer, just direct me. If I'm stuck with manual config, can someone tell me what I've missed?

On the old-working box, I don't have a php.ini file. So I'm assuming that is not mandatory.  

My steps on the current non-working install:

1) unzip php.zip into c:\php
2) unzip phpMyAdmin into the appropriate htdocs folder of apache
3) add c:\php to path in environment
4) tried adding the loadmodule php5Apache2.dll to httpd.conf until I read that it doesn't work with Apache 2.2. So changed back to the CGI config stuff in httpd.conf (pretty sure this works... same as on old box).

I've spent two days trying to get this to work. Nothing. This is frustrating. It shouldn't be this difficult.

What am I missing?

Thanks.


#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 21 October 2006 - 11:35 AM

PHP5.1.x or PHP4.4.x is not compatible with Apache2.2.x.

Install Apache 2.0.x instead.

#3 jwmh

jwmh
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 21 October 2006 - 01:40 PM

That's good to know.  But this fails even when I'm not using Apache (command line only).

What is the story with the missing Windows installer?

Thx

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 21 October 2006 - 01:50 PM

What windows installer. You can get the windows installer from the downloads page at php.net if you want

However the Windows Installer does nothing. All it does is extract the files from the installer to C:\php and thats it.

How are you installing Apache and PHP? When installing PHP have a read through this post of mine

#5 jwmh

jwmh
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 21 October 2006 - 03:33 PM

If the installer truly only does an unzip, then it's a moot point.  But on the download page, there is only an installer listed for 4.4.4 and nothing for 5.1.6 unless it is now embedded in some other file.  Even if it's not necessary, it's very confusing now to have the instructions say to download an installer, and not have one available for the current version.  My only thought is that the 4.4.4 installer will actually install 5.1.6 if it finds that zip file or something.  But I have no evidence that this is the case.  Yet all the instructions reference an installer that doesn't exist (or isn't easily found on the downloads page).

But if it's just an unzip, it's obviously not my main problem. I have done the unzip manually.  I have done everything in your post with one variation.  I am indeed using Apache 2.2.  But I had already discovered elsewhere that the module was not compatible.  So I'm currently using the CGI-style configuration in httpd.conf:

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

Is it that Apache 2.2 is completely incompatible or is it just the connector module that won't work.  I would think there should be no problem with 2.2 if I was using the CGI version config above.  It should be simply routing stdin / stdout, right?

I put the hello.php in my htdocs dir.  I get a 500 error when I try to hit it from my browser.  The apache error log has:

[Sat Oct 21 09:12:38 2006] [error] [client 127.0.0.1] Premature end of script headers: php.exe

is there any way to see some sort of logs for what PHP is trying to do?  I can't find any logs other than the apache one-liner.



#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 21 October 2006 - 04:13 PM

I'm not sure. I havnt configure PHP for CGI before. You can use PHP5.1.6 with Apache2.2 by downloading the third partly apache module from apachelounge.com.

Installing PHP as an Apache module is easier. When you download the third part apache module you should be able to use PHP5.1.x with Apache2.2.x

I have no idea why theres no installer for PHP5.1.6. However I still do recommend you to downgrade Apache to Apache2.0.x though.

#7 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 21 October 2006 - 04:24 PM

Ooh bum!!

Sorry I deleted your last reply. Didnt mean that.

PHP can write error logs. In order to do that you need to tell it to. However PHP usually writes errors to Apaches error log (when loaded as an Apache Module/CGI successfully) and/or the sytems error log.

To make PHP write to an error log find and edit the php.ini in the php folder, or where ever you have it located to. If you cant find it the rename php.ini-recommended (in the php folder) to php.ini instead. Now edit the php.ini

Find where it says
display_startup_errors = Off

change Off to On

Now to make PHP write PHP to its own error log you need to find the following:
;error_log = filename

and change that to this:
error_log = "C:/php-errors.log"

Save the php.ini and copy the php.ini to C:\WINDOWS\. Restart Apache or attempt to run a script via the command line. It should report errors to the error log you just setup. Make sure php-errors.log exists in the root of your hard drive first though.

#8 jwmh

jwmh
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 21 October 2006 - 05:17 PM

I really appreciate all of your help.  I set up the log stuff, got the expected 500 error as usual.  But no logs.  So I started getting more suspcious of apache rather than php.  I have some Rexx stuff on the machine, so I replicated my php cgi config in httpd.conf to be a rexx cgi and set up a rexx test.  Exact same error. 

So it appears that apache is not able to invoke any exe file.  So I'm off now to look at my apache config.

Again.  Thx.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users