Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th February 2006, 14:05
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,263
Thanks: 216
Thanked 649 Times in 295 Posts
Question php5 and php4 at the same time

I have read this "how to" with great interest:

http://www.howtoforge.com/apache2_with_php5_and_php4

I have a question about it:

Is it possible to add this as a little extra to a server running Debian 3.1 according "the perfect setup" including ISPConfig?

Or do i have to do this in another way?
Reply With Quote
Sponsored Links
  #2  
Old 10th February 2006, 15:58
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by Hans
Is it possible to add this as a little extra to a server running Debian 3.1 according "the perfect setup" including ISPConfig?
Yes, but I'd then put
Code:
AddHandler php-script .php4
Action php-script /cgi-bin/php4
into each Vhost seperately (using the Apache Directives field of ISPConfig) because otherwise PHP4 is always on (for every web site).
Also check the PHP5 configuration: PHP5 should not be enabled globally, so you must change /etc/apache2/mods_available/php5.conf (otherwise PHP5 is enabled for every web site, no matter what you specify in ISPConfig).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 15th February 2006, 01:23
gog gog is offline
Junior Member
 
Join Date: Feb 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've done it just today. I had a stable debian sarge system, running apache2, mysql-4.1, and php4 (all the modules installed in "the perfect setup").

I've decided to let php4 run like apache2 module, as it is in "the perfect setup", and I just wanted to add php5 as a cgi.

I just ran:

apt-get install php5-cgi

Then I had to edit my "httpd.conf" file, or better to say one virtaul host's directives. A added a line in one of the <VirutalHost...> entries:

Code:
AddHandler php-scriptt .php
Action php-scriptt /cgi-bin/php5
Notice the 2 tt's in the config file!!! I had to do it this way cause otherwise php4 always parsed the file in that directory, even when I tried to use .php5 extension.

I also added "Options +ExecCGI" to that directory, just in case, not shure if it's really needed.

This works like a charm, a can set php4/php5 on "per virtualhost" bases, or even per directory if I want to. Also, I don't need to change extension and do a search&replace on every skript that needs to be in PHP5. Not to mention the trouble you have to go, upgradeing one og these scripts...

It's kinda late now, have to catch some sleep I just need to install a cople more things, I want to install

Code:
apt-get install php5-curl php5-dev php5-gd php5-gmp php5-imap php5-ldap php5-mcrypt php5-mhash php5-ming php5-mysql php5-mysqli php5-odbc php5-pdo-mysql php5-pdo-sqlite php5-pear php5-pspell php5-snmp php5-sybase php5-tidy
(I'm not touching any php4 modules)

but I get a warning

Code:
The following packages will be REMOVED:
  php4-dev php4-pear
Hm, what to do? I would really like to leave pear repository for php4...

Last edited by gog; 15th February 2006 at 01:25.
Reply With Quote
  #4  
Old 15th February 2006, 10:32
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by gog
It's kinda late now, have to catch some sleep I just need to install a cople more things, I want to install

Code:
apt-get install php5-curl php5-dev php5-gd php5-gmp php5-imap php5-ldap php5-mcrypt php5-mhash php5-ming php5-mysql php5-mysqli php5-odbc php5-pdo-mysql php5-pdo-sqlite php5-pear php5-pspell php5-snmp php5-sybase php5-tidy
(I'm not touching any php4 modules)

but I get a warning

Code:
The following packages will be REMOVED:
  php4-dev php4-pear
Hm, what to do? I would really like to leave pear repository for php4...
If you want to keep Pear for PHP4, then don't install the Pear package for PHP5 (php5-pear).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 15th February 2006, 10:46
gog gog is offline
Junior Member
 
Join Date: Feb 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yep, that's it. It work great! Maybe you should think of rewriting your original article? Or would you like me to write a new article "PHP5 extends The Perfect Setup - Debian Sarge (3.1)" ?
Reply With Quote
  #6  
Old 15th February 2006, 21:46
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by gog
Maybe you should think of rewriting your original article?
Why should I rewrite it? It's working...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 28th September 2006, 07:17
fbnewtz fbnewtz is offline
Member
 
Join Date: Apr 2006
Location: Houston
Posts: 43
Thanks: 1
Thanked 3 Times in 3 Posts
Default Problem with upgrade

Whenever I try and run the following line I get the following output:
Code:
apt-get install php5-curl php5-dev php5-gd php5-gmp php5-imap php5-ldap php5-mcrypt php5-mhash php5-ming php5-mysql php5-mysqli php5-odbc php5-pdo-mysql php5-pdo-sqlite php5-pear php5-pspell php5-snmp php5-sybase php5-tidy php4-curl php4-domxml php4-gd php4-gmp php4-imap php4-ldap php4-mcal php4-mcrypt php4-mhash php4-ming php4-mysql php4-odbc php4-pspell php4-recode php4-snmp php4-xslt php4-xdebug curl libwww-perl imagemagick
Code:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  php5-curl: Depends: phpapi-20041225
             Depends: php5-common (= 5.1.6-0.dotdeb.2) but 5.1.6-1 is to be installed
  php5-gd: Depends: phpapi-20041225
  php5-gmp: Depends: phpapi-20041225
            Depends: php5-common (= 5.1.6-0.dotdeb.2) but 5.1.6-1 is to be installed
  php5-imap: Depends: phpapi-20041225
  php5-ldap: Depends: phpapi-20041225
  php5-mcrypt: Depends: phpapi-20041225
  php5-mhash: Depends: phpapi-20041225
  php5-ming: Depends: phpapi-20041225
  php5-mysql: Depends: phpapi-20041225
  php5-mysqli: Depends: phpapi-20041225
  php5-odbc: Depends: phpapi-20041225
  php5-pdo-mysql: Depends: phpapi-20041225
                  Depends: php5-common (= 5.1.6-0.dotdeb.2) but 5.1.6-1 is to be installed
  php5-pdo-sqlite: Depends: phpapi-20041225
                   Depends: php5-common (= 5.1.6-0.dotdeb.2) but 5.1.6-1 is to be installed
  php5-pear: Depends: php5-cli but it is not going to be installed
  php5-pspell: Depends: phpapi-20041225
               Depends: php5-common (= 5.1.6-0.dotdeb.2) but 5.1.6-1 is to be installed
  php5-snmp: Depends: phpapi-20041225
             Depends: php5-common (= 5.1.6-0.dotdeb.2) but 5.1.6-1 is to be installed
  php5-sybase: Depends: libct1 but it is not going to be installed
               Depends: phpapi-20041225
               Depends: php5-common (= 5.1.6-0.dotdeb.2) but 5.1.6-1 is to be installed
  php5-tidy: Depends: phpapi-20041225
             Depends: php5-common (= 5.1.6-0.dotdeb.2) but 5.1.6-1 is to be installed
E: Broken packages
Any ideas? I had different servers in my sources.list file, but I made a copy and created a new sources.list file with the same source as you specify in the server config.

I am running the Debian Perfect server setup with Ruby and FastCGI.

Thanks,

Fred
Reply With Quote
  #8  
Old 29th September 2006, 14:52
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by fbnewtz
I had different servers in my sources.list file
That's the reson for your problem.

Quote:
Originally Posted by fbnewtz
but I made a copy and created a new sources.list file with the same source as you specify in the server config.
That doesn't help because your system still has the packages of the other repositories in its package database.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 21st November 2006, 16:48
Berry Berry is offline
Member
 
Join Date: Nov 2006
Posts: 69
Thanks: 10
Thanked 1 Time in 1 Post
Send a message via Skype™ to Berry
Default

Sorry for reopening older post, I try to install those packages from gog's post, but I get errors
Code:
E: Package php5-mysqli has no installation candidate
E: Couldn't find package php5-pdo-mysql
I used Falco's sources links, did something change with those source links?...

EDIT: I tried also other source servers, for example :
Code:
deb http://dotdeb.pimpmylinux.org/ stable all
deb-src http://dotdeb.pimpmylinux.org/ stable all
but no success. Can someone point me to alternatives? Thanks!

Last edited by Berry; 21st November 2006 at 17:03.
Reply With Quote
  #10  
Old 22nd November 2006, 17:23
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
 
Default

Maybe there is no package for php5-mysqli. You can search for all available PHP5 packages by running
Code:
apt-cache search php5
And make sure you run
Code:
apt-get update
whenever you change /etc/apt/sources.list!
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to upgrade PHP4 to PHP5 Jeroen Server Operation 14 10th November 2006 17:54
Suse 9.3 setup probs with php5 hyperclock Tips/Tricks/Mods 0 21st September 2005 03:34
Installing PHP4 ProTrooper Installation/Configuration 10 29th August 2005 21:20


All times are GMT +2. The time now is 01:23.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.