Connecting Tech Pros Worldwide Help | Site Map

PHP Question -Simple right?

ExecMan
Guest
 
Posts: n/a
#1: Nov 15 '06

Hi All,

I'm sure all the guru's know this one, but I cannot find it. I just
installed Luinx. I configured Apache and got everything up and
running.

When I do my PHP test, it asks me to download the file, rather than
displaying the info on the screen.

Now, I added the following lines to the httpd.conf:

LoadModule php4_module /usr/lib/httpd/modules/libphp4.so

AddType application/x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps

DirectoryIndex index.html index.php index.html.var

And I restarted the server........no good. It displays HTML documents,
but not PHP documents. Can anyone help? I've been at this for more
then 4 hours now.......

Thanks!

CptDondo
Guest
 
Posts: n/a
#2: Nov 15 '06

re: PHP Question -Simple right?


ExecMan wrote:
Quote:
>
And I restarted the server........no good. It displays HTML documents,
but not PHP documents. Can anyone help? I've been at this for more
then 4 hours now.......
>
What do the apache access log and error log show? (the names and
locations vary by distro....)

--Yan
ExecMan
Guest
 
Posts: n/a
#3: Nov 15 '06

re: PHP Question -Simple right?



CptDondo wrote:
Quote:
ExecMan wrote:
>
Quote:

And I restarted the server........no good. It displays HTML documents,
but not PHP documents. Can anyone help? I've been at this for more
then 4 hours now.......
>
What do the apache access log and error log show? (the names and
locations vary by distro....)
>
--Yan
Here are clips from the access log:

192.168.1.100 - - [14/Nov/2006:17:57:12 -0600] "GET /phpinfo.php
HTTP/1.1" 304 -
192.168.1.100 - - [14/Nov/2006:18:06:33 -0600] "GET /phpinfo.php
HTTP/1.1" 304 -
192.168.1.100 - - [14/Nov/2006:18:06:44 -0600] "GET /test.html
HTTP/1.1" 304 -
192.168.1.100 - - [14/Nov/2006:18:23:04 -0600] "GET /phpinfo.php
HTTP/1.1" 304 -

Here are clips from the error log:

[Tue Nov 14 18:35:51 2006] [error] an unknown filter was not added: PHP
[Tue Nov 14 18:35:51 2006] [error] an unknown filter was not added: PHP

And, not sure if this means anything, but why does it say Forbidden?
Quote:
>curl -I localhost

HTTP/1.1 403 Forbidden
Date: Tue, 14 Nov 2006 23:34:33 GMT
Server: Apache/2.0.52 (CentOS)
Connection: close
Content-Type: text/html; charset=iso-8859-1

Thanks for the reply.

BKDotCom
Guest
 
Posts: n/a
#4: Nov 15 '06

re: PHP Question -Simple right?


Did you install PHP-4 or 5?


ExecMan wrote:
Quote:
Hi All,
>
I'm sure all the guru's know this one, but I cannot find it. I just
installed Luinx. I configured Apache and got everything up and
running.
>
When I do my PHP test, it asks me to download the file, rather than
displaying the info on the screen.
>
Now, I added the following lines to the httpd.conf:
>
LoadModule php4_module /usr/lib/httpd/modules/libphp4.so
>
AddType application/x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps
>
DirectoryIndex index.html index.php index.html.var
>
And I restarted the server........no good. It displays HTML documents,
but not PHP documents. Can anyone help? I've been at this for more
then 4 hours now.......
>
Thanks!
ExecMan
Guest
 
Posts: n/a
#5: Nov 15 '06

re: PHP Question -Simple right?



Well, whatever came with the OS when I installed it......

[root@nytelife httpd]# php -v
PHP 4.3.9 (cgi) (built: Jul 12 2006 13:40:25)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies




BKDotCom wrote:
Quote:
Did you install PHP-4 or 5?
>
>
ExecMan wrote:
Quote:
Hi All,

I'm sure all the guru's know this one, but I cannot find it. I just
installed Luinx. I configured Apache and got everything up and
running.

When I do my PHP test, it asks me to download the file, rather than
displaying the info on the screen.

Now, I added the following lines to the httpd.conf:

LoadModule php4_module /usr/lib/httpd/modules/libphp4.so

AddType application/x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps

DirectoryIndex index.html index.php index.html.var

And I restarted the server........no good. It displays HTML documents,
but not PHP documents. Can anyone help? I've been at this for more
then 4 hours now.......

Thanks!
ExecMan
Guest
 
Posts: n/a
#6: Nov 15 '06

re: PHP Question -Simple right?



ExecMan wrote:
Quote:
Well, whatever came with the OS when I installed it......
>
[root@nytelife httpd]# php -v
PHP 4.3.9 (cgi) (built: Jul 12 2006 13:40:25)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
>
>
>
>
BKDotCom wrote:
Quote:
Did you install PHP-4 or 5?


ExecMan wrote:
Quote:
Hi All,
>
I'm sure all the guru's know this one, but I cannot find it. I just
installed Luinx. I configured Apache and got everything up and
running.
>
When I do my PHP test, it asks me to download the file, rather than
displaying the info on the screen.
>
Now, I added the following lines to the httpd.conf:
>
LoadModule php4_module /usr/lib/httpd/modules/libphp4.so
>
AddType application/x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps
>
DirectoryIndex index.html index.php index.html.var
>
And I restarted the server........no good. It displays HTML documents,
but not PHP documents. Can anyone help? I've been at this for more
then 4 hours now.......
>
Thanks!

Hey Everyone,

Fixed......remember: Never read the user manual.....they always have
typos and you wind up putting in the wrong parameters into your config
file!!!!

Closed Thread


Similar PHP bytes