Jump to content

Problems after hosting company upgraded to Debian 10


caffeineben
 Share

Recommended Posts

My hosting company (Dreamhost) upgraded their VPS accounts from Ubuntu 14 (also known as Trusty) to Debian 10 (aka Buster). Since they have done that, I can no longer upload photos through the PW admin. Most of my templates use the Images field and when I go to upload an image - no matter the size, I just see spinning over the image icon. I checked my console and get the following errors:

[Error] Failed to load resource: the server responded with a status of 418 () (edit, line 0)
[Error] SyntaxError: JSON Parse error: Unrecognized token '<'
    parse (JqueryCore.js:2:13595)
    parseJSON (JqueryCore.js:2:13595)
    (anonymous function) (InputfieldImage.min.js:1:35271)

I have multiple sites hosted by Dreamhost and this is now happening on all sites.  I am using Processwire 3.0.165. PHP 7.4.

I don't know what other info is helpful so please let me know if you have any ideas. I have filed a ticket and suspect this is a result of the upgrade as all these sites worked previously. And the sites still work - just can't upload and save to the images field.

 

Link to comment
Share on other sites

4 hours ago, caffeineben said:

My hosting company (Dreamhost) upgraded their VPS accounts from Ubuntu 14 (also known as Trusty) to Debian 10 (aka Buster). Since they have done that, I can no longer upload photos through the PW admin. Most of my templates use the Images field and when I go to upload an image - no matter the size, I just see spinning over the image icon. I checked my console and get the following errors:

[Error] Failed to load resource: the server responded with a status of 418 () (edit, line 0)
[Error] SyntaxError: JSON Parse error: Unrecognized token '<'
    parse (JqueryCore.js:2:13595)
    parseJSON (JqueryCore.js:2:13595)
    (anonymous function) (InputfieldImage.min.js:1:35271)

I have multiple sites hosted by Dreamhost and this is now happening on all sites.  I am using Processwire 3.0.165. PHP 7.4.

I don't know what other info is helpful so please let me know if you have any ideas. I have filed a ticket and suspect this is a result of the upgrade as all these sites worked previously. And the sites still work - just can't upload and save to the images field.

 

Good Day,

I utilize Dreamhost VPS for all of my company related websites.  My clients mostly utilize Dreamhost shared hosting services.

I took note of your problem and took a quick look at my company related websites.  I upgraded one website from ProcessWire 3.0.151 to 3.0.165.  I then upgraded my PHP from 7.3.24 to 7.4.12 on that particular website.

I am able to upload pictures to my image fields.  The only problem I had was for images that had a resolution of 5312 x 6875 (5 mb) and 6741 x 4166 (796 kb).  These would have the spinning over the image icon.   

I  was able to upload a 4032 x 3024 (3 mb) image with no problem. Other images of lower resolution uploaded without any issues.  I honestly don't know if this problem existed before on the VPS as I hadn't been loading high resolution images on any of my websites.

On two of my client's website (on Dreamhost Shared Hosting), i am able to load the same high resolution images that I couldn't load on the VPS related websites without an issue.   The websites that I could load the high resolution images were at PHP 7.4.11 and using ProcessWire 3.0.153 and ProcessWire 3.0.165

 

 

  • Like 1
Link to comment
Share on other sites

5 hours ago, caffeineben said:

Since they have done that, I can no longer upload photos through the PW admin

Maybe a file and directories ownership issue since you state that:

5 hours ago, caffeineben said:

when I go to upload an image - no matter the size

I am assuming you have also tested with 'small sized' images. 

I would look into file and directories ownership first. The usual scenario is there is a www-data user and group. ProcessWire would belong to that group and will be able to write to /site/assets/files/.  Have a look at this page to troubleshoot permission issues:

https://processwire.com/docs/security/file-permissions/

Regarding this:

5 hours ago, caffeineben said:

[Error] SyntaxError: JSON Parse error: Unrecognized token '<'

It usually means PHP responded with a fatal (or other) error. If you have $config->debug = true, or better, have TracyDebugger installed, you will see the exact error the server returned. You can also see these in your sites error logs. The text of the the response breaks the JSON (malformed), hence the Unrecognized token....

5 hours ago, caffeineben said:

the server responded with a status of 418

This is the so-called 418 I'm a teapot response! ?.Basically, the server is saying you are asking it to do the impossible; brew coffee but it is a teapot! You can read more about it here https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418 and how an April Fool's joke turned into this status by reading here https://sitesdoneright.com/blog/2013/03/what-is-418-im-a-teapot-status-code-error .

Edited by kongondo
typo
  • Like 4
Link to comment
Share on other sites

  • 3 months later...

In case you are still experiencing this, it appears it is related to the server upgrade, a mod_security issue, not ProcessWire. I just ran into this myself and my searching led to an acquaintance's similar issue in this post. I filed a support ticket with DH and expect they'll get it fixed shortly. It is probably a per-domain or per-account issue, so I'd suggest contacting support if you haven't already.

  • Like 2
Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

Just a quick note to say it happened again and it was once again related to Processwire updating the OS of their services - in the process resetting ModSec rules. They went through and had to manually reset all the rules for all my sites and all working again. Thank you @Hani and @gRegor. Last time this happened was the end of 2020 and I had forgotten that was what was causing the spinning wheel when trying to upload even small images in the admin. A quick search brought this thread up and I was able to quickly get things resolved with help from Dreamhost because I knew the issue. Your help is much appreciated!

Link to comment
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
 Share

×
×
  • Create New...