You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Will Dowling <wi...@nuim.ie> on 2005/03/31 15:38:40 UTC
[users@httpd] Apache not handling PHP files properly
Hey all,
I am running Solaris 9, with Apache 2.0.53 and PHP4.3.10.
My problem is that when I goto view a HTML page it works
perfect but when I goto view a PHP page all it does is show
the source code. It looks as if Apache isn't handling it
properly
These are the steps to which I have configured both Apache
and PHP.
Apache
./configure --prefix=/usr/local/apache2 --enable-module=so
--enable-mods-shared=all --enable-ssl=shared --enable-ssl
--with-ssl=/usr/local/ssl
make && make install
PHP
./configure --with-apxs2=/usr/local/apache2/bin/apxs
--with-zlib=/usr/local
make && makeinstall
Everything in php.ini is fine.
In my httpd.conf I added:
LoadModule php4_module libexec/libphp4.so
and also :
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
I also experimented with adding :
AddModule mod_php.c
but to no avail.
PHP works just fine on its own(I tested it via command line)
so I guess it has something todo with the modules.
Has anyone got any ideas?
Cheers,
Will
.
---------------------------------------------------------------------
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] Apache not handling PHP files properly
Posted by "Ivan Barrera A." <Br...@Ivn.cl>.
Will Dowling wrote:
> Hey all,
> I am running Solaris 9, with Apache 2.0.53 and PHP4.3.10.
> My problem is that when I goto view a HTML page it works
> perfect but when I goto view a PHP page all it does is show
> the source code. It looks as if Apache isn't handling it
> properly
What does the log says ??
error and access log ?
>
> These are the steps to which I have configured both Apache
> and PHP.
>
> Apache
>
> ./configure --prefix=/usr/local/apache2 --enable-module=so
> --enable-mods-shared=all --enable-ssl=shared --enable-ssl
> --with-ssl=/usr/local/ssl
>
> make && make install
>
> PHP
>
> ./configure --with-apxs2=/usr/local/apache2/bin/apxs
> --with-zlib=/usr/local
>
> make && makeinstall
>
> Everything in php.ini is fine.
>
> In my httpd.conf I added:
>
> LoadModule php4_module libexec/libphp4.so
> and also :
> AddType application/x-httpd-php .php .phtml
> AddType application/x-httpd-php-source .phps
>
> I also experimented with adding :
> AddModule mod_php.c
> but to no avail.
>
> PHP works just fine on its own(I tested it via command line)
> so I guess it has something todo with the modules.
> Has anyone got any ideas?
> Cheers,
>
> Will
>
>
> .
>
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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] Apache not handling PHP files properly
Posted by Craig Dunigan <cd...@doit.wisc.edu>.
What happens when you try to view the page from localhost on the Sun box?
On Thu, 31 Mar 2005, Will Dowling wrote:
>
> Hey all,
> I am running Solaris 9, with Apache 2.0.53 and PHP4.3.10.
> My problem is that when I goto view a HTML page it works
> perfect but when I goto view a PHP page all it does is show
> the source code. It looks as if Apache isn't handling it
> properly
>
> These are the steps to which I have configured both Apache
> and PHP.
>
> Apache
>
> ./configure --prefix=/usr/local/apache2 --enable-module=so
> --enable-mods-shared=all --enable-ssl=shared --enable-ssl
> --with-ssl=/usr/local/ssl
>
> make && make install
>
> PHP
>
> ./configure --with-apxs2=/usr/local/apache2/bin/apxs
> --with-zlib=/usr/local
>
> make && makeinstall
>
> Everything in php.ini is fine.
>
> In my httpd.conf I added:
>
> LoadModule php4_module libexec/libphp4.so
> and also :
> AddType application/x-httpd-php .php .phtml
> AddType application/x-httpd-php-source .phps
>
> I also experimented with adding :
> AddModule mod_php.c
> but to no avail.
>
> PHP works just fine on its own(I tested it via command line)
> so I guess it has something todo with the modules.
> Has anyone got any ideas?
> Cheers,
>
> Will
>
>
> .
>
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
--
Craig Dunigan
---------------------------------------------------------------------
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