DreamHost PS and PHP


#1

If I activate PS, will I be able to override PHP and MySQL timeouts? I have a few scripts that I have to cron because they do a lot of fetching from external sites (data mining).

If I can, then I will activate PS today!


#2

You sure can :wink:

Follow the directions on creating your own custom php environment:

http://wiki.dreamhost.com/Custom_PHP.ini

Maximum Cash Discount on any plan with MAXCASH


#3

What command do I issue to see which PHP.INI is currently in use? (Because I tried disabling the time limit in the one I think I am using, but long scripts keep timing out!)


#4

You can create a temporary php file (name it php_info.php or something)

<?php phpinfo(); ?>

Open it in a browser and it will display your current php environment variables.

The timeout setting (I think) you’re referring to is: max_execution_time = X

Maximum Cash Discount on any plan with MAXCASH


#5

Please note: the reason for you to switch to PS is that you need more resources.

You can customize or install your own PHP even in a shared server.

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here


#6

I’m still timing out at 60 seconds, even though my PHP.ini max_execution_time = 120.

Please see this page: http://www.poxshop.com/phpinf.php

Errors with: Fatal error: Maximum execution time of 60 seconds exceeded in /home/.ira/asetzler/poxshop.com/phpinf.php on line 6

While doing:

$start_time = gettimeofday(true);

while(($time = gettimeofday(true)) AND ($time-$start_time <= 100))
$lapse = $time-$start_time;

echo “

”.$lapse."

";

Shouldn’t it echo $lapse as 100?


#7

You might have a problem with your PHP installation. I notice the path on running your phpinfo file reflects the following:

Configuration File (php.ini) Path /home/.ira/asetzler/php5/etc/php5/commonsearches.com/php.ini

On my accounts here at DH the paths resolve as:

Non-customised PHP:
Configuration File (php.ini) Path /etc/php5/cgi
Loaded Configuration File /etc/php5/cgi/php.ini

Customised PHP:
Configuration File (php.ini) Path /etc/php5/cgi
Loaded Configuration File /home/.server/user/domain.com/cgi-bin/php.ini

It might pay to first go through the PHP customisation procedure outlined in the Wiki again in order to have your PHP running under cgi.

http://wiki.dreamhost.com/Custom_PHP.ini

Maximum Cash Discount on any plan in March with MARCH08