By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,101 Members | 1,340 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,101 IT Pros & Developers. It's quick & easy.

apache2 + PHP + RH

P: n/a
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
--
)
((
|""|-.
| :|/'
-`--'-
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.

Jul 17 '05 #2

P: n/a
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

Jul 17 '05 #3

P: n/a
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.

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

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.