|
PHP4 or PHP5
|
| Author |
Message |
adigit
Junior Member

Posts: 68
Group: Registered
Joined: Apr 2007
Status:
Offline
Reputation: 0
|
PHP4 or PHP5
Both PHP4 and PHP5 are installed in ISPCP, how can we know which one the programs are running on?
Is it possible to choose and how?
Impossible is nothing
|
|
| 06-30-2007 10:45 PM |
|
 |
raphael
Member
   
Posts: 474
Group: Dev Team
Joined: Apr 2007
Status:
Offline
Reputation: 8
|
RE: PHP4 or PHP5
well, it depends on what you enable. Check in ispcp.conf for the PHP_VERSION entry; note that no matter if you change it nothing will be affected.
Besides that, you can enable mod_php4/5 and all domains with php enabled will be able to use it
YaHost Me | Text Link Ads | my Debian repository | Donate! | No OOXML! | Project HoneyPot | ... and more
This is Linux land. In silent nights you can hear the Windows machines rebooting.
If you want to be helped, don't PM me but post in the forums | If you want private support PM me and we'll discuss the price
|
|
| 07-01-2007 11:46 AM |
|
 |
adigit
Junior Member

Posts: 68
Group: Registered
Joined: Apr 2007
Status:
Offline
Reputation: 0
|
RE: PHP4 or PHP5
nothing will be affected
?
could you tell the ways often used to enable mod_php4/5?
Impossible is nothing
|
|
| 07-06-2007 07:44 PM |
|
 |
NetVista
Newbie
   
Posts: 7
Group: Dev Team
Joined: Oct 2006
Status:
Offline
Reputation: 1
|
RE: PHP4 or PHP5
usualy in a htaccess file you will find the right directives for php5 usage (activation). As an example there is another way to handle php4 only in the current ispcp release. It was ment for the file manager (net2ftp) that can't run under php5.
Below is a small tutorial
Many shared server environments currently run .php scripts using the PHP4 interpreter and .php5 code using the PHP5 interpreter. Rather than changing all your file extensions, and perhaps breaking many links, use a .htaccess file to dynamically map one extension to the other.
IMPORTANT CAVEAT:One common reason for doing this is that hosts leave PHP4 configured with register_globals ON in order to support legacy code while offering PHP5 with register_globals OFF.
Turning register globals OFF via a local php.ini or a .htaccess file will NOT offer you any extra protection. Another exploited account on your server can simple hack yours. For server security, and since php 4.2, register globals is OFF server wide by default (php default). If you need register globals ON for a specific site, simple use a .htaccess file for that specific directory, and server wide security will not be compromised. Of course, if you do this be sure all effected scripts fully sanitize input data.
Requirements
1. Your Apache server must be configured to use .htaccess files. If not, you must edit the Apache templates for domain and subdomain in /etc/ispcp/apache/parts with AllowOveride All.
Directions
1. Check to be sure your site is configured to use .htaccess files.
2. Make a backup of the .htaccess file in your root htdocs directory. If you don't have a .htaccess file at this location, create one now.
3. There are various ways to set the command, depending on your server configuration. One of the following will probably work. Add ONE the following lines at the end of your .htaccess file. If unsure which to use, or what to do better ask questions in this forum.
AddType x-mapp-php5 .php
AddHandler application/x-httpd-php5 .php
AddHandler cgi-php5 .php
4. Carefully test.
5. Delete the backup .htaccess file. Don't leave backups of .htaccess files in public directories.
|
|
| 07-07-2007 12:13 AM |
|
 |
raphael
Member
   
Posts: 474
Group: Dev Team
Joined: Apr 2007
Status:
Offline
Reputation: 8
|
RE: PHP4 or PHP5
nothing will be affected
?
If you edit the PHP_VERSION var the fastcgi loader won't be modified
could you tell the ways often used to enable mod_php4/5?
a2enmod mod_php[4|5]
but make sure they parse .php4/.php5 files, otherwise you will get an error. Or, enable the module but make sure by default it doesn't hook to any file (default is .php) and enable it in a per-domain basis (by editing sites-enabled/ispcp.conf)
YaHost Me | Text Link Ads | my Debian repository | Donate! | No OOXML! | Project HoneyPot | ... and more
This is Linux land. In silent nights you can hear the Windows machines rebooting.
If you want to be helped, don't PM me but post in the forums | If you want private support PM me and we'll discuss the price
|
|
| 07-07-2007 03:55 AM |
|
 |
adigit
Junior Member

Posts: 68
Group: Registered
Joined: Apr 2007
Status:
Offline
Reputation: 0
|
RE: PHP4 or PHP5
Impossible is nothing
|
|
| 07-07-2007 05:38 PM |
|
 |
Quemeros
Junior Member

Posts: 48
Group: Registered
Joined: Nov 2007
Status:
Offline
Reputation: 0
|
RE: PHP4 or PHP5
OS: Debian Etch r3.0 Amd64
IspCP: RC4 (AWStats: Dynamic) + AMaVis + SSL
This post was last modified: 05-24-2008 05:27 AM by Quemeros.
|
|
| 05-24-2008 05:22 AM |
|
 |