Jump to content
caffeineben

Problems after hosting company upgraded to Debian 10

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.

 

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Just a heads up that I added a note about the ModSec rules being tripped in another form post here: 

 

  • 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 luischacon
      Hello how are you, I need help on how I can solve this, update a module and now I don't know what to do

    • By quickjeff
      Hi Guys, 
      I have been debugging a site for the last 2 hours and cannot solve the issue. 
      I have a site running on 3.0.148. 
      I installed the Kongondo Blog module and was updating the templates to include the website style. 
      Once everything was set and done, I checked the page tree to see an error appear. 
      Template must be assigned a name before 'filename' can be accessed
      The same error appears in templates. 
      Debugging Steps
      I checked the templates in the server to ensure I didnt accidentally delete the namespace.  Deleted cache in browser and server under assets Still no go. 
      Any help is appreciated. 
      Thanks! 
    • By gswoodman
      Hello all,
      I have recently installed ProcessWire as I am learning to develop my own personal website.
      The installation process was completed, pressed 'Login to Admin' and I am receiving a 404 error.
      I am using a GoDaddy Shared Hosting Package with Plesk installed.
      Does anyone have any experience with using ProcessWire on a shared hoasting package?
      Many Thanks.
    • By alexcapes
      Hi,
      I have a small module I created that copies across field content from one page to multiple other pages.
      I just added a repeater field and while it copies across to the other pages it has caused timeout/memory issues with PHP. I think this is because of the multiple fields within the repeater (title, text caption, image) each being copied multiple times.
      I thought one way to help would be to not copy images across as they're not needed in the other pages.
      However I'm unable to figure out how to copy a repeater field excluding one field within the repeater itself.
      This is my current code:
      // Inline gallery 1 if(count($page->article_inline_gallery_1)) { $translation->of(false); $translation->article_inline_gallery_1->removeAll(); $gallery = $page->article_inline_gallery_1; foreach($gallery as $item) { $translation->article_inline_gallery_1->import($item); $translation->save("article_inline_gallery_1"); } } At the point that each repeater imported as a whole ->import($item) could anyone help to exclude one of the fields within the repeater?
×
×
  • Create New...