Current time: 11-23-2024, 04:12 AM Hello There, Guest! (LoginRegister)


Thread Closed 
PHP4 or PHP5
Author Message
adigit Offline
Junior Member
*

Posts: 68
Joined: Apr 2007
Reputation: 0
Post: #1
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?
06-30-2007 10:45 PM
Visit this user's website Find all posts by this user
raphael Offline
Member
***

Posts: 474
Joined: Apr 2007
Reputation: 8
Post: #2
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
07-01-2007 11:46 AM
Visit this user's website Find all posts by this user
adigit Offline
Junior Member
*

Posts: 68
Joined: Apr 2007
Reputation: 0
Post: #3
RE: PHP4 or PHP5
Quote:nothing will be affected
?

could you tell the ways often used to enable mod_php4/5?
07-06-2007 07:44 PM
Visit this user's website Find all posts by this user
NetVista Offline
Newbie
*

Posts: 7
Joined: Oct 2006
Reputation: 1
Post: #4
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.

Code:
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
Visit this user's website Find all posts by this user
raphael Offline
Member
***

Posts: 474
Joined: Apr 2007
Reputation: 8
Post: #5
RE: PHP4 or PHP5
adigit Wrote:
Quote:nothing will be affected
?
If you edit the PHP_VERSION var the fastcgi loader won't be modified
adigit Wrote: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)
07-07-2007 03:55 AM
Visit this user's website Find all posts by this user
adigit Offline
Junior Member
*

Posts: 68
Joined: Apr 2007
Reputation: 0
Post: #6
RE: PHP4 or PHP5
Thanks, raphael!
07-07-2007 05:38 PM
Visit this user's website Find all posts by this user
Quemeros Offline
Junior Member
*

Posts: 86
Joined: Nov 2007
Reputation: 0
Post: #7
RE: PHP4 or PHP5
Sorry, but, this is actually (RC4) need it to change from php5 to php4 in only 1 site?
This http://www.isp-control.net/documentation...ge_to_php4 don't work only with a RC4 out box?
(This post was last modified: 05-24-2008 05:27 AM by Quemeros.)
05-24-2008 05:22 AM
Find all posts by this user
Thread Closed 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)