We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum
Temporary testing site calling different root path
I realize this isn't strictly a Perch issue but I'm curious how other dev/designers work with this problem. We are unable to see the site that we are staging on remote server because the $_SERVER['DOCUMENT_ROOT'] call is wrong. We received this reply from our hosting server. We are staging a site rebuild in a temporary location as the url is active:
The reason this isn't working is that your use of $_SERVER['DOCUMENT_ROOT'] is pulling the server's actual document_root which is /var/www/html/ since you are using the temp url to view the site and not the domain. If for instance view it via the hosts file or at https://hosts.cx/ Just input the domain and server ip 184.108.40.206 then generate a url to test at.
> To use the temp url you'd need to define it first and use it instead of Document_root. Changing the first lines of:
<?php include($_SERVER['DOCUMENT_ROOT'] . '/perch/runtime.php'); ?>
<?php include('/home/first746/public_html/perch/runtime.php'); ?>
====== I ran the hosts.cx request and the url is below. But it still rejects calls to db
Any suggestions/help with this would be very welcome. I'm really hoping I don't have to hard-code a new directory path onto current site but maybe that is my only solution. I'm not a php developer. A designer only.
Want to reply to this thread?Login with Perch