Jump to content
rushy

unable to upload images on new server

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By cmg
      I have just installed PW, with apparent success - but at the very end I got a series of error messages relating to the file Session.php:
      Warning: session_name(): Cannot change session name when headers already sent in /homepages/15/d465648144/htdocs/4x3/wire/core/Session.php on line 246
      Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /homepages/15/d465648144/htdocs/4x3/wire/core/Session.php on line 249
      Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /homepages/15/d465648144/htdocs/4x3/wire/core/Session.php on line 250
      Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /homepages/15/d465648144/htdocs/4x3/wire/core/Session.php on line 251
      Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /homepages/15/d465648144/htdocs/4x3/wire/core/Session.php on line 252
      The home page of my site displays OK, but when I click on the nav buttons I get errors. Same when I use the admin URL.
      Help!
      Chris
       
       
       
       
       
    • By Markus (Blue Tomato)
      We have created a module to create BlurHash strings for images while uploading in ProcessWire. This blurry images will be saved in the database because they are very small (20-30 characters) and can be used for Data-URL's  as placeholders for image-lazy loading.
      https://github.com/blue-tomato/ImageBlurhash
      E.g. where we use this in production:
      https://www.blue-tomato.com/en-INT/blue-world/ https://www.blue-tomato.com/en-INT/blue-world/products/girls-are-awesome/ https://www.blue-tomato.com/en-INT/buyers-guides/skateboard/skateboard-decks/ https://www.blue-tomato.com/en-INT/team/anna-gasser/
    • By horst
      Hi, on a site I want to disable access to original images and only allow to access thumbnails and watermarked image variations.
      EDIT:
      A good solution for protecting original images can be found a bit down in this thread:
       
      Old content of this initial post:
       
    • By Guy Incognito
      I seem to be running into a repeated fatal error in a fresh PW install version 3.0.148. I can't quite put my finger on the pattern but it seems to be around deleting image fields or removing images from certain image fields.
      This is the trace from the log generated by trying to save a page and delete an image from an image field:
      Fatal Error: Uncaught Error: Cannot access protected property Pageimage::$original in /wire/core/PageimageVariations.php:256 Stack trace: 1. /wire/core/Pageimage.php(1327): PageimageVariations->getInfo() 2. /wire/core/Wire.php(386): Pageimage->___isVariation() 3. /wire/core/WireHooks.php(823): Wire->_callMethod() 4. /wire/core/Wire.php(450): WireHooks->runHooks() 5. /wire/core/Pageimage.php(1369): Wire->__call() 6. /wire/core/Pageimage.php(399): Pageimage->getOriginal() 7. /wire/core/WireData.php(333): Pageimage->get() 8. /wire/core/PageimageVariations.php(256): Pro Line 256 of /wire/core/PageimageVariations.php Earlier in the day I was experimenting with custom fields for images for the first time and kept running into this error, thinking it was me using this feature wrong and not having time to read up I deleted the custom image fields template and went about my business. So now I don't know if I triggered an issue or whether it was never related to the custom image fields in the first place?
      Any ideas?
    • By humanafterall
      I'm using some Custom fields for images: 
      https://processwire.com/blog/posts/pw-3.0.142/#custom-fields-for-files-images

      When I save the page, and return the fields are blank. When I re-add the text to the fields and save again then the fields save as expected.

      I know this is stated as being quite experimental but it's super useful feature I'd love to get working correctly.
      I have fields that are CKEditor fields but have overidden this on the image specific template. I've also tried it with regular text fields and I get the same bug.
      (currently using Processwire 3.0.155)
      **UPDATE**
      I've found this issue is specific to editing on pages using the PageTable fieldtype. The fields are not saving when I save the page in the PageTable.
×
×
  • Create New...