Value $_SERVER['DOCUMENT_ROOT'] detect as wrong
Value $_SERVER['DOCUMENT_ROOT'] detect as wrong
I tried to run php script http://vps6529.inmotionhosting.com/~mylogin/restore.php using temperary url, but error occurs that "this script must be started from Web Server".
This error occurs when not equal "realpath(dirname(__FILE__))" and "realpath($ _SERVER['DOCUMENT_ROOT'])". Why?
Using File Manager, I see that all files (scripts) should be placed in /home/mylogin/public_html and my restore.php script is placed that.
But value $ _SERVER['DOCUMENT_ROOT'] detect that the file placed in /usr/local/apache/htdocs. It's mean that the apache directive wrong or because I use temperary url? How can I fix it?
I tried to run php script http://vps6529.inmotionhosting.com/~mylogin/restore.php using temperary url, but error occurs that "this script must be started from Web Server".
This error occurs when not equal "realpath(dirname(__FILE__))" and "realpath($ _SERVER['DOCUMENT_ROOT'])". Why?
Using File Manager, I see that all files (scripts) should be placed in /home/mylogin/public_html and my restore.php script is placed that.
But value $ _SERVER['DOCUMENT_ROOT'] detect that the file placed in /usr/local/apache/htdocs. It's mean that the apache directive wrong or because I use temperary url? How can I fix it?