Essemme_Forniture Posted January 16, 2015 Share Posted January 16, 2015 (edited) Hello guys, it's me again... sorry.... i tried to generate new images cause i put the watermark on my website, but i can't do that, i've just 75 seconds and then my website give me an error about the timeout. I red something about the PHP.ini, so i tried to make an htaccess with : SetEnv MYSQL.CONNECT_TIMEOUT 300 But nothing chaged, so i asked to my web hosting (OVH) and he said me this : " you have to modify using this variable ini_set() di PHP ----- $max_execution_time= ini_set('max_execution_time','40000'); and putting this on my PHP page " So, now i'm a little bit confused... WHERE?? if you have some idea, maybe is just a very easy thing.. but i can't do that. Best regards a good work Simo Edited January 23, 2015 by affaridanoi (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted January 16, 2015 Share Posted January 16, 2015 Just locate the php.ini file your site is using (ask your hosting if you're not sure) then find this max_execution_time and rise the limit. If it's not there add it max_execution_time = 120 Link to comment Share on other sites More sharing options...
Essemme_Forniture Posted January 16, 2015 Author Share Posted January 16, 2015 Just locate the php.ini file your site is using (ask your hosting if you're not sure) then find this max_execution_time and rise the limit. If it's not there add it max_execution_time = 120 Thanks Nemo, just some questions, the php.ini i think i can't modify by myself, maybe i'm on a shared server, so i red that i've to modify the .htaccess to modify php.ini is that correct? If yes, which htaccess i've to edit and which variable have i to use . Or maybe i can modify the php.ini bymyself even on a hosting Thanks a lot Link to comment Share on other sites More sharing options...
Essemme_Forniture Posted January 16, 2015 Author Share Posted January 16, 2015 Then, if you see this url http://90plan.ovh.net/test.php is my php.ini, and the max_execution_time is already set as 120 http://90plan.ovh.net/test.php but after 75 seconds i've an error Link to comment Share on other sites More sharing options...
NemoPS Posted January 17, 2015 Share Posted January 17, 2015 It seems the admin images controller has its own protected $max_execution_time = 7200; beginning of controllers/admin/adminImagesController.php Link to comment Share on other sites More sharing options...
Essemme_Forniture Posted January 17, 2015 Author Share Posted January 17, 2015 It seems the admin images controller has its own protected $max_execution_time = 7200; beginning of controllers/admin/adminImagesController.php Yep, i found this on image, what can i do? Link to comment Share on other sites More sharing options...
vekia Posted January 17, 2015 Share Posted January 17, 2015 just increase value, for exmaple 14400 Link to comment Share on other sites More sharing options...
Essemme_Forniture Posted January 17, 2015 Author Share Posted January 17, 2015 just increase value, for exmaple 14400 Just did, the same 75 seconds... have i to force the template compilation be4? Link to comment Share on other sites More sharing options...
NemoPS Posted January 19, 2015 Share Posted January 19, 2015 It shouldn't be necessary to force it further, you hard-modified the original file, correct? And use no overrides for it? If it's set then it might as well be your hosting, really Link to comment Share on other sites More sharing options...
Essemme_Forniture Posted January 19, 2015 Author Share Posted January 19, 2015 It shouldn't be necessary to force it further, you hard-modified the original file, correct? And use no overrides for it? If it's set then it might as well be your hosting, really Hi Nemo, so i didn't modify any original file, cause i'm a super noob the only thing that i've done is to install a theme, and the watermark module for modify the pics. Nothing more, and the hosting told me that i've to modify the php, but i don't think could be that ehhe but obviously i'm not sure. I thought that .htaccess file but.... i really don't know, sometimes i've the same error even when i save after a modification of an item, but when i refresh the modify has be done.... Link to comment Share on other sites More sharing options...
NemoPS Posted January 21, 2015 Share Posted January 21, 2015 Yes, I mean if you added that value I mentioned to the original file. Since there are no overrides I don't understand why it's still 75 seconds. Is there any server-side caching like opc or alike? Using the xpresscache module? Link to comment Share on other sites More sharing options...
bellini13 Posted January 21, 2015 Share Posted January 21, 2015 some hosts will not allow you to increase the time out setting. It won't complain if you try, it will just ignore it. 75 seconds is not too bad for shared hosting, and Prestashop already accounts for this type of issue, by simply allowing you to run regen images multiple times. 1) The first time you regen images, you should select "erase previous images" as yes 2) Prestashop will remove the old thumbnails 3) Prestashop will start to re-create the thumbnails 4) After 75 seconds expire, you likely receive an error message or blank page of some sort. 5) Just ignore and go back to images page in back office 6) All subsequent times you regen images, you should select NO for "erase previous images", since you already did that 7) This time, Prestashop will start to re-create any missing thumbnails 8) It will either complete, or time out after 75 seconds. This all depends on how many images you have, and how powerful the CPU is on the shared environment. 9) Just continue to repeat steps 5 - 8 until all thumbnails are created Link to comment Share on other sites More sharing options...
Essemme_Forniture Posted January 22, 2015 Author Share Posted January 22, 2015 Yes, I mean if you added that value I mentioned to the original file. Since there are no overrides I don't understand why it's still 75 seconds. Is there any server-side caching like opc or alike? Using the xpresscache module? I added that value on the original file.. is there a way to understand if i've OPC using xpresscache module? cause i really don't know what it is.. i mean hehehe i'm a super noob Link to comment Share on other sites More sharing options...
Essemme_Forniture Posted January 22, 2015 Author Share Posted January 22, 2015 some hosts will not allow you to increase the time out setting. It won't complain if you try, it will just ignore it. 75 seconds is not too bad for shared hosting, and Prestashop already accounts for this type of issue, by simply allowing you to run regen images multiple times. 1) The first time you regen images, you should select "erase previous images" as yes 2) Prestashop will remove the old thumbnails 3) Prestashop will start to re-create the thumbnails 4) After 75 seconds expire, you likely receive an error message or blank page of some sort. 5) Just ignore and go back to images page in back office 6) All subsequent times you regen images, you should select NO for "erase previous images", since you already did that 7) This time, Prestashop will start to re-create any missing thumbnails 8) It will either complete, or time out after 75 seconds. This all depends on how many images you have, and how powerful the CPU is on the shared environment. 9) Just continue to repeat steps 5 - 8 until all thumbnails are created Thanks Bellini 13 i tried twice doing what you said... but i don't know how many times i've to do it, i've like 900 images, so i started first with (erase previous images) then, maybe 15 times the same thing without NO erase previous ecc...... but i didn't finish... the only strange thing that i found is under "abandoned cart" that i had super cart with lots of added item... You think that i've to do more than 15 times? Thanks a lot Link to comment Share on other sites More sharing options...
Essemme_Forniture Posted January 22, 2015 Author Share Posted January 22, 2015 Guys, if i install prestashop in local and i add my database and my original files by my hosting ( ftp ) and i re-generate images, then copy the folder img/p/ on my hosting can i have some troubles? or it will be ok? Link to comment Share on other sites More sharing options...
bellini13 Posted January 22, 2015 Share Posted January 22, 2015 it is a possible technique that could work. I cannot say how long it should take, it all depends on the horse power of your server. you can also reach out to your hosting provider and ask them why the limit is 75 seconds, and ask them how to override that. as i stated before, some hosts will prevent and/or ignore the override as they do not want long running scripts taking up valuable resources on a shared hosting server. Link to comment Share on other sites More sharing options...
NemoPS Posted January 23, 2015 Share Posted January 23, 2015 It should work, as long as you have the same img types and ids Link to comment Share on other sites More sharing options...
Essemme_Forniture Posted January 23, 2015 Author Share Posted January 23, 2015 Ok done, it's a little bit long, but now everything works. I think isn't a server problem, cause sometimes even when i change order status the broswer start to work and i get a blank page, even if the status is already changed.... this usually happens when i do it for the first time, if i do the same action 3 seconds later everything works perfectly... it seems a cache's problem.. or maybe i've something other.... maybe on my theme... i don't know. I'm going to put solved if someone doesn't understand how i did , contact me by message. (in the image the thing that i don't understand it remain green for too much time, like he's going to search for something that he doesn't find to finish the action) Link to comment Share on other sites More sharing options...
Recommended Posts