PHP 5 Doesn't Work

This is a discussion on PHP 5 Doesn't Work within the Apache Web Server forums, part of the Web Server and Related Forums category; I'm running Apache 1.3 on my server. I've run the installer file for PHP 5.0.4. ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-13-2005
Fred Atkinson
 
Posts: n/a
Default PHP 5 Doesn't Work

I'm running Apache 1.3 on my server. I've run the installer
file for PHP 5.0.4.

I paste the following code into the httpd.conf file:

# Add to the end of the LoadModule section
LoadModule php5_module "C:/php/php5apache.dll"

# Add to the end of the AddModule section
AddModule mod_php5.c

# Add this line inside the <IfModule mod_mime.c> conditional brace
AddType application/x-httpd-php .php

# For syntax highlighted .phps files, also add
AddType application/x-httpd-php-source .phps

Then, I go to the DOS prompt and type 'net stop apache'.
After it stops, I type 'net start apache'. I keep getting an error
message saying that Apache did not start.

The weird thing is tha there is no php5apache.dll file in the
C:\PHP subdirectory. There *is* a php5ts.dll file there. I tried
chaning that line to reflect the php5ts.dll, but that didn't work.

Any suggestions?


Fred

  #2 (permalink)  
Old 06-13-2005
HansH
 
Posts: n/a
Default Re: PHP 5 Doesn't Work

"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht
news:btira19cdj656npp0a33bm9q9hvae9kro3@4ax.com...
> Then, I go to the DOS prompt and type 'net stop apache'.
> After it stops, I type 'net start apache'. I keep getting an error
> message saying that Apache did not start.

The message logged in Window's system log should be more informative.
Alternatively, go to the folder where Apache is installed and run Apache as
a usertask.

> The weird thing is tha there is no php5apache.dll file in the
> C:\PHP subdirectory.

It may have been installed in some folder under c:\windows IF the user
running install had sufficient access rights.

> There *is* a php5ts.dll file there. I tried chaning that line
> to reflect the php5ts.dll, but that didn't work.

IIRC that's for use with Windows Terminal Server.

HansH


  #3 (permalink)  
Old 06-14-2005
Fred Atkinson
 
Posts: n/a
Default Re: PHP 5 Doesn't Work

On Mon, 13 Jun 2005 22:14:10 +0200, "HansH" <hans@niet.op.het.net>
wrote:

>"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht
>news:btira19cdj656npp0a33bm9q9hvae9kro3@4ax.com.. .
>> Then, I go to the DOS prompt and type 'net stop apache'.
>> After it stops, I type 'net start apache'. I keep getting an error
>> message saying that Apache did not start.

>The message logged in Window's system log should be more informative.
>Alternatively, go to the folder where Apache is installed and run Apache as
>a usertask.


I'm not sure about where to find the system log or how to run
it as a 'user task?'.

>> The weird thing is that there is no php5apache.dll file in the
>> C:\PHP subdirectory.

>It may have been installed in some folder under c:\windows IF the user
>running install had sufficient access rights.


I was running under my own username, which has full
administrative rights.

>> There *is* a php5ts.dll file there. I tried chaning that line
>> to reflect the php5ts.dll, but that didn't work.

>IIRC that's for use with Windows Terminal Server.


I see. Hmmm.

>HansH
>


  #4 (permalink)  
Old 06-14-2005
Christian
 
Posts: n/a
Default Re: PHP 5 Doesn't Work

hi,

>>> There *is* a php5ts.dll file there. I tried chaning that line
>>> to reflect the php5ts.dll, but that didn't work.


looks like you just loaded the installable cgi-only package from php.net. if
you load the complete archive (zipped package, about 7,5 mb) than there you
will also find the necessary modlue-files php5apache.dll (for apache 1.3x)
and php5apache2.dll (for apache 2.x). just extract the archive over the
installation directory ;)

bye


  #5 (permalink)  
Old 06-14-2005
HansH
 
Posts: n/a
Default Re: PHP 5 Doesn't Work

"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht
news:aa7sa15jj6h1i85ubr9mrdanqulqti964d@4ax.com...
> On Mon, 13 Jun 2005 22:14:10 +0200, "HansH" <hans@niet.op.het.net>
> wrote:
> >"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht
> >news:btira19cdj656npp0a33bm9q9hvae9kro3@4ax.com.. .
> >> Then, I go to the DOS prompt and type 'net stop apache'.
> >> After it stops, I type 'net start apache'. I keep getting an error
> >> message saying that Apache did not start.

> >The message logged in Window's system log should be more informative.
> >Alternatively, go to the folder where Apache is installed and run Apache

as
> >a usertask.

> I'm not sure about where to find the system log

Start with 'This computer' right-click 'manage' and you'll probably find
your way where translation fails on me.

> or how to run it as a 'user task?'.

In this case, run it from a DOSsie prompt ;-)

HansH


  #6 (permalink)  
Old 06-16-2005
Fred Atkinson
 
Posts: n/a
Default Re: PHP 5 Doesn't Work

On Tue, 14 Jun 2005 15:46:16 +0200, "Christian" <mcw@lockfile.org>
wrote:

>hi,
>
>>>> There *is* a php5ts.dll file there. I tried chaning that line
>>>> to reflect the php5ts.dll, but that didn't work.

>
>looks like you just loaded the installable cgi-only package from php.net. if
>you load the complete archive (zipped package, about 7,5 mb) than there you
>will also find the necessary modlue-files php5apache.dll (for apache 1.3x)
>and php5apache2.dll (for apache 2.x). just extract the archive over the
>installation directory ;)
>
>bye
>


