Forum
Issue with fresh installation of Perch on remote server
Hi,
I've succesfully installed Perch locally and pushed to my private git server (including Perch core) which then is pulled to the remote webserver. Incidentally, it's a Laravel Forge server, so NGINX, php 5.6 etc.
Locally all is fine, remotely when trying to access homepage I get:
Warning: include(/home/forge/vic-george.youi.design/public/perch/core/runtime/runtime.php): failed to open stream: No such file or directory in /home/forge/vic-george.youi.design/public/perch/runtime.php on line 2
Also, trying /perch I get:
Warning: include(/home/forge/vic-george.youi.design/public/perch/core/index.php): failed to open stream: No such file or directory in /home/forge/vic-george.youi.design/public/perch/index.php on line 3
I know its a directory issue, with files apparently not being there. I see that in perch/runtime.php it refers to /core/runtime/runtime.php - however I presume this isn't trying to access the server root, but the site root yes? Tried editing that to be the full correct path, but its the same issue. The site was fine as a static site, so nginx is set up ok for that site, is there somewhere that I have to tell perch 'where it is' on the server? A setting for the site's root directory on the server?
Any help appreciated...
I have looked on the server and can see the files where they should be. Perch knows where it lies on the server, because in the local diagnostics: DOCUMENT_ROOT: /home/vagrant/Sites/Victoria-Old_George/vic-george/public
Could it be the permissions for the files?
Can you show me the diagnostics?
No, because I can't access /perch. The second block of code in my first post is the PHP error that I get when trying to do so. Thanks
So this is a valid path?
Yes that is correct and that is how the server is configured to serve the site, from the public folder.
I just did a
pwd
in the perch directory to confirm this:/home/forge/vic-george.youi.design/public/perch
@Michael no I don't think that it is a permissions issue.
Have you checked the case of the paths? I noticed that your local path has mixed case.
Have you restarted the server to eliminate opcache as a cause?
Where should I check the case of the paths? The path isn't defined anywhere in perch is it?
Like I said the site ran fine as static php files before installing perch.
Yeah, I don't think this is specific to Perch - our code isn't getting to run yet, and the path is correct.
OK I see, thanks Drew. I'll take another look with a magnifying glass...
My suspicion would be opcache.
Although I had commented out the gitignore declaration in /perch/core, for some reason the core folder hadn't been included in version control.
Now that the /perch/core folder is present, all is working correctly.
Great. I tried to help!
Thanks Drew, all my fault as usual! Much appreciated!