nemo
(Nemoneel)
July 7, 2010, 2:10pm
1
Hey Guys, I have one problem. When I try to insert more than 300 data using Yii form, then I get this error but less than 300 is ok. Can you tell me why I get this error and what I need to change?
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/test/yii/framework/YiiBase.php on line 378
mikl
(Mike)
July 7, 2010, 2:36pm
2
That’s a PHP configuration issue. Check max_execution_time. You could do this, before you import:
ini_set('max_execution_time',180);
nemo
(Nemoneel)
July 7, 2010, 2:58pm
3
That’s a PHP configuration issue. Check max_execution_time. You could do this, before you import:
ini_set('max_execution_time',180);
I have changed the apache config file "max_execution_time = 300"
But still getting same problem.
mikl
(Mike)
July 7, 2010, 4:02pm
4
Check with phpinfo() and read the PHP manual on how to change that setting. Did you forget to restart Apache?
nemo
(Nemoneel)
July 7, 2010, 4:17pm
5
I restart apache after change php.ini file.
cyberpol
(Cyberpol 777)
July 7, 2010, 4:20pm
6
some installations have two php.ini files (eg.: WAMP). One for CLI and another for web. You need to edit the proper one…
nemo
(Nemoneel)
July 7, 2010, 4:26pm
7
This is Linux server, I install apache,php and mysql from source. And php.ini file in /usr/local/apache2/php/
Can you tell me where is the other one?
cyberpol
(Cyberpol 777)
July 7, 2010, 4:29pm
8
Oh… I don’t know if there is another one in your installation… but in mine (WAMP) there are two ini files. May be not in your installation.
What says your phpinfo() runned from a browser (not from CLI) about that setting?
andy_s
(Arekandrei)
July 7, 2010, 4:32pm
9
Hey Guys, I have one problem. When I try to insert more than 300 data using Yii form, then I get this error but less than 300 is ok. Can you tell me why I get this error and what I need to change?
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/test/yii/framework/YiiBase.php on line 378
You can try to use set_time_limit() function.
junxiong
(Junxiong)
July 7, 2010, 4:34pm
10
by any chance, does your form do upload something. Coz I once got similar problem which after discovered later it is problem in my code. I use ftp_upload() but the ftp_connect() configuration was incorrect, which causing it looping till time limit exceeded…
just my $0.02
andy_s
(Arekandrei)
July 7, 2010, 6:16pm
12
nemo:
where I put this line?
In the beginning of your index.php.
nemo
(Nemoneel)
July 7, 2010, 6:46pm
13
Thanks. Problem solved. Thank you very much.