Question

So I'm new to Laravel 4, and I'm trying to figure out how to Symlink two parts of my site.

The first is apps/storage The second is public/cache (this is where an image cache is stored)

I'd like to move both of these to a SSD on my server, however Laravel keeps throwing out an error whenever I try and setup these Symlinks.

That error is:

ErrorException
file_put_contents(/meta/services.json): failed to open stream: No such file or directory

Clearly it's unable to find the filesystem and the symlink isn't working with Laravel. But the symlink DOES work with individual files (such as a jpeg), so I'm positive there is no problem with the initial setup.

To clarify, the document root is set to httpdocs/public (via Plesk settings)

The apps (and framework) are located in the httpdocs folder which is no longer serving as the vhost root.

As I hinted at, it's a Plesk server. The owner belongs to the vhost, and the group belongs to psacln. But I don't think there are any permission/ownership problems, as I've verified the symlinks are working.

No correct solution

OTHER TIPS

Looks like you have messed something else, because the path in the error message looks wrong to me:

file_put_contents(/meta/services.json)

IMO, it should be something like:

file_put_contents(/var/www/webapp/app/storage/meta/services.json)

Because, if you have done the symlink correctly you did something like

mv /var/www/webapp/app/storage /mnt/ssd/
ln -s /mnt/ssd/storage /var/www/webapp/app/storage

PHP is trying to write a file in the root /meta folder, where probably it doesn't have right.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top