I’m having this weird thing happen. My Zend Framework (PHP) web application that I have been developing locally works fine on my computer, but once it’s uploaded to the server, it thinks that the uploads directory doesn’t exist.
My application has an uploads directory which is a symlink to a directory outside of the application:
#local
/myapp.local
/application
/data
/uploads (symlink, points to ./../../shared_uploads)
/public/index.php
/shared_uploads
#remote
/shared_uploads
/current (symlink, points to ./releases/myapp-2009-12-18)
/releases
/myapp-2009-12-18
/application
/data
/uploads
/public/index.php
The server points to /current/public/index.php to serve up the application. Could it be that since it is actually in the releases directory that it’s one level deeper? Or could it be a permissions error since I created the uploads symlink on my local computer instead of on the server?
Update: In my /public/index.php file I’m defining my upload dir like this:
// Define path to uploads directory
defined('APPLICATION_UPLOADS_DIR')
|| define('APPLICATION_UPLOADS_DIR', realpath(dirname(__FILE__) . '/../data/uploads'));
The permissions shouldnt be an issue so long as your
UMASKis0022but the question is how are you uploading? FTP isnt going to respect a symlink (though i beleive sftp does) while scp or rsync will.Whit that said though its definitely your directory structure nesting. the symlink is should be relative from the true location of its parent so in your case thats going to be
ln -s ../../../../shared_uploads. i think the easiest solution here would be to make a symlink withinreleasesto refer to the realshared_uploads.