Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Dear all,

i Just Move my website local host to Live server, when i open index.php through server, getting below error message

PHP Warning: require_once(/admin/cms.php): failed to open stream: No such file or directory in /home/svsathya/public_html/mabs/index.php on line 1
PHP Fatal error: require_once(): Failed opening required '/admin/cms.php' (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/svsathya/public_html/mabs/index.php on line 1


I renamed the installation's 'couch' folder to 'admin' folder. Localhost the website works fine without issues.

Any help would be much appreciated !

Attachments

Hi,

Could you please let us know the first line of PHP used in your index.php template?
It is usually the following (using 'admin' instead of 'couch' in your case) -
Code: Select all
<?php require_once("admin/cms.php"); ?>

but that path needs to be tweaked for templates that in sub-folders as shown in the following thread -
viewtopic.php?f=4&t=7246#p9983

Assuming the first line is what I mentioned above, then it should work for -
Code: Select all
public_html
    |_admin
    |_index.php

and also for -
Code: Select all
public_html
    |_mabs
        |_admin
        |_index.php

Please note that in both the configurations above, the template is at the same level as the 'couch' ('admin') folder.

Had the configuration been this -
Code: Select all
public_html
    |_admin
    |_mabs
        |_index.php

where now the template is located one level deeper than the admin folder, the PHP statement would need to be made -
Code: Select all
<?php require_once("../admin/cms.php"); ?>

Does this help?
2 posts Page 1 of 1
cron