Connecting Tech Pros Worldwide Help | Site Map

PHP5 and APACHE2 work but not best

 
LinkBack Thread Tools Search this Thread
  #1  
Old June 30th, 2006, 03:35 PM
Steel
Guest
 
Posts: n/a
Default PHP5 and APACHE2 work but not best

Hi at all

I installed locally the server APACHE 2 and PHP 5
I configured PHP as CGI with the folloring code into the apache
configuration file

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

I choice to configure as CGI becasuse the following code not work

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

PHPIniDir "C:/WINDOWS"

Configuring PHP as CGI at home locally it work but not so better like on
line and it do rot return me many variables value of my script.

phpinfo() return:
PHP Version 5.1.2



System Windows 9x PC 4.10
Build Date Jan 11 2006 16:35:21
Configure Command cscript /nologo configure.js "--enable-snapshot-build"
"--with-gd=shared"
Server API CGI/FastCGI
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINDOWS\PHP.ini
PHP API 20041225
PHP Extension 20050922
Zend Extension 220051025
Debug Build no
Thread Safety enabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, http, ftp, compress.zlib
Registered Stream Socket Transports tcp, udp
Registered Stream Filters convert.iconv.*, string.rot13, string.toupper,
string.tolower, string.strip_tags, convert.*, zlib.*


Please what can I do to work best?

Regards

Steel




  #2  
Old June 30th, 2006, 03:45 PM
JDS
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best

On Fri, 30 Jun 2006 15:37:04 +0000, Steel wrote:
[color=blue]
> Please what can I do to work best?[/color]

Huh?
--
JDS

  #3  
Old June 30th, 2006, 03:45 PM
JDS
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best

On Fri, 30 Jun 2006 11:42:26 -0400, JDS wrote:
[color=blue]
> Huh?[/color]

Actually, let me clarify.

Your English is not clear enough for me to understand what you are asking.
You speak Italian? I don't, but I bet there is someone here that does.
Post your question in Italian (or whatever your native language).

--
JDS

  #4  
Old June 30th, 2006, 03:55 PM
David Haynes
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best

Steel wrote:[color=blue]
> Hi at all
>
> I installed locally the server APACHE 2 and PHP 5
> I configured PHP as CGI with the folloring code into the apache
> configuration file
>
> ScriptAlias /php/ "c:/php/"
> AddType application/x-httpd-php .php
> Action application/x-httpd-php "/php/php-cgi.exe"
>
> I choice to configure as CGI becasuse the following code not work
>
> LoadModule php5_module "c:/php/php5apache2.dll"
> AddType application/x-httpd-php .php
>
> PHPIniDir "C:/WINDOWS"
>
> Configuring PHP as CGI at home locally it work but not so better like on
> line and it do rot return me many variables value of my script.
>
> phpinfo() return:
> PHP Version 5.1.2
>
>
>
> System Windows 9x PC 4.10
> Build Date Jan 11 2006 16:35:21
> Configure Command cscript /nologo configure.js "--enable-snapshot-build"
> "--with-gd=shared"
> Server API CGI/FastCGI
> Virtual Directory Support enabled
> Configuration File (php.ini) Path C:\WINDOWS\PHP.ini
> PHP API 20041225
> PHP Extension 20050922
> Zend Extension 220051025
> Debug Build no
> Thread Safety enabled
> Zend Memory Manager enabled
> IPv6 Support enabled
> Registered PHP Streams php, file, http, ftp, compress.zlib
> Registered Stream Socket Transports tcp, udp
> Registered Stream Filters convert.iconv.*, string.rot13, string.toupper,
> string.tolower, string.strip_tags, convert.*, zlib.*
>
>
> Please what can I do to work best?
>
> Regards
>
> Steel
>
>
>[/color]

A couple of things...
1. Running PHP as a CGI will be slower than running it as a native
Apache module. This is probably where you are getting the poor
response from.
2. You say
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/WINDOWS"
does not work for you. I *think* it is because your php.ini file is in
c:/php not c:/WINDOWS.
3. Please try again with the LoadModule option and post a copy of
the output of phpinfo() - It will help us get it all working for you.

