-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with AJAX File Uploads in 2.6.0. #1174
Comments
This is caused by one specific PHP 5.6 issue/feature/change. Here's a related PHP bug report, and this blog post discusses the effects in detail. The comments section for the blog post has clarifications from one PHP dev, who explains why they had to add new ProcessWire doesn't use For the record, this is also discussed here: matomo-org/matomo#6465. |
Just had a closer look at the PHP bug report, and it seems that |
If ProcessWire isn't even triggering this one, I'm not really sure how to respond to it. If there was some way I could suppress the error message, that would seem appropriate. But given that we're not using $HTTP_RAW_POST_DATA, that leaves the question of where to even code around this. The error message mentioned above mentions file "Unknown line 0" so it appears to be occurring within PHP itself rather than somewhere in PW. Btw, I'm running PHP 5.6.2 under MAMP, but not seeing this issue here. |
Hi. I get the same error after upgrading from 2.4.0 to 2.6. |
I have the same issue as stereonom - after update to PW 2.6 |
@stereonom Just checking, but by "always_populate_raw_post_data is off" do you mean it's 0, or is it -1as explained above? @qqnamunew Same question, could you check the value of the always_populate_raw_post_data php.ini setting? :) |
@teppokoivula |
Taking another look at this, I'm a bit confused as to why this error would appear in PHP 5.4 at all. According to all the sources I've found so far, including official PHP changelogs, the deprecation notice you're seeing was introduced in 5.6.0. Unless PHP devs (or someone else) has backported (?) it to the 5.4 branch (perhaps along with security fixes), this shouldn't happen in the first place. @stereonom, there are couple of things you might want to check:
|
Here are the settings, our provider df.eu set for us (just to see how others set this): |
@teppokoivula
The same error shows up on other updated instalations on the same server. |
@qqnamunew At this point I'm pretty sure that this is another issue entirely. Just to make sure, I would check what the AJAX request actually contains. This should be visible in your dev tools, Network tab (for Chrome). Find the request, and check what the "response" tab for it says. You'll probably find some unexpected (HTML) markup there. @tbba For PHP 5.6, this should be -1 to avoid the notice, though that could also have negative impact on other (outdated) applications on the environment, so a web host might not be too keen to set that as the default for all users. For this particular issue PHP < 5.6 are irrelevant, unless someone actually backported this "feature" there, which still sounds kind of unlikely. |
@teppokoivula You are right. I get this in response:
|
Looks like you've got something injecting JavaScript into your requests
|
@ryancramerdesign Thank you for your advice. I checked all files it many times but that what you said pointed me the problem. It was code for statistics added by hosting provider. |
@teppokoivula Even adding But…I get a different error now with 2.6.1 |
I just started having the same problem with uploading images. I noticed this on an existing ProcessWire 2.7.2 site and just tested on a fresh new site. I disabled all non core modules and added always_populate_raw_post_data = -1 to my php.ini. If I check my phpinfo.php it say's "always_populate_raw_post_data = 0". It didn't make any difference. I've tried the same in firefox, chrome, and safari.
What did work for me was turning on xdebug. After I enabled xdebug, my uploads starting working again....Strange Hope that helps someone |
I just upgraded my homebrew php installation with brew install php56 and brew install php56-xdebug. I then disabled xdebug and now file uploads are working again. Just thought I would share in case anybody else was still running into this issue. |
I've just bumped into this as well, on an oldish site I'm adding content to:
Using PHP 5.6 as well. |
Hi,
I'm getting the following issue reported back to the browser console when trying to upload images via the default file uploader in the admin section:
Digging further, I think it's because PHP is actually generating this in the response back to the browser after a successful image upload:
Looks like the second part in the response (the bit that's actually a JSON response) is what the script is expecting to see, but instead it's trying to parse the warning message back from PHP (I'm running PHP 5.6.3 on my Mac if that helps).
I reckon I can turn this warning off to fix the issue, but I've seen this reported a few times in the forums so it might be worth putting a fix in place for if possible. Unfortunately I'm not sure $HTTP_RAW_POST_DATA is populated, so I can't fix myself right now!
The text was updated successfully, but these errors were encountered: