LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-31-2008, 02:08 PM   #1
bumbibear
LQ Newbie
 
Registered: Nov 2007
Distribution: Slamd64
Posts: 3

Rep: Reputation: 0
Question 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

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

Thanks in advance!
 
Old 01-31-2008, 02:52 PM   #2
bumbibear
LQ Newbie
 
Registered: Nov 2007
Distribution: Slamd64
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bumbibear View Post
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

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
------------------------------------------
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php5 not working with apache2 in debian 4.0 mohtasham1983 Linux - Server 2 08-08-2007 09:19 PM
Apache2 and php5 barrythai Mandriva 2 05-08-2007 08:09 AM
Debian / Apache2 / PHP5 / Firefox not parsing locally Garybtx Linux - Server 2 11-13-2006 06:57 PM
Apache2 and PHP5 SpiderIRE Linux - Software 3 09-30-2005 03:25 PM
Apache2 + PHP5.0.3 24jedi *BSD 1 07-21-2005 03:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration