Yii Framework Forum: Fatal error - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Fatal error Rate Topic: -----

#1 User is offline   nemo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 142
  • Joined: 24-February 10

Posted 07 July 2010 - 09:10 AM

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
0

#2 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 07 July 2010 - 09:36 AM

That's a PHP configuration issue. Check max_execution_time. You could do this, before you import:

ini_set('max_execution_time',180);

0

#3 User is offline   nemo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 142
  • Joined: 24-February 10

Posted 07 July 2010 - 09:58 AM

View PostMike, on 07 July 2010 - 09:36 AM, said:

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.
0

#4 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 07 July 2010 - 11:02 AM

Check with phpinfo() and read the PHP manual on how to change that setting. Did you forget to restart Apache?
0

#5 User is offline   nemo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 142
  • Joined: 24-February 10

Posted 07 July 2010 - 11:17 AM

View PostMike, on 07 July 2010 - 11:02 AM, said:

Check with phpinfo() and read the PHP manual on how to change that setting. Did you forget to restart Apache?

I restart apache after change php.ini file.
0

#6 User is offline   PoL 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 506
  • Joined: 05-November 08
  • Location:Buenos Aires, Argentina

Posted 07 July 2010 - 11:20 AM

some installations have two php.ini files (eg.: WAMP). One for CLI and another for web. You need to edit the proper one...
Don't say what you think, think what you say
The problem is communication! Excess of communication!
0

#7 User is offline   nemo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 142
  • Joined: 24-February 10

Posted 07 July 2010 - 11:26 AM

View PostPoL, on 07 July 2010 - 11:20 AM, said:

some installations have two php.ini files (eg.: WAMP). One for CLI and another for web. You need to edit the proper one...

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?
0

#8 User is offline   PoL 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 506
  • Joined: 05-November 08
  • Location:Buenos Aires, Argentina

Posted 07 July 2010 - 11:29 AM

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?
Don't say what you think, think what you say
The problem is communication! Excess of communication!
0

#9 User is offline   andy_s 

  • Random Member Title
  • Yii
  • Group: Moderators
  • Posts: 1,526
  • Joined: 22-June 09
  • Location:Russia, Kostroma

Posted 07 July 2010 - 11:32 AM

View Postnemo, on 07 July 2010 - 09:10 AM, said:

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.
0

#10 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 541
  • Joined: 21-June 10

Posted 07 July 2010 - 11:34 AM

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
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#11 User is offline   nemo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 142
  • Joined: 24-February 10

Posted 07 July 2010 - 12:31 PM

View Postandy_s, on 07 July 2010 - 11:32 AM, said:

You can try to use set_time_limit() function.


where I put this line?
0

#12 User is offline   andy_s 

  • Random Member Title
  • Yii
  • Group: Moderators
  • Posts: 1,526
  • Joined: 22-June 09
  • Location:Russia, Kostroma

Posted 07 July 2010 - 01:16 PM

View Postnemo, on 07 July 2010 - 12:31 PM, said:

where I put this line?

In the beginning of your index.php.
0

#13 User is offline   nemo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 142
  • Joined: 24-February 10

Posted 07 July 2010 - 01:46 PM

View Postandy_s, on 07 July 2010 - 01:16 PM, said:

In the beginning of your index.php.

Thanks. Problem solved. Thank you very much.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users