LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   PHP5 and Apache2 doesn't cope om Debian 4,0 (AMD64) (https://www.linuxquestions.org/questions/linux-server-73/php5-and-apache2-doesnt-cope-om-debian-4-0-amd64-617739/)

bumbibear 01-31-2008 02:08 PM

PHP5 and Apache2 doesn't cope om Debian 4,0 (AMD64)
 
Hi, does any one have succeeded with PHP5 and Apache2 on Debian 4.0?


I can't get PHP to work inside HTML-pages,
I've tested PHP, open a file (test.php) with Firefox containing following code

<?php phpinfo()?>;


with no luck, only the source code was displayed in the browser window.

php5 -v

gave this output:

PHP 5.2.0-8+etch10 (cli) (built: Jan 18 2008 18:32:56)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies


so my conclusion after couple of reinstallations an reconfiguratiations is: PHP5 works but doesn't cope with Apache2, and I think it's a configuratiations issue, but I can't get any further du to lack of knowledge and the complexity of the config files involved, or is it maybe a "bug" in the software :confused:

Is there any "Linux guru" who knows how to tweek the configs files correctly?

Thanks in advance!

bumbibear 01-31-2008 02:52 PM

Quote:

Originally Posted by bumbibear (Post 3041436)
Hi, does any one have succeeded with PHP5 and Apache2 on Debian 4.0?


I can't get PHP to work inside HTML-pages,
I've tested PHP, open a file (test.php) with Firefox containing following code

<?php phpinfo()?>;


with no luck, only the source code was displayed in the browser window.

php5 -v

gave this output:

PHP 5.2.0-8+etch10 (cli) (built: Jan 18 2008 18:32:56)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies


so my conclusion after couple of reinstallations an reconfiguratiations is: PHP5 works but doesn't cope with Apache2, and I think it's a configuratiations issue, but I can't get any further du to lack of knowledge and the complexity of the config files involved, or is it maybe a "bug" in the software :confused:

Is there any "Linux guru" who knows how to tweek the configs files correctly?

Thanks in advance!

Hallo again,

I've found the solution written by FARSLAYER i this forum, look here below! I copied his holy advice here:D
------------------------------------------
Now edit httpd.conf using Kwrite or a similar program.

Search inside the file for "LoadModule rewrite_module lib"(hit ctrl + f to search).

Underneath this line type: LoadModule php5_module /usr/lib/apache2/libphp5.so

The directories above just happens to be were my "libphp5.so" file happens to be for me. Type in console: locate libphp5.so

That will tell you were your libphp5.so file is.

Now search the file (ctrl +f) for "AddType application/x-gzip"
Underneath this line add the following two lines:

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

Save httpd.conf

Now go back into console and type: apachectl start

-------------------------------------------------------------

Bye


All times are GMT -5. The time now is 06:27 PM.