LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 12-26-2004, 08:13 AM   #1
JJX
Member
 
Registered: Mar 2004
Location: Greece
Distribution: Debian
Posts: 339

Rep: Reputation: 31
Debain apache2 + php


Is there any php5 package for apache2?

I have php4 now but i want to update to php5 (because of the class-object system & exception handling)

thx
 
Old 06-10-2005, 12:52 PM   #2
wineo
LQ Newbie
 
Registered: Jun 2005
Location: Perth, Australia
Distribution: Debian 31r0a
Posts: 8

Rep: Reputation: 0
Anyone know?! I am also interested in the answer!
 
Old 06-11-2005, 02:59 AM   #3
swmok
Member
 
Registered: Jul 2003
Posts: 152

Rep: Reputation: 30
Hi JJX:

I am sorry that I ask another question?

I've installed the apache2 and php4 in my newly installed Debian 3.1.

I just type in the following command.

apt-get install apache2
and
apt-get install php4

However, the php4 doesn't work.

What configure should I need to do?

Thanks.
 
Old 06-11-2005, 08:28 AM   #4
wineo
LQ Newbie
 
Registered: Jun 2005
Location: Perth, Australia
Distribution: Debian 31r0a
Posts: 8

Rep: Reputation: 0
I believe that apt-get install php4 should work find. If you are having problems then it may be the source that you are trying to get it from???

I have heard now that you have to actually download and compile php5... can anyone point me in the right direction?

Thanks,
wineo
 
Old 06-11-2005, 09:10 AM   #5
Creak
Member
 
Registered: Feb 2004
Distribution: debian
Posts: 187

Rep: Reputation: 30
swmok: try something like apt-get install libapache2-mod-php4

If there is a solution for installing php5, i'm interested too!
 
Old 06-11-2005, 10:14 AM   #6
wineo
LQ Newbie
 
Registered: Jun 2005
Location: Perth, Australia
Distribution: Debian 31r0a
Posts: 8

Rep: Reputation: 0
I just used:
and uncompressed it into /usr/src. I am now trying to ./configure , but this is coming up...
Code:
checking libxml2 install dir... no
configure: error: xml2-config not found. Please check your libxml2 installation.
I have used apt-get install libxml2 and attempted the config again and the same error appears again. Grrr...

Can anyone help me here?
 
Old 06-11-2005, 10:58 AM   #7
wineo
LQ Newbie
 
Registered: Jun 2005
Location: Perth, Australia
Distribution: Debian 31r0a
Posts: 8

Rep: Reputation: 0
OK...
Code:
apt-get install libxml2-dev
fixed that!
 
Old 06-30-2005, 04:18 AM   #8
b.clarke
LQ Newbie
 
Registered: Jun 2005
Location: Christchurch, New Zealand
Distribution: Debian
Posts: 1

Rep: Reputation: 0
php5 can be obtained by adding the following lines to your sources.list:
To use PHP5 with Apache2, you will need to get the 'libapache2-mod-php5' module. This will install PHP5 so it can be accessed by Apache2. Note that this package only has a very basic configuration of PHP. To add XML support, for example, you have to download and install additional PHP5 packages that add this.

To use PHP5 with earlier versions of Apache (eg 1.3) do an apt-cache search to find out the name of the package you need - it will be quite similar to the apache2 package name

*You can use either woody or sid - I found the woody source didn't work when I tried it

Last edited by b.clarke; 07-02-2005 at 11:55 PM.
 
Old 08-09-2005, 12:04 PM   #9
0badiah
LQ Newbie
 
Registered: Aug 2005
Location: Richmond VA
Distribution: Kubuntu
Posts: 2

Rep: Reputation: 0
PHP4 and PHP5 together

I am trying to get php4 and php5 running together. I am coming from Mandrake (Mandriva) and was able to install php4 as a module and php5 as cgi on Apache 1.3. I had .php5 extension handled by php5-cgi and .php was handled by the php4 module. Does anyone have any thoughts about how to create a similar set up with Apache2? Basically I just want .php5 files to be handled by PHP5 and .php files to be handled by PHP4. Thanks!
 
Old 08-10-2005, 08:06 AM   #10
slacky
Member
 
Registered: Feb 2004
Location: USA
Distribution: Debian
Posts: 174

Rep: Reputation: 16
Code:
<Location /kerb>
    Options +ExecCGI
    AddHandler cgi-script .php
</Location>

# 6-27-2005 config to run PHP as CGI
<Files ~ "\.(phpcgi)$">
    SetHandler cgi-script
    Options +ExecCGI
</Files>
Hi,

Here's what I've done. The first section causes any *.php files in the "kerb" folder only to be run as CGI instead of mod-php. The second section causes any *.phpcgi files anywhere in the web site to run as CGI - you can easily change to *.php5 or whatever.

For CGI, the script is run by whatever program is specified in the first "shebang" line at the top of the script - you can specify the patch to either the PHP4 CGI executable or the PHP5 per script.

Also, Apache supposedly has a way where if you put the PHP executable in the web root or in /cgi-bin or wherever - you can run the script as PHP4 or PHP5 per Apache config rather than needing the shebang line and remembering to chmod each script executable. This might even be more of what you want to do, but their are security concerns with doing it this way if PHP hasn't been configured for it.
 
  


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
Apache2.0.52, t1lib-5.0.2, php-apache2-5.0.2 wizard7423 Slackware 2 04-04-2011 09:09 PM
Apache2 and PHP unreal128 Suse/Novell 0 05-10-2005 09:51 PM
php5 apache2 mysql4 don't work, php does not seem to read php.ini atom Linux - Software 5 03-24-2005 12:05 PM
PHP 4.3.4 on Apache2 wenberg Linux - Software 3 02-08-2004 01:03 PM
Apache2 and PhP wolfwolf Linux - Networking 0 03-13-2003 12:43 AM


All times are GMT -5. The time now is 11:03 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration