• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

php4 and php

S

sagelike

Guest
How come plesk for linux does not support php4 and php5?

That feature is available on the Windows version and it would be a huge bonus to have that on Plesk for Linux as well.

Thanks
 
windows and linux system are quite different, no php swith is available now for linux Plesk,

will wait for smth... has happened
 
Php4 & Php5 On Same Linux Server?

Hello,
I am Migrating from plesk 7.5.4 to Plesk 8.3
Now on Plesk 7.5.4 PHP4 is running fine.
Now when I Migrate to Plesk 8.3 it has PHP5

The php4 scripts Doesn't work on PHP5 plesk 8.3

What to do ?
How to Resolve it?
How PHP4 & PHP5 works on Same Linux Server, like of Windows?
 
you can install any version of php. I have php 4.4.8 working fine with Plesk 8.3. The only problem is that you need to manually modify apache config from time to time. There may be some hooks or something that will spare you from manually modify apache's config. Also running php4 and php5 at the same time it's not that hard. You cand have mod_php 4 and 5 (without extensions like .php4 or other tricks like that and without cgi)
 
Here is a possible solution for a way to switch between php4/5/6 on a per domain basis.

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

First of all: This was originally not created by me however the person left the company and I have permission to post this here, thus the way some of the things that have been done here is not how I would originally do it none the less.

Second: You have to make sure that your server is secure by allowing fastcgi and that you set permissions in a safe way accross the board.

Lastly, if you set permissions higher than 755 anywhere in the /cgi-bin/ folder or on the executables needed you will run into a lot of problems.

Custom php.ini for each domain goes into the domain's /cgi-bin/ folder

Lastly, I do not supply the php versions, just a means of making it possible to switch between more than one. It is also possible to edit the code to switch between lets say mod_php4 and mod_php5 if you want or even between mod_php5 and mod_suphp

As far as I know suphp can handle multiple versions of php if configured via /etc/suphp.conf however I have never tried this and is up to you if you want to try and get that to work.

PHP Manager Screenshot: http://plesk02.glodns.net/pleskphpmanager.png
Download: http://plesk02.glodns.net/phpmanager032.tgz

When you download this archive, it already contains the file structure as we haev it on our servers.

After extracting these files there are a few steps you need to follow to make sure it wil work.

Step1: Set up fastcgi scripts and default php.ini files.
I have these located in /usr/local/scripts

Check that your php binary is the cgi version for example:
[root@$$$$$]# /usr/local/php448-fcgi/bin/php -v
PHP 4.4.8 (cgi-fcgi) (built: Mar 14 2008 12:56:04)
Copyright (c) 1997-2008 The PHP Group

The edit the /usr/local/scripts/php4.fcgi to look like this:

[root@$$$$$]# cat /usr/local/scripts/php4.fcgi
#!/bin/sh
PHP_FCGI_CHILDREN=2
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/local/php448-fcgi/bin/php

Next edit /usr/local/scripts/php4.ini to what you want for defaults, I symlink my /usr/local/php448-fcgi/etc/php.ini to this, but this file also gets copied to the clients cgi-bin folder so that if he wants to edit it, its there and he can just rename it to php.ini and the php will pick that up instead. We have way too many clients that need specific settings and this is the easiest way to do this.

Repeat this step for each php version you want to enable on the php manager

Step2: Double check the plesk wrapper
Go to /usr/local/psa/admin/bin and run the command "ls -lsah | grep phpmng"

From this you will see where it is symlinked to. I realized that my centos4 and centos5 boxes this file has a different name, I don't know why but on Centos5 I had to delete this file and recreate it via:
ln -s ../sbin/wrapper phpmng

Step3: Configure phpmanager's access to the plesk sql db and which versions you want
I use nano as my editor
nano /usr/local/psa/admin/plib/phpmngdb.php

Supply a user that can access the psa db on the mysql server.
Also define the versions of php you have, as well as which ones to enable.

Just for clarification, the default php is the server default, and when you set to this the php manager basically just delete all the settings it created on the domain.

Step4: Add the PHP manager icon to all the domains
- Log into the plesk control panel with the admin account
- Go to "server" on the left, then to "Custom buttons" on the right
- Click on "Add New Custom Button"
- Fill in the details, use the following as guidelines:
Button labe: PHP Manager
Location: Domain Owners Desktop/homepage
Background iamge: your own icon that looks like the php icon
url: /domains/phpmanager.php
Tick "include domain id" / "&dom_id=<dom_id> (ps. I want to change this to read from the php session variables instead later)
Context help tip: PHP Version Management
Also tick: Open url in CP
Also tick: visible to all sub-logins (if you want clients to be able to control this)
 
How come plesk for linux does not support php4 and php5?

That feature is available on the Windows version and it would be a huge bonus to have that on Plesk for Linux as well.

Thanks

I have actually submitted this as a feature request some time ago in "bug #128838" - I love how they put feature requests into the bug category :)

They tell me this has no set implementation date - but the more customers who contact them asking for it, the more they would see it as a needed item (or so logic dictates - they sure didnt do that with postfix!)
 
Oh c'mon, postifx ? They don't care about it, they only focus on selling selling and selling again a very old product with just a little few shiny icons changed.
 
Back
Top