I just downloaded the latest version of PHP 5.0. I unzipped
it to the C:\PHP directory (I had deleted all files that were there
before).

I put these two lines of code into my httpd.conf file:

LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

I stopped Apache. I restarted Apache. Again, it won't
restart. So I am removing those two lines.

Any other suggestions?


Fred

  #7 (permalink)  
Old 06-16-2005
HansH
 
Posts: n/a
Default Re: PHP 5 Doesn't Work

"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht
news:9023b1d5a3haec9o0k020ahch1q058fu9a@4ax.com...
> On Tue, 14 Jun 2005 15:46:16 +0200, "Christian" <mcw@lockfile.org>
> I just downloaded the latest version of PHP 5.0. I unzipped
> it to the C:\PHP directory
> (I had deleted all files that were there before).

Now you probably lost your php.ini ...

> I put these two lines of code into my httpd.conf file:
> LoadModule php5_module "c:/php/php5apache2.dll"
> AddType application/x-httpd-php .php
> I stopped Apache. I restarted Apache. Again, it won't restart.

You're running apache-1.3, than indeed php5apache2.dll will fail: try
php5apache.dll.

Instead of either option given in c:/php/readme.txt
" To make php4ts.dll / php5ts.dll available you have three options: copy
the file to the Windows system directory, copy the file to the web
server's directory, or add your PHP directory, C:\php to the PATH. For
better maintenance, we advise you to follow the last option, add
C:\php to the PATH, because it will be simpler to upgrade PHP in the
future. ..."
you may need to add this line before the 'LoadModule ...'
LoadFile c:/php/php5ts.dll
.... it's not the TerminalServer version, but the main library
[Oops, sorry!]

Next time please quote the failure report Apache returns if started
_directly_ from the command line ( thus not by 'net start apache')


HansH


  #8 (permalink)  
Old 06-17-2005
Fred Atkinson
 
Posts: n/a
Default Re: PHP 5 Doesn't Work

On Thu, 16 Jun 2005 20:31:03 +0200, "HansH" <hans@niet.op.het.net>
wrote:

>"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht
>news:9023b1d5a3haec9o0k020ahch1q058fu9a@4ax.com.. .
>> On Tue, 14 Jun 2005 15:46:16 +0200, "Christian" <mcw@lockfile.org>
>> I just downloaded the latest version of PHP 5.0. I unzipped
>> it to the C:\PHP directory
>> (I had deleted all files that were there before).

>Now you probably lost your php.ini ...
>
>> I put these two lines of code into my httpd.conf file:
>> LoadModule php5_module "c:/php/php5apache2.dll"
>> AddType application/x-httpd-php .php
>> I stopped Apache. I restarted Apache. Again, it won't restart.

>You're running apache-1.3, than indeed php5apache2.dll will fail: try
>php5apache.dll.
>
>Instead of either option given in c:/php/readme.txt
>" To make php4ts.dll / php5ts.dll available you have three options: copy
> the file to the Windows system directory, copy the file to the web
> server's directory, or add your PHP directory, C:\php to the PATH. For
> better maintenance, we advise you to follow the last option, add
> C:\php to the PATH, because it will be simpler to upgrade PHP in the
> future. ..."
>you may need to add this line before the 'LoadModule ...'
> LoadFile c:/php/php5ts.dll
>... it's not the TerminalServer version, but the main library
>[Oops, sorry!]
>
>Next time please quote the failure report Apache returns if started
>_directly_ from the command line ( thus not by 'net start apache')
>
>
>HansH
>


Well, that almost fixed it. Now, Apache starts.

But, when I try to pull up a PHP file, I now get a Forbidden
message. It says 'You don't have permission to access /PHP/ on this
server'.

Weird.

Fred

  #9 (permalink)  
Old 06-17-2005
HansH
 
Posts: n/a
Default Re: PHP 5 Doesn't Work

"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht
news:rv84b11b8r5kknor39rv2845ukr7a27aoa@4ax.com...
> >"Fred Atkinson" <fatkinson@mishmash.com> schreef in bericht
> >news:9023b1d5a3haec9o0k020ahch1q058fu9a@4ax.com.. .
> >> On Tue, 14 Jun 2005 15:46:16 +0200, "Christian" <mcw@lockfile.org>
> >> I just downloaded the latest version of PHP 5.0. I unzipped
> >> it to the C:\PHP directory
> >> (I had deleted all files that were there before).

> >Now you probably lost your php.ini ...
> >
> >> I put these two lines of code into my httpd.conf file:
> >> LoadModule php5_module "c:/php/php5apache2.dll"
> >> AddType application/x-httpd-php .php
> >> I stopped Apache. I restarted Apache. Again, it won't restart.

> >You're running apache-1.3, than indeed php5apache2.dll will fail: try
> >php5apache.dll.
> >
> >you may need to add this line before the 'LoadModule ...'
> > LoadFile c:/php/php5ts.dll

> Well, that almost fixed it. Now, Apache starts.
>
> But, when I try to pull up a PHP file, I now get a Forbidden
> message. It says 'You don't have permission to access /PHP/ on this
> server'.

Deactivate a line like
Action application/x-httpd-php "c:/php/php.exe"
from your config
Is /PHP/ part of the URL you use to access a script?
Is /PHP/ a physical folder below the documentroot?
Where is your php.ini file located?

A relevant snippet from your error.log might shed some more light too...

HansH


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:42 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0