Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 16th July 2010, 01:36
crypted crypted is offline
Senior Member
 
Join Date: Dec 2006
Location: Oklahoma, USA
Posts: 429
Thanks: 3
Thanked 14 Times in 6 Posts
Default Increase PHP execution time?

How would one increase the PHP execution time in the ISPCONFIG interface?

I added the following to the website apache directives:
php_admin_value max_execution_time = 200

The rest of my APACHE DIRECTIVES are:
Code:
php_admin_value disable_functions "show_source system shell_exec passthru exec phpinfo popen proc_open"
php_admin_flag allow_url_fopen Off

<Directory /var/www/clients/client1/web8/web/>
AllowOverride All
</Directory>
However, that did not work. Adding that decreased the default 120 to 30 seconds.

I tried php_admin_value max_execution_time 200 and I tried php_admin_value max_execution_time "200"

Thoughts?

I realized that ISPCONFIG is not looking at .htaccess in the websites base directory. I had set stuff there that isn't being used.
Code:
cat .htaccess 
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

php_value memory_limit 64M
php_value max_execution_time 450
How can I get either APACHE DIRECTIVES to be looked at or .htaccess OR both?

Last edited by crypted; 16th July 2010 at 02:15.
Reply With Quote
Sponsored Links
  #2  
Old 16th July 2010, 09:31
damir damir is offline
Senior Member
 
Join Date: Jun 2006
Posts: 375
Thanks: 11
Thanked 51 Times in 42 Posts
Default

Are you using mod_php or fast_cgi?
Reply With Quote
  #3  
Old 16th July 2010, 11:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,573
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
Default

Quote:
I realized that ISPCONFIG is not looking at .htaccess
ISPConfig is the controlpanel and not the webserver. The webserver is apache and .htaccess files are configuration files of the apache webserver. Apache is reading the .htaccess files on a ispconfig server when you put them into a directory which is inside the vhost, e.g. in the "web" directory which is the root directory of the vhost.

What you should check is that you have allowed apache to read these settings from a .htaccess file by setting AllowOverride to "all" on the options tab of the website settings.

Quote:
How can I get either APACHE DIRECTIVES to be looked at or .htaccess OR both?
Both locations are always used by apache.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 16th July 2010, 16:21
crypted crypted is offline
Senior Member
 
Join Date: Dec 2006
Location: Oklahoma, USA
Posts: 429
Thanks: 3
Thanked 14 Times in 6 Posts
Default

I realize ISPCONFIG isn't a webserver, but the settings I've created aren't being used by Apache.

I'm using FAST-CGI.

My "OPTIONS" for the website has had the "AllowOverride All" for months and it has not worked. And, I do mean where it says AllowOverride: I have ALL in the box.

My ISPCONFIG-set Apache Directive shows:
Code:
php_admin_value disable_functions "show_source system shell_exec passthru exec phpinfo popen proc_open"
php_admin_flag allow_url_fopen Off

<Directory /var/www/clients/client1/web8/web/>
AllowOverride All
</Directory>
Reply With Quote
  #5  
Old 16th July 2010, 16:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,573
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
Default

php_admin_value and php_admin_flag are functions of the apache module mod_php. So they work only for mod_php and not fast-cgi or cgi PHP.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 16th July 2010, 16:33
crypted crypted is offline
Senior Member
 
Join Date: Dec 2006
Location: Oklahoma, USA
Posts: 429
Thanks: 3
Thanked 14 Times in 6 Posts
Default

Those have been in there since I used MOD_PHP, which you recommend I drop for FAST-CGI as I'm running Wordpress sites.

I will delete those entries.

But, I need to get the actual PHP execution time to work. So, I need to get that .htaccess actually being read.
Reply With Quote
  #7  
Old 16th July 2010, 16:42
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,573
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
Default

As I told you above, php_admin_value and php_admin_flag are for mod_php only. It does not matter where you add them, they can not work for fast-cgi.

For fast-cgi, you use other techniques you work e.g. with custom php.ini files:

http://bugtracker.ispconfig.org/inde...s&task_id=1079
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 16th July 2010, 16:58
crypted crypted is offline
Senior Member
 
Join Date: Dec 2006
Location: Oklahoma, USA
Posts: 429
Thanks: 3
Thanked 14 Times in 6 Posts
Default

Till I understand that and AM NOT using them any longer.

Is there no way to override the time limit for php max execution time aside from creating a specific PHP.INI per site?

The .htaccess entry won't work? "php_value max_execution_time 450"

It isn't a php_admin_value.
Reply With Quote
  #9  
Old 16th July 2010, 17:10
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,573
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
Default

Some newer php versions have a .htaccess scanner extension included, personally I would never use it in a hosting enviroment as it allows the users to circumvet most security settings. So using a .htscanner extension is only an option for internal dev servers or private servers that dont allow access by clients. Thats why all Linux distributions disable it by default in php.ini. It depends on the php version (> 5.3 nescessary) and the settings that you have in the php.ini file if you can use the .htaccess scanner.

I posted you already the Link to a better way to use custom settings with fast-cgi. So please read the bugtracker thread that I posted above.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 20th July 2010, 05:29
crypted crypted is offline
Senior Member
 
Join Date: Dec 2006
Location: Oklahoma, USA
Posts: 429
Thanks: 3
Thanked 14 Times in 6 Posts
 
Default

Till, I'm not quite sure how this is to be implemented. Please help enlighten me.

1) create /var/www/php-fcgi-scripts/

2) copy /etc/php.ini into above directory

3) create subdirectories webXX for all domains that will have custom php (web11, web13, web20, web39)

4) create file .php-fcgi-starter and add the following code:
Code:
#!/bin/sh

PHPRC="<tmpl_var name='php_ini_path'>"
export PHPRC
PHP_DOCUMENT_ROOT="<tmpl_var name='document_root'>"
export PHP_DOCUMENT_ROOT
# The variable PHP_FCGI_CHILDREN is onyl useful for lighty or nginx as apache
# mod_fcgi will control the number of childs themself and never use the additional processes.
# PHP_FCGI_CHILDREN=<tmpl_var name='php_fcgi_children'>
# export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=<tmpl_var name='php_fcgi_max_requests'>
export PHP_FCGI_MAX_REQUESTS

# merge main and local configuraton files
FILECONF="php-local.ini"
rm -f ${FILECONF}
cat ${PHPRC}php.ini php.ini > ${FILECONF}
chmod 444 ${FILECONF}

exec <tmpl_var name='php_fcgi_bin'> \
<tmpl_if name="security_level" op="==" value="20"> -d open_basedir="<tmpl_var name='open_basedir'>" \
-d upload_tmp_dir=<tmpl_var name='document_root'>/tmp \
-d session.save_path=<tmpl_var name='document_root'>/tmp \
</tmpl_if> -c ${FILECONF} $1
5) in subdirectories, create php-local.ini files and add variables that are wanted:
Code:
max_execution_time = 300
max_file_size = 30M

But, what next? How does this get inserted into the apache directives generated by ISPCONFIG?

I'd love to see a standard guide for this.

I did message the original poster on this process, but never heard back.

Please, help me out. I'm sure others would love to know the step-by-step as well.
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
Problem with services!! banzaiwebstudio.com Installation/Configuration 7 19th May 2010 21:13
Error when install ISPConfig 2 with components built from source X-admin Installation/Configuration 5 30th April 2010 13:22
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 17:26
Unable to install ISPConfig bdonecker Installation/Configuration 21 26th May 2009 08:20
Apache2 Freezes celtic Server Operation 31 28th May 2007 17:18


All times are GMT +2. The time now is 21:42.


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