Jump to content

Recommended Posts

Posted

Hi. I've been using Processwire for a few years now and installed it on a few different shared hosting servers without issues, but I'm now running into an issue on a Fasthosts shared server that I've not seen before. The installation goes ok and I have a working default site profile but I am unable to complete any uploads of images. It just hangs at the progress spinner during the upload. I thought it might be a priviledge issue so have temporarily set the dir / file privs. as 777 / 666 just to test that but it made no difference. I have no errors in the wire log. In server error log I have:

 set_time_limit() has been disabled for security reasons in ....htdocs/wire/core/ImageSizerEngine.php on line 1035

and i note in the assets/file dir. where the image is being stored the date on the file being created has a year of 1970 and 0 length. If I leave the page this file disappears and nothing has been stored. 

Does anyone know how I can enable set_time_limit if this is likely to be the problem? 

Many thanks! Paul

Posted

you can temporarily put it inside your _init.php file, or your template (or I guess even in site/config.php).

Perhaps you can set it in .htaccess too (depends on the server setup).

Posted
14 hours ago, dragan said:

you can temporarily put it inside your _init.php file, or your template (or I guess even in site/config.php).

Perhaps you can set it in .htaccess too (depends on the server setup).

I had no luck with any of the above, in the _init or config.php it gave an error as it's disabled by the host and in .htaccess the site did not run it just displayed a config error.   Fasthosts have replied to my question saying there is no option to use set _time_limit on shared hosting. (see below)

As a workaround I have commented out the set_time_limit call in the core and it works ok - for now...

 

Quote

 

Please be advised that settings in the shared hosting are set to default thus there is no option to adjust the set_time_limit. Can you try disabling the .htaccess file to see if it works?
 
 
Thanks again for contacting us.

 

Posted

You should check via phpinfo if there are more disabled functions or more restrictions on that hosting account. If yes, I would overthink to upgrade or switch to another.

  • Like 1
Posted

Thanks Horst. I created a test file with echo phpinfo() and found in the core table output the following listed as disabled:

disable_functions   shell_exec ,exec, system, popen, set_time_limit

this for both local and master value columns in the table.

i note your comments about switching or upgrading host!

Paul

   

 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...