Current time: 11-23-2024, 02:46 PM Hello There, Guest! (LoginRegister)


Post Reply 
isp-control with mod_php5
Author Message
manija Offline


Posts: 2
Joined: Nov 2009
Reputation: 0
Post: #1
isp-control with mod_php5
how to install or update isp-control with mod_php5 in Debian Lenny ?
12-04-2009 09:00 AM
Find all posts by this user Quote this message in a reply
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #2
RE: isp-control with mod_php5
Why?

Btw: Please take a look WHERE you open Threads. The HowTo Section is the wrong place. Wink
(This post was last modified: 12-04-2009 04:12 PM by gOOvER.)
12-04-2009 04:11 PM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #3
RE: isp-control with mod_php5
Code:
apt-get install libapache2-mod-php5

That said, you may have to adjust some permissions in order for everything to work smoothly, and the overall security of your server is greatly reduced so be warned Tongue
12-05-2009 12:54 AM
Visit this user's website Find all posts by this user Quote this message in a reply
motokochan Offline
Member
***

Posts: 274
Joined: Jul 2008
Reputation: 1
Post: #4
RE: isp-control with mod_php5
PHP under fcgid is actually not too much slower than php as a module (within a few percent last I read), and you have a lot more security keeping it separated.

You also have the benefit of lower memory use as PHP is only used when necessary. If you use PHP as a module, it's included in the memory usage even if all that is being served is a static html file or image.

Unless you absolutely need something specific that can only be done with the module, it's probably better to leave it alone.
12-05-2009 04:19 AM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #5
RE: isp-control with mod_php5
Quote:PHP under fcgid is actually not too much slower than php as a module (within a few percent last I read), and you have a lot more security keeping it separated.

In fact, static file serving is even faster and less resource-consuming because you can use the threaded apache workers with fastcgi, whereas you can not with mod_php (php is not thread-safe) Wink

Quote:You also have the benefit of lower memory use as PHP is only used when necessary. If you use PHP as a module, it's included in the memory usage even if all that is being served is a static html file or image.

This is not necessarily true. With the default ispcp setup, each php-enabled website has at least 2 php-cgi backends for fastcgi, even when they're never accessed. Therefore, the number of php-cgi processes grows linearly with respect to the number of domains on your server, even when they're almost never used. As a result, the system probably consumes much more memory than if you go the mod_php way. In this setup, all apache workers (processes) can serve requests for any domain, so the total number of processes that you'll need is probably much lower than 2*number of domains...
(This post was last modified: 12-05-2009 04:36 AM by kilburn.)
12-05-2009 04:34 AM
Visit this user's website Find all posts by this user Quote this message in a reply
manija Offline


Posts: 2
Joined: Nov 2009
Reputation: 0
Post: #6
RE: isp-control with mod_php5
apt-get install libapache2-mod-php5
rm /etc/apache2/mods-enabled/fcgid_ispcp.conf
rm /etc/apache2/mods-enabled/fcgid_ispcp.load


vim /etc/apache2/mods-enabled/php5.conf
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps
</IfModule>

vim /etc/apache2/mods-enabled/php5.load
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so

vim /etc/apache2/apache2.conf and insert:
php_admin_value post_max_size 2M
php_admin_value disable_functions show_source, system, passthru, exec, symlink, popen, proc_open, shell_exec
php_admin_value extension_dir /usr/lib/php5/20060613
php_admin_value file_uploads on
php_admin_value include_path .:/usr/share/php:/usr/share/pear
php_admin_value max_file_uploads 50
php_admin_value max_input_nesting_level 64
php_admin_value max_input_time 15
php_admin_value memory_limit 32M
php_admin_value precision 12
php_admin_value realpath_cache_size 16K
php_admin_value realpath_cache_ttl 120
php_admin_value safe_mode Off
php_admin_value safe_mode_gid Off
php_admin_value upload_max_filesize 8M

vim /etc/ispcp/apache/parts/dmn_php2_entry.tpl and insert:
<IfModule mod_php5.c>
php_admin_value open_basedir "{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}:{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/:{PEAR_DIR}/"
php_admin_value upload_tmp_dir "{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/"
php_admin_value session.save_path "{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/"
php_admin_value sendmail_path '/usr/sbin/sendmail -f {SUEXEC_USER} -t -i'
php_admin_value eaccelerator.cache_dir '{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/'
php_admin_value soap.wsdl_cache_dir '{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/'
</IfModule>

vim /etc/ispcp/apache/parts/sub_php2_entry.tpl and insert:
<IfModule mod_php5.c>
php_admin_value open_basedir "{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}:{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/:{PEAR_DIR}/"
php_admin_value upload_tmp_dir "{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/"
php_admin_value session.save_path "{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/"
php_admin_value sendmail_path '/usr/sbin/sendmail -f {SUEXEC_USER} -t -i'
php_admin_value eaccelerator.cache_dir '{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/'
php_admin_value soap.wsdl_cache_dir '{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/'
</IfModule>

vim /etc/ispcp/apache/parts/als_php2_entry.tpl and insert:
<IfModule mod_php5.c>
php_admin_value open_basedir "{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}:{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/:{PEAR_DIR}/"
php_admin_value upload_tmp_dir "{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/"
php_admin_value session.save_path "{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/"
php_admin_value sendmail_path '/usr/sbin/sendmail -f {SUEXEC_USER} -t -i'
php_admin_value eaccelerator.cache_dir '{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/'
php_admin_value soap.wsdl_cache_dir '{WWW_DIR}/{DMN_NAME}{MOUNT_POINT}/phptmp/'
</IfModule>
So I did and the problem is with the protection server?
(This post was last modified: 12-10-2009 09:19 PM by manija.)
12-10-2009 09:11 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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