-david-

  #5  
Old June 30th, 2006, 04:55 PM
Steel
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best


"David Haynes"

KINDLY wrote:
[color=blue]
> A couple of things...
> 1. Running PHP as a CGI will be slower than running it as a native
> Apache module. This is probably where you are getting the poor
> response from.
> 2. You say
> LoadModule php5_module "c:/php/php5apache2.dll"
> AddType application/x-httpd-php .php
> PHPIniDir "C:/WINDOWS"
> does not work for you. I *think* it is because your php.ini file is in
> c:/php not c:/WINDOWS.
> 3. Please try again with the LoadModule option and post a copy of
> the output of phpinfo() - It will help us get it all working for you.
>
> -david-
>[/color]

I tryed again to add

LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/WINDOWS/"
#I am sure that PHP.ini is into the windows direcory

but Apache not accept these lines and when I try to start APACHE it open
obly a moment the MS-dos windows console and do not run.

I tryed line per line and I noted that APACHE accept only the second line

AddType application/x-httpd-php .php

It close immediately the windows if I add the first
LoadModule php5_module "c:/php/php5apache2.dll"
ant 3th line
PHPIniDir "C:/WINDOWS/"

Therefore I have not a copy of the PHPINFO() output because nothing work


Regards

Steel


  #6  
Old June 30th, 2006, 04:55 PM
David Haynes
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best

Steel wrote:[color=blue]
> "David Haynes"
>
> KINDLY wrote:
>[color=green]
>> A couple of things...
>> 1. Running PHP as a CGI will be slower than running it as a native
>> Apache module. This is probably where you are getting the poor
>> response from.
>> 2. You say
>> LoadModule php5_module "c:/php/php5apache2.dll"
>> AddType application/x-httpd-php .php
>> PHPIniDir "C:/WINDOWS"
>> does not work for you. I *think* it is because your php.ini file is in
>> c:/php not c:/WINDOWS.
>> 3. Please try again with the LoadModule option and post a copy of
>> the output of phpinfo() - It will help us get it all working for you.
>>
>> -david-
>>[/color]
>
> I tryed again to add
>
> LoadModule php5_module "c:/php/php5apache2.dll"
> AddType application/x-httpd-php .php
> PHPIniDir "C:/WINDOWS/"
> #I am sure that PHP.ini is into the windows direcory
>
> but Apache not accept these lines and when I try to start APACHE it open
> obly a moment the MS-dos windows console and do not run.
>
> I tryed line per line and I noted that APACHE accept only the second line
>
> AddType application/x-httpd-php .php
>
> It close immediately the windows if I add the first
> LoadModule php5_module "c:/php/php5apache2.dll"
> ant 3th line
> PHPIniDir "C:/WINDOWS/"
>
> Therefore I have not a copy of the PHPINFO() output because nothing work
>
>
> Regards
>
> Steel
>
>[/color]
Which version of php and apache are you using?

-david-

  #7  
Old June 30th, 2006, 05:05 PM
Jerry Stuckle
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best

Steel wrote:[color=blue]
> "David Haynes"
>
> KINDLY wrote:
>
>[color=green]
>>A couple of things...
>>1. Running PHP as a CGI will be slower than running it as a native
>>Apache module. This is probably where you are getting the poor
>>response from.
>>2. You say
>>LoadModule php5_module "c:/php/php5apache2.dll"
>>AddType application/x-httpd-php .php
>>PHPIniDir "C:/WINDOWS"
>>does not work for you. I *think* it is because your php.ini file is in
>>c:/php not c:/WINDOWS.
>>3. Please try again with the LoadModule option and post a copy of
>>the output of phpinfo() - It will help us get it all working for you.
>>
>>-david-
>>[/color]
>
>
> I tryed again to add
>
> LoadModule php5_module "c:/php/php5apache2.dll"
> AddType application/x-httpd-php .php
> PHPIniDir "C:/WINDOWS/"
> #I am sure that PHP.ini is into the windows direcory
>
> but Apache not accept these lines and when I try to start APACHE it open
> obly a moment the MS-dos windows console and do not run.
>
> I tryed line per line and I noted that APACHE accept only the second line
>
> AddType application/x-httpd-php .php
>
> It close immediately the windows if I add the first
> LoadModule php5_module "c:/php/php5apache2.dll"
> ant 3th line
> PHPIniDir "C:/WINDOWS/"
>
> Therefore I have not a copy of the PHPINFO() output because nothing work
>
>
> Regards
>
> Steel
>
>[/color]

