Forums / All Other Contributions/Addons / changing PHP max_execution_time to fix my easypopulate timeouts?

changing PHP max_execution_time to fix my easypopulate timeouts?

Locked

Views: 8,168

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
8 Sep 2008, 3:28 PM
#1
dimar avatar

dimar

New Zenner

Join Date:
Feb 2007
Posts:
76
Plugin Contributions:
0

changing PHP max_execution_time to fix my easypopulate timeouts?

Hello everyone,

I'm trying to install Easypopulate on a large store and it gives out an execution_time error because it takes too long.

in the php info I see that max_execution_time is 60 as a local value and 120 as the master value.

Is it correct to say that local is set by a file within zencart and the master is set on the server itself?

How do I change this local value? I found some max_execution_time thingies in the folder zc_install/sql, but changing these values didn't do the trick for me (but I'm not really into php, so I could've done something wrong.

Can anyone please help me with this question?

Thanks in advance!
DMR

8 Sep 2008, 9:16 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: changing PHP max_execution_time to fix my easypopulate timeouts?

Generally Zen Cart doesn't control max_execution_time. That's controlled by a PHP setting on your server.

"master" means the server-wide settings configured by your hosting company.
"local" is the value set by your own customizations if your hosting company lets you override their master settings via a custom php.ini file or .htaccess equivalent.

Your hosting company should be able to advise you on what they do and don't allow you to override and how to do it -- specifically for the server you're hosted on.

In addition, there are many guides online about changing those settings.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

9 Sep 2008, 8:23 AM
#3
dimar avatar

dimar

New Zenner

Join Date:
Feb 2007
Posts:
76
Plugin Contributions:
0

Re: changing PHP max_execution_time to fix my easypopulate timeouts?

Thanks DrByte,

I'll try and locate the .htacces or php.ini file and change that one. It's good to know that I don't have to look within the ZC files (although I did locate some "max_execution_time" and "time_limit" in ZC files in the sql-folder (as I mentioned)

If I figure out where it was I'll let you know.

Thanks!!
Dimar

12 Sep 2008, 7:43 AM
#4
dimar avatar

dimar

New Zenner

Join Date:
Feb 2007
Posts:
76
Plugin Contributions:
0

Re: changing PHP max_execution_time to fix my easypopulate timeouts?

Hello DrByte,

I was just trying things again and discovered the following.
If i look at the version info within ZC (admin/server_info.php) I get a local max_execution_time of 60, however if I upload a phpinfo file

(like this)

<?php
phpinfo ();
?>

to admin/phpinfo.php and look at it, it gives out a local time of 120! It;s in the same folder as you can see. I can't find any entries that would make the time 60, could you please help me?

Thanks in advance!
DMR

EDIT: Also tried the server_info file like this:

<?php
  if (function_exists('ob_start')) {
    ob_start();
    phpinfo();
    $phpinfo = ob_get_contents();
    ob_end_clean();
    $phpinfo = str_replace('border: 1px', '', $phpinfo);
    ereg('<body>(.*)</body>', $phpinfo, $regs);
    echo $sinfo;
    echo $regs[1];
  } else {
    echo $sinfo;
    phpinfo();
  }
?>

and also got 120 as max_execution_time

12 Sep 2008, 7:53 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: changing PHP max_execution_time to fix my easypopulate timeouts?

That's because Zen Cart attempts to override that value during admin activity ... based on whatever you've got set in Admin->Configuration->My Store->Admin Set max_execution_time for processes
Not all servers will allow it to work, but if you change that number there, it should override and set the "local" value to whatever you enter.

(Sorry, I completely forgot we'd added that option back in early 1.3 days.)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

12 Sep 2008, 8:10 AM
#6
dimar avatar

dimar

New Zenner

Join Date:
Feb 2007
Posts:
76
Plugin Contributions:
0

Re: changing PHP max_execution_time to fix my easypopulate timeouts?

Thanks!! that was indeed exactly what I was looking for!
Now I have to try and get this easypopulate to work, because even at 130 sec it still gave me a timeout...

I hope it will work, otherwise I might just check back with you! (if that's ok ofcourse..)

Thanks again!
DMR

12 Sep 2008, 9:24 AM
#7
dimar avatar

dimar

New Zenner

Join Date:
Feb 2007
Posts:
76
Plugin Contributions:
0

Re: changing PHP max_execution_time to fix my easypopulate timeouts?

Well, changing the max_execution_time works like a charm, however it didn't solve my problem.

Perhaps you have seen/heard about this before and know what to do:

When I install EasyPopulate on an empty store, it works fine. However, when i install it on a full store (large) it times out or (when i set the max_execution to 900) just keeps loading and doesn't do anything.

Would you know what to do, I get 0,0 support from the creator of this addon.

Any help would really be greatly appreciated!
DMR

26 Feb 2009, 8:27 PM
#8
jimlink avatar

jimlink

New Zenner

Join Date:
Feb 2009
Posts:
13
Plugin Contributions:
0

Re: changing PHP max_execution_time to fix my easypopulate timeouts?

Did you ever solve the time-out issue?
I'm having the same problem with EP.
Worked GREAT before we added more items.
I was curious if the time setting affected anything..

26 Feb 2009, 10:14 PM
#9
dimar avatar

dimar

New Zenner

Join Date:
Feb 2007
Posts:
76
Plugin Contributions:
0

Re: changing PHP max_execution_time to fix my easypopulate timeouts?

Nope, sorry! Changing the max time didn't do diddly-squat for me. The problem only occured for me when i tried to install EP on an existing (and filled) ZC. Try and install on an empty one; works fine. The answer to my problem was:

  • backup the database (just for sure)
  • uninstall EP advanced
  • install free EP (see downloads)
  • download store products
  • do an database backup without the products (if you don'tknow how, tell me so i can explain)
  • re-install the store
  • use the productless database
  • use excel to change the EP product file into one that is good for EP advanced ( i believe its changing headers)
  • install EP adv on the empty store
  • upload the product file

I know it seems a lot, but its doable. Keep me posted if all works out.

Best,
DMR
Posted via Mobile Device

27 Feb 2009, 5:40 PM
#10
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: changing PHP max_execution_time to fix my easypopulate timeouts?

Wouldn't changing the max execution time in your php.ini file sort this out for you? I have mine set to 300 (it's measured in seconds) and don't have any timeout problems with EP. You can set it to a higher value if you are still getting timeout issues.


Zen Cart and it's community are the best!!

27 Feb 2009, 5:44 PM
#11
dimar avatar

dimar

New Zenner

Join Date:
Feb 2007
Posts:
76
Plugin Contributions:
0

Re: changing PHP max_execution_time to fix my easypopulate timeouts?

perhaps, but ZC uses 2 max_time.. one can be altered in the admin section (Admin->Configuration->My Store->Admin Set max_execution_time for processes)

changing either time did not work for me, but might work for someone else