Timthumb return blank, Why? - php

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?

Related

Configuring php/MVC on server

I have a created a project in HTML/PHP and I am trying to upload everything to the server. I am not that familiar with servers other than the fact that your first page must be an index.php/htm file and that everything goes in the public_html folder. I am using MVC(codeigniter) so adding it to the server doesn't seem so straightforward. I have attached an image of my directories, the first file when viewed locally is the controller class which is home.php inside /application/controllers. If I just drag everything to the server as is, then I receive a 500 Internal Server Error. Can anyone help me fix this please?
The problem with a 500 internal server error is that's it's a generic message.
Try checking:
File / folder permission (No files or folders should be set to 777, 755 should be the maximum permissions setting.)
If you're using short tags: short_open_tag=On in php.ini
Incorrect syntax in .htaccess file (Try removing - test - recreate)
check error.log for more detailed information.
Hope any of this helps, I'll keep an eye on this topic.

Replacing PHP file - file doesn't work anymore

I have a weird problem I cannot seem to solve (as a php noob).
I am working on simple php site (no sql involved). Everything was working perfectly till the moment I decided to copy over the files and edit them on another computer. All worked fine on the other computer as well. Then I took the files and copied them to the first computer again. Here came the problem: if I try to open ANY file copied from the second computer, it doesn't show anything, just a blank page. Even if the file was not edited at all on the second computer.
For example my index.php:
1. Copied from comp 1 to comp 2, no edits done
2. Copied from comp 2 to comp 1
3. Opened in the browser -> blank page
What's going on here and how to solve it? Is it some cache that apache is keeping? How to clear it? Both computers with OSX, however the second one was running MAMP, while the first had php/apache/sql set up.
Your permissions need to be set up correctly. Do the following:
Change the owner of the group to your user
chmod 0755 all the directories
chmod 0644 all the files
Then you are good to go!
You need to make sure that your permissions are set up correctly.
Apache Permissions
The blank page is displaying because Apache is encountering a PHP error somewhere, but is not set to display PHP errors.
Check out what is going on in your Apache error log and work from there. You could also look in the Developer Tools of a browser like Chrome, or use Firebug, to see what response your browser is getting from the server (most likely a HTTP 500 error).
I wouldn't recommend blindly changing ownership on files and directories until you know what is going on.

laravel 4 blank page on live server - 500 error

My laravel site is working correctly on my local apache server and WAS working correctly on my remote live/development server. I carried out an ftp sync last night and now all I can get is a blank white page.
In the console I can see an error status 500 internal server error
I've read similar posts on this suggesting folder permissions and using filezilla I have set the permissions on all files and folders to 777 - I've also tried 775.
I've deleted all the remote files and re-uploaded them (and set permissions again).
I've checked the .htaccess settings (which are standard)
No log files are being created
I'm not sure what I can check next - can anyone help please
Thanks

jQuery File Upload plugin - Empty file upload result

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.

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