You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Sharif Islam <mi...@ux1.cso.uiuc.edu> on 2003/11/26 21:43:01 UTC

[users@httpd] Apache2 + PHP + Red Hat

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

-- 
Sharif Islam                                         mislam@uiuc.edu
Library Systems Office                     http://www.sharifislam.com
University of Illinois at Urbana-Champaign



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache2 + PHP + Red Hat

Posted by David Gonzalez <dg...@rafastd.org>.
Hello Sharif,

Wednesday, November 26, 2003, 3:43:01 PM, you wrote:


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

SI> I am currently testing RH Enterprise WS with the following:

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

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

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

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

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

SI> Happy Turkey day.


Well use the AddType directive like this:

AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php .php3

# If you want to display PHP source 

AddType application/x-httpd-php-source .phps

Bear  in  mind  that  you can also parse .html pages with php enbedded like they
were PHP pages.

HTH

-- 
Best regards,
 David                            mailto:dgonzalez@rafastd.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org