jQuery File Upload plugin - Empty file upload result - php

I've been playing about with this plugin over the last few days, customising it and setting it up to work exactly as my site requires. I got it all working fine on my localhost server, with no errors/bugs. However, when I try to upload it to my Plesk server, no files are shown onload (even though there are images in the target folder), and when I try to upload im presented with the " Empty file upload result" error. Oddly.. the file upload seems to work even though its displaying the error, and the relevant images appear in the folder. So it seems to only he having a problem with reading, but not with writing?
I've checked the permissions of the files and thumbnails folder, and set them both to 777, so that cant be the issue.
I really cant see why this is working on my localhost server but not my Plesk server. Any help would be much appreciated.

Finally solved this issue. The problem was that my Plesk server was running a very old version of PHP. Updating it to 5.3 seems to have cleared up my issues.

Related

Wordpress error: 'The uploaded file could not be moved to wp-content/uploads'

I've tried updating permissions to every possible combination for both the wp-content folder and also the uploads folder within it and it hasn't remedied the issue.
I also saw in a few threads of similar issues that adding
define('FTP_PUBKEY','/home/wp-user/wp_rsa.pub');
define('FTP_PRIKEY','/home/wp-user/wp_rsa');
define('FTP_USER','wp-user');
define('FTP_PASS','');
define('FTP_HOST','127.0.0.1:22');
to the wp-config file could help, so I tried that and now my site is getting an error 500 and not loading at all despite me having since removed the above code.
I know this question has been asked before but I've tried most of the solutions and have only managed to make the problem worse... any suggestions how to get the site working again after my blunder?
Posting incase this happens to anyone else. The hosting account for the site was at its data limit so the error for uploading was because there was no space to upload the files to and not the expected read/wright permissions.
When I updated the code on the page, instead of saving it saved the page as a blank template because again - no room left to save the file to.

Unexpected character and syntax error on wp-includes/formatting.php

I am getting an error on my WordPress website after changing the server. it's working on cPanel but not working on the AWS server.
I haven't change anything in this file.
This is just one screenshot. SO not allowing me to upload the code. Getting some error while uploding.
I don't know how I got this gray code on the formatting.php page. I found this code in more than 3 places.
I download the latest version of WordPress again and updated the formatting.php and It's starting working again.
Cause
If you use FileZilla like I do - that's where the problem comes from.
If you download your site contents with FileZilla, then the file contents get corrupted.
When you upload again, the 'unexpected characters' break Wordpress.
Behaviour
That explains why in my case, my DEV site was working fine.
But when I download/upload migrated the contents to a fresh QA instance then QA failed with the:
There has been a critical error on this website.
Solution
I used Nautilus to connect to my host as a Remote Server.
When I copied my formatting.php down through Nautilus, the file opened all clean.
The FileZilla FTP copy was dinged in 3 places.
WinSCP is also apparently fine with this.
Disclaimer: Not my own work
All thanks due to this comment:
https://wordpress.org/support/topic/parse-error-on-line-5925-in-formatting-php/

Troubles with XAMPP(or?)

I just started taking a PHP course and I'm having a lot of difficulties. I won't get anywhere unless this is resolved.
I got the course files downloaded and added them to htdocs folder but I can't run any new files I created. I get
Object not found! 404 error
I see them under localhost/coursefiles/whtever.php. I've google searched all day but can't find anyone else having this specific problem.
Would uninstalling and reinstalling XAMPP work? This is extremely frustrating and making me crazy.
First Check xampp manager Is your MySQL and Apache is in running state ?
Then Type Localhost in your browser , if Xampp Homepage is Coming It means Xampp is working Fine!
And again Checj your course files Extension they should have .php extension (if they are php files).
Create An folder In your Htdocs Folder With Abc(for example) and Write in browser's Url window "http://Localhost/Abc
if your Folder is opening and it's showing Files Then There must be a Problem with files! :)

Timthumb return blank, Why?

I have a wordpress theme with tim-thumb installed, the tim-thumb works fine when site was in local or in staging server (All images are shown as required). But when I upload this into live (Production server) into amazon dedicated server, it stop working for some specific images. Please check this link at Medisetter Image. It always return a blank. I don't know why. My guess is that it is a permission issue but I have recheck the permission with staging server it was same, 755. Oncee I change this to 777 but still it did not work.
Any one can helps me to solve this, Thanks.
I tried giving it a relative path:
http://www.medisetter.com/wp-content/themes/realestate-4/img_resize/timthumb.php?src=../../../uploads/2014/06/di8MEA4ie.png&w=598
But it returns an error that "The file you specified is <= 0 bytes.".
Which means it IS finding the file itself, but is unable to read it?

Uploading files wont work on production server

I have a php script which uploads images to a temporary folder on the server.
This works on my local computer with the local (virtual) server. (wampserver).
However, on the production server (linux) I cant get it working.
Everything is loading as it should, except for that the file doesn't show up on the server.
My Q is, is there anything I should think about when moving to a production server with uploading images or files?
I have set permissions on the folder where the images are supposed to go to 777 and also the php-code which uploads them to 777.
Thanks
is there anything I should think about
when moving to a production server
with uploading images or files?
Yes.
Error handling.
You have to keep in touch with PHP error reporting in general
and properly handle $_FILES['name']['error'] variable in case of upload.
These two sources will provide you with sufficient and precise information on any error occurred.
I highly recommend to you first to read this article before setting 777 permission on the server. Besides, there are different ways of uploading files are shown, so I think you will solve your problems after reading this article. Good luck
I know this question is old but I doubt any of the answers given are correct as I have had this exact problem and it turned out to be that when I created the php form I forgot to add this line to the form tag enctype="multipart/form-data" so processing the form on my local machine worked fine but when I tried to upload an image to the production server with the form it wouldn't process the image file, it would process all the other data from the form just not the file that needed to be uploaded. After I added the line above it worked fine.

Categories