apache2 + PHP + RH

This is a discussion on apache2 + PHP + RH within the PHP Language forums, part of the PHP Programming Forums category; Sorry if this was discussed earlier. I couldn't find any relevant answers from the archive. I am currently testing ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-26-2003
Sharif Islam
 
Posts: n/a
Default apache2 + PHP + RH

Sorry if this was discussed earlier. I couldn't find any relevant
answers from the archive.

I am currently testing RH Enterprise WS with the following:

httpd-2.0.46-25.ent
httpd-devel-2.0.46-25.ent
freetds-0.61

I uninstalled the php rpm, because I couldn't get freetds(database
connection to mssql server) part working. Then, I got php-4.3.4 and
installed it from scratch with following options:

../configure --with-apxs2=/usr/sbin/apxs --enable-trans-sid
--with-sybase-ct=/usr/local/freetds --with-ldap --with-gd
--with-freetype-dir --with-zlib-dir

I think I made the necessary changes in php.ini(//usr/local/lib/php.ini)
and httpd.conf. However, apache seems to not parsing the php pages. My
test pages work fine in the command prompt, but it spits out the code
as text when I access the pages from a browser.

One other option I can look into is to remove the httpd rpms and build
apache from scratch. However, I would like to avoid that, if I can make
the above work. I would appreciate any pointers. Thanks.

Happy Turkey day.

-Sharif


--
)
((
|""|-.
| :|/'
-`--'-


Reply With Quote
  #2 (permalink)  
Old 11-26-2003
clvrmnky
 
Posts: n/a
Default Re: apache2 + PHP + RH

Sharif Islam wrote:

> Sorry if this was discussed earlier. I couldn't find any relevant
> answers from the archive.
>
> I am currently testing RH Enterprise WS with the following:
>
> httpd-2.0.46-25.ent
> httpd-devel-2.0.46-25.ent
> freetds-0.61
>
> I uninstalled the php rpm, because I couldn't get freetds(database
> connection to mssql server) part working. Then, I got php-4.3.4 and
> installed it from scratch with following options:
>
> ./configure --with-apxs2=/usr/sbin/apxs --enable-trans-sid
> --with-sybase-ct=/usr/local/freetds --with-ldap --with-gd
> --with-freetype-dir --with-zlib-dir
>
> I think I made the necessary changes in php.ini(//usr/local/lib/php.ini)
> and httpd.conf. However, apache seems to not parsing the php pages. My
> test pages work fine in the command prompt, but it spits out the code
> as text when I access the pages from a browser.
>
> One other option I can look into is to remove the httpd rpms and build
> apache from scratch. However, I would like to avoid that, if I can make
> the above work. I would appreciate any pointers. Thanks.


Make sure you have Apache configured to run the module, and serve up PHP
pages. This is from memory, so you had better check Apache docs:

This was _probably_ done by the apxs2 mod installer:
LoadModule php4_module [path to mods]/libphp4.so
AddModule mod_php4.c

This was probably not done by any install script:
DirectoryIndex index.html index.php
AddType application/x-httpd-php .php .html

You need to put these in the appropriate place in the http.conf, and/or
an .htaccess file (if allowable). Removing the RPM probably removed
these entries, as well.

Reply With Quote
  #3 (permalink)  
Old 11-26-2003
clvrmnky
 
Posts: n/a
Default Re: apache2 + PHP + RH

clvrmnky wrote:

> Sharif Islam wrote:
>
>> Sorry if this was discussed earlier. I couldn't find any relevant
>> answers from the archive.
>>
>> I am currently testing RH Enterprise WS with the following:
>>
>> httpd-2.0.46-25.ent
>> httpd-devel-2.0.46-25.ent
>> freetds-0.61
>>
>> I uninstalled the php rpm, because I couldn't get freetds(database
>> connection to mssql server) part working. Then, I got php-4.3.4 and
>> installed it from scratch with following options:
>>
>> ./configure --with-apxs2=/usr/sbin/apxs --enable-trans-sid
>> --with-sybase-ct=/usr/local/freetds --with-ldap --with-gd
>> --with-freetype-dir --with-zlib-dir
>>
>> I think I made the necessary changes in php.ini(//usr/local/lib/php.ini)
>> and httpd.conf. However, apache seems to not parsing the php pages. My
>> test pages work fine in the command prompt, but it spits out the code
>> as text when I access the pages from a browser.
>>
>> One other option I can look into is to remove the httpd rpms and build
>> apache from scratch. However, I would like to avoid that, if I can make
>> the above work. I would appreciate any pointers. Thanks.

>
>
> Make sure you have Apache configured to run the module, and serve up PHP
> pages. This is from memory, so you had better check Apache docs:
>
> This was _probably_ done by the apxs2 mod installer:
> LoadModule php4_module [path to mods]/libphp4.so
> AddModule mod_php4.c
>
> This was probably not done by any install script:
> DirectoryIndex index.html index.php
> AddType application/x-httpd-php .php .html
>
> You need to put these in the appropriate place in the http.conf, and/or
> an .htaccess file (if allowable). Removing the RPM probably removed
> these entries, as well.
>

http://php.mirrors.ilisys.com.au/man...all.apache.php

Reply With Quote
  #4 (permalink)  
Old 11-26-2003
Sharif Islam
 
Posts: n/a
Default Re: apache2 + PHP + RH

clvrmnky wrote:

> Sharif Islam wrote:

[....]

>
> Make sure you have Apache configured to run the module, and serve up PHP
> pages. This is from memory, so you had better check Apache docs:
>
> This was _probably_ done by the apxs2 mod installer:
> LoadModule php4_module [path to mods]/libphp4.so
> AddModule mod_php4.c
>
> This was probably not done by any install script:
> DirectoryIndex index.html index.php
> AddType application/x-httpd-php .php .html

Thanks.
Ya, that was it. I had the AddType in a wrong place. Now I need to
figure out the freetds part.

--
)
((
|""|-.
| :|/'
-`--'-

Reply With Quote
Reply
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 12:07 AM.


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