What happens if you open a MS-DOS prompt, CD to the Apache binary directory and type

httpd -f (path to your httpd.conf file)

You should get some error messages as to why Apache won't run.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  #8  
Old June 30th, 2006, 05:15 PM
David Haynes
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best

Jerry Stuckle wrote:[color=blue]
> What happens if you open a MS-DOS prompt, CD to the Apache binary
> directory and type
>
> httpd -f (path to your httpd.conf file)
>
> You should get some error messages as to why Apache won't run.[/color]

Jerry:
I'm thinking either:
a) php is not installed in c: (low probability), or
b) he is using php 5.1.2 with Apache 5.2. The php5apache2.dll that
comes with the standard bundle is not compiled for Apache 5.2 (AFAIK).

-david-

  #9  
Old June 30th, 2006, 07:05 PM
Jerry Stuckle
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best

David Haynes wrote:[color=blue]
> Jerry Stuckle wrote:
>[color=green]
>> What happens if you open a MS-DOS prompt, CD to the Apache binary
>> directory and type
>>
>> httpd -f (path to your httpd.conf file)
>>
>> You should get some error messages as to why Apache won't run.[/color]
>
>
> Jerry:
> I'm thinking either:
> a) php is not installed in c: (low probability), or
> b) he is using php 5.1.2 with Apache 5.2. The php5apache2.dll that
> comes with the standard bundle is not compiled for Apache 5.2 (AFAIK).
>
> -david-
>[/color]

Either one could be. Starting from the command line should show some errors,
which will make things easier to diagnose.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  #10  
Old July 1st, 2006, 03:25 AM
Jim Carlock
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best

Steel posted:[color=blue]
> ScriptAlias /php/ "c:/php/"
> AddType application/x-httpd-php .php
> Action application/x-httpd-php "/php/php-cgi.exe"
>
> I choice to configure as CGI becasuse the following code not
> work
>
> LoadModule php5_module "c:/php/php5apache2.dll"
> AddType application/x-httpd-php .php
>
> PHPIniDir "C:/WINDOWS"[/color]

Does the httpd.conf require a mod_php5.c file. I have a the
following in my httpd.conf.

# Add the mod_php4.c
AddModule mod_php4.c

Hope this helps.

--
Jim Carlock
Post replies to the group.


  #11  
Old July 1st, 2006, 09:15 AM
Steel
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best


"JDS"
wrote

You speak Italian?[color=blue]
>[/color]
JDS[color=blue]
>[/color]

Italian?

Italians are stupids peoples!!!

Think that in this momrent in whole Italian beachs there are the most
beautifull girls of Europe and Italian boys (the stupids) are on the beach
to try to translate the sighs of girls produced by languide caresses maked
by the stupids italian boys to the girls instead of to be here to translate
my post.


  #12  
Old July 1st, 2006, 09:45 AM
Steel
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best


"Jim Carlock" <anonymous@127.0.0.1> ha scritto nel messaggio
news:6Ylpg.26045$LT2.12775@tornado.tampabay.rr.com ...[color=blue]
> Steel posted:[color=green]
> > ScriptAlias /php/ "c:/php/"
> > AddType application/x-httpd-php .php
> > Action application/x-httpd-php "/php/php-cgi.exe"
> >
> > I choice to configure as CGI becasuse the following code not
> > work
> >
> > LoadModule php5_module "c:/php/php5apache2.dll"
> > AddType application/x-httpd-php .php
> >
> > PHPIniDir "C:/WINDOWS"[/color]
>
> Does the httpd.conf require a mod_php5.c file. I have a the
> following in my httpd.conf.
>
> # Add the mod_php4.c
> AddModule mod_php4.c
>
> Hope this helps.
>
> --
> Jim Carlock
> Post replies to the group.
>
>[/color]

No!
I am sorry but it continue to not work

It run only as cgi and not best

Steel


  #13  
Old July 1st, 2006, 01:55 PM
Jerry Stuckle
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best

Steel wrote:[color=blue]
> "Jim Carlock" <anonymous@127.0.0.1> ha scritto nel messaggio
> news:6Ylpg.26045$LT2.12775@tornado.tampabay.rr.com ...
>[color=green]
>>Steel posted:
>>[color=darkred]
>>>ScriptAlias /php/ "c:/php/"
>>>AddType application/x-httpd-php .php
>>>Action application/x-httpd-php "/php/php-cgi.exe"
>>>
>>>I choice to configure as CGI becasuse the following code not
>>>work
>>>
>>>LoadModule php5_module "c:/php/php5apache2.dll"
>>>AddType application/x-httpd-php .php
>>>
>>>PHPIniDir "C:/WINDOWS"[/color]
>>
>>Does the httpd.conf require a mod_php5.c file. I have a the
>>following in my httpd.conf.
>>
>># Add the mod_php4.c
>>AddModule mod_php4.c
>>
>>Hope this helps.
>>
>>--
>>Jim Carlock
>>Post replies to the group.
>>
>>[/color]
>
>
> No!
> I am sorry but it continue to not work
>
> It run only as cgi and not best
>
> Steel
>
>[/color]

You don't give us enough information to go on to help you solve your problem!
What happens if you start Apache from a command line prompt like I indicated before?


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  #14  
Old July 1st, 2006, 02:45 PM
Steel
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best


"Jerry Stuckle"
[color=blue]
> You don't give us enough information to go on to help you solve your[/color]
problem![color=blue]
> What happens if you start Apache from a command line prompt like I[/color]
indicated before?[color=blue]
>[/color]
I'll try the next week

Thank you at all

Steel


  #15  
Old July 1st, 2006, 05:35 PM
ImOk
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best

This has worked for me under Windows XP. My PHP5 and PHP.INI file is
installed in C:\PHP5

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

Also, make sure you take into account case sensitivity. I believe
Apache is sensitive to these things especially in the Alias section

AliasMatch /[aA][sS][tT][yY][xX]($|/.*) "C:/PHP5Apps/Astyx$1"

<Directory "C:/PHP5Apps/Astyx">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>


Steel wrote:[color=blue]
> "Jerry Stuckle"
>[color=green]
> > You don't give us enough information to go on to help you solve your[/color]
> problem![color=green]
> > What happens if you start Apache from a command line prompt like I[/color]
> indicated before?[color=green]
> >[/color]
> I'll try the next week
>
> Thank you at all
>
> Steel[/color]

  #16  
Old July 2nd, 2006, 12:25 AM
JDS
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best

On Sat, 01 Jul 2006 09:21:51 +0000, Steel wrote:
Quote:
"JDS"
wrote
>
You speak Italian?
Quote:
>>
JDS
Quote:
>>
>
Italian?
>
Italians are stupids peoples!!!
Allright then, I didn't mean to touch a nerve!

I just saw "libero.it" in your post's headers in several places. I was
just hazarding a guess.

Where are you from, then? What language do you prefer to speak?

--
JDS | jeffrey@go.away.com
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

  #17  
Old July 3rd, 2006, 07:45 AM
Steel
Guest
 
Posts: n/a
Default Re: PHP5 and APACHE2 work but not best


"JDS"
wrote .......................
Quote:
Allright then, I didn't mean to touch a nerve!
>
JDS
Nothing nerve...............

...........also me during week end I am a fun of translation of girls's sighs
on the beach

Steel


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.