Cannot upload images or pages
If you have difficulty uploading images or pages to your site, or are getting a message such as:
Warning: ftp_connect() [function.ftp-connect]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution Warning: ftp_login() expects parameter 1 to be resource, boolean given
Warning: ftp_put() expects parameter 1 to be resource, boolean given
It means that your upload settings are incorrect. To fix this:
- Check your FTP details. If the FTP password has changed, you'll need to change it here as well. (Note: if you are getting any of the above errors, start here, as it tells us that the FTP details are incorrect!)
- Check your folder permissions. Most sites do not need to make the directories world writeable, so make sure that all folders have the permission level 755. If you are using FTP variables, or if your site is using PHP as CGI or phpSuExec, you most likely do not need to make the folders world writeable.
- Check to see if your web host allows uploads. Some do not allow FTP uploads, and some do not allow uploads at all.
- Ensure that the FTP path is correct, if you are using FTP methods. Check with the web host to get the correct path.
- Make sure that the /images/ directory exists. (if you have changed the folder names from 'images' to something else, make sure that directory exists)
If you still can't seem to get it to work, and you've gone over the settings over and over again, try removing the FTP details from the config.php file. If your server is using PHP as CGI mode, you may be able to upload files without changing the folder permissions or using ftp details in the config file. You might also want to replace the website URL in the ftp site setting with 'localhost'.