Timthumb can't show image after it's uploaded - wordpress

I'm using Wordpress plugin called User Avatar, that uses Timthumb for image display. When I open page to show the image, it gives error 500 in the console, and when I use that image link in new tab, I get following error:
A TimThumb error has occured
The following error(s) occured:
Could not create the index.html file - to fix this create an empty file named index.html file in the cache directory.
Could not create cache clean timestamp file.
Query String : src=http://my.domain.com/wp-content/uploads/avatars/1/1358504649-bpfull.jpg&w=150&id=1&random=1358504649
TimThumb version : 2.8.10
I persume it's a server error or misconfiguration, everything is being uploaded into folder uploads, then into avatars subfolder, which has 0777 permission, folder 1 also has 0777.
Insinde, there are both cache and temp folders, both with 0777 permissions.
GD Image Lib is enabled on the server.

Look in your timthumb-config.php, to check if the FILE_CACHE_DIRECTORY is set to the directory you think it is.
You could also delete the existing index.html file that's in the tim thumb cache directory, as tim thumb will automatically create it (back it up somewhere first just in case)
You may also need to check the config file to see if the MEMORY_LIMIT is set high enough for your particular images.
You should also check that the cache folder is owned by the webserver and not by you.
Other troubleshooting help here: http://www.binarymoon.co.uk/2010/11/timthumb-hints-tips/

Just like #jopacic said. What also worked for me was the following:
Changing the "cache" directory permission to 777
Deleting index.html file in the "cache" directory
Try that, it should work

Related

Error when loading wordpress theme directly as a folder [hosting on appengine]

After mysteriously losing site administrator access to my wordpress installation, I tried uploading the theme into the wp-content/themes folder directly.
However, I get the following error when attempting to access the main page now
{"success":"-1","alert":"Cannot write style-custom.css file, you may try setting the style-custom.css file permission to 755 or 777 to solved this. ( If file does not exists, you have to create it yourself )"}
How can I solve this?
Thanks
I have the same problem with the bluediamond themes.
To fix this issue I have changed by FTP the permissions on the file style-custom.css (The correct permissions is 777) locate in the root of the theme "wp-content/themes/bluediamond".

Permission denied error in wordpress 3.3.1

I once moved my wordpress directory one level up on my server (its now in the root). Everything seems to work fine for a while but niow i'am starting to have troubles with uploading images.
When i try to include an image by uploading it from my computer wordpress throws an "Permission denied" error:
copy(/home/bram/domains/dutchmountaineer.com/public_html/wp-content/uploads/2012/05/Costa-Rican-Frog.jpg)
[function.copy]: failed to open stream: Permission denied in
/home/bram/domains/dutchmountaineer.com/public_html/wp-admin/includes/file.php on line 348
618
I tried setting the uploads and includes folder to 777 which had no effect. I have set them back to 755.
Any help please!
Jorrit
EDIT:
I tried changing the full path (in media settings) but it was of now help. I think it since i moved the wp installation from /wp/ to the root of my server
Check who owns the directory. It may be possible that you need to add www-data to the group. Weird, yes, but I sometimes encounter scenarios where even files and directories with 777 are denying me access if I don't add my user to the owner group.
It means you are getting error near this code
// Copy the temporary file into its destination
$new_file = $uploads['path'] . "/$filename";
copy( $tmp_file, $new_file );
unlink($tmp_file);
check your settings under settings->Media tab in admin panel and check you have the appropriate permissions for the folder, you can change the upload path as well. Let me know if problem still persists.
You have to allow uploads directory 777 rights and check your folder user and ftp user are same or not.

WordPress update failing

I'm having a problem when trying to update WordPress to the latest version I get the following error:
Download failed.: Destination directory for file streaming does not exist or is not writable.
Installation Failed
I'm also having the same problem when uploading images, it fails and gives the following error
has failed to upload due to an error
The uploaded file could not be moved to "the website path and then uploads directory"
I have checked the permissions of the folders and the folders themselves are set to 755 & the files inside them set to 644.
Could anyone tell me why it would be doing this?
Where running a plesk server.
Thank You,
Mark
Are there any more error messages, probably also in the servers log files? Probably the download for the update should be done to /tmp and you are not allowed to store files there? Try setting the constant WP_TEMP_DIR which should change the directory. Put something like this in your wp_config.php:
define('WP_TEMP_DIR', ABSPATH . 'wp-content/');
The permissions you're using seem reasonable, but they will only work if the FTP user that WordPress is using (set in your wp_config.php file) is the same as the owner of those files/folders.

Images in FTP but URL says page not found

So I have been reading all i can for the last 2 hours and have not a solution.
I moved my drupal site from one host to another, all works well minus:
images in the the 'sites/defualt/files' folder are in the FTP and i can priview them there but when got to the URL I just a page not found message.
example image URL: http://www.example.com/sites/default/files/image.jpg
this what's in my code and the path is correct but the image does not show.
Here's what I have checked:
Clean url's are enabled,
'admin/settings/file-system', set to public
'admin/settings/file-system', File system path: 'sites/default/files' as it should be
.htaccess in files folder is set to
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
# Options None
# Options +FollowSymLinks
and I have tried it with '#' removed
I have tried leaving the settings.php $base_url ="" blank and with my exsample domain
I have the files folder set to cmod '777'
Checked the database files table, path is set to 'sites/default/files/imagename.png', which seems right
image names do not have spaces in them.
I have been flushing the cache for the testing different settings
I have run the cron as well.
I don't know what I am missing the files are there, the paths are even correct when i look at the rendered html, but the images are just not showing and the direct urls say 'page not found'
Any Help would be awesome, I thought i had this problem before and solved it but i have no idea I missed.
Thanks for any help
Hhmm, have you checked that all parent folders have at least the execute flag set so that you can browse into them? I think it is safe to set all folders as: 755
Another way to debug this is trying to download other files contained in other folders, e.g. the README in root or some files in the misc/ and modules/ folders.
Just deleted .htaccess file inside default/files it solved the issue for me..I dont exact lines of code need to be there in .htacces file..

Wordpress Blank Install Page

I uploaded a freshly downloaded copy of Wordpress 4.2.2 here: http://www.onedayonemillion.com/test/ and all I get is a blank page.
There are no .htaccess or wp-config.php files in the root directory.
No database has been connected yet.
I tried the same in another directory (/dev/) and it did the same.
I have no plugins installed or activated.
This is a fresh copy.
I added an phpinfo file here: http://www.onedayonemillion.com/test/info.php
Why can't I even get the install page to show up?
I didn't understand why there is no wp-config.php in the directory, it would be good you post what is in the directory. Anyway, you can check items like (sometimes it is just that):
some files with no ending "?>" ending the file;
any require_once methods calling non-existing files
(you said no, but) wp-config has wrong or non-set definitions (user, database)
check permissions/ownership to the folder
Well, I know it can be lame, but I had problem with definition in WPLANG define,
so I put an
echo "<br> there is no error until here";
through the files untill I find that was missing a comma at the definition. If the phrase is displayed, your installation files untill that point are working out.
Your phpinfo says the display_errors is off.
modify your php.ini with this line:
display_errors = on
you should restart the server after modification.
you can only track the error only if the error reporting is on in the server

Resources