Page 1 of 1

Fatal error: require_once()... /index.php on line 21

Posted: Mon Nov 25, 2013 9:33 am
by promichael
Hi,

I am using Crazydomain.com.au hosting service and after they upgraded web hosting, our website is down. :(
We haven't touched any code and used to work properly (www.laptoppanel.com.au), but they said our web coding has problem.

Here is the error message each time open the website.
======================================================
Warning: require_once(/home/laptoppa/public_html/system/startup.php) [function.require-once]: failed to open stream: No such file or directory in /home1/laptoppa/public_html/index.php on line 21

Fatal error: require_once() [function.require]: Failed opening required '/home/laptoppa/public_html/system/startup.php' (include_path='.:/usr/lib/php') in /home1/laptoppa/public_html/index.php on line 21
======================================================

Is anyone can give me some idea?

Cheers,
Michael

Re: Fatal error: require_once()... /index.php on line 21

Posted: Mon Nov 25, 2013 9:44 am
by cwswebdesign
Your config file isn't properly pointing to the directory that contains the startup.php file. More than likely the directory has changed since you said they upgraded servers.

DL

Re: Fatal error: require_once()... /index.php on line 21

Posted: Mon Nov 25, 2013 10:45 am
by promichael
So, what is the solution for issue? How can I fix this problem?

Cheers,
Michael

Re: Fatal error: require_once()... /index.php on line 21

Posted: Mon Nov 25, 2013 10:54 am
by cwswebdesign
promichael wrote:So, what is the solution for issue? How can I fix this problem?

Cheers,
Michael
Put this code in a new file and name it path.php Then upload it to your root directory and go www.laptoppanel.com.au/path.php and it'll tell you the full path. Take that path and edit both config files and re upload. If you want, you can make a copy of both config files before editing them. This is one step and if they've delete any files, you'll need to reupload them but hopefully this is the full fix.

<?php
$dir = dirname(__FILE__);
echo "<p>Full path to this dir: " . $dir . "</p>";
echo "<p>Full path to a .htpasswd file in this dir: " . $dir . "/.htpasswd" . "</p>";
?>

DL

Re: Fatal error: require_once()... /index.php on line 21

Posted: Mon Nov 25, 2013 11:21 am
by promichael
I just fix the problem. Thank you !!!!!!!!!!!!!!!!!!!

Cheers,
Michael
www.laptoppanel.com.au

Re: Fatal error: require_once()... /index.php on line 21

Posted: Mon Nov 25, 2013 11:53 am
by cwswebdesign
You're welcome.

DL

Re: Fatal error: require_once()... /index.php on line 21

Posted: Fri Sep 18, 2015 1:51 am
by dashisiong
I have to say thanks to cwswebdesign.

It works!!! Thanks alot!

Re: Fatal error: require_once()... /index.php on line 21

Posted: Wed May 11, 2016 9:32 am
by StormDesigner
Another appreciative OpenCart user. Same issue, this solution worked perfectly. Just updated the config.php files in the root and in the admin and BOOM! working. That path.php script made it very obvious where the problem was in terms of directory path.

Thank you DL, CWS Webdesign and Evolve Hosting.

Re: Fatal error: require_once()... /index.php on line 21

Posted: Mon Jun 13, 2016 7:08 am
by EvolveWebHosting
Glad to see this post is helping a few of you and probably more in the near future. It's an easy thing to over look.

Re: Fatal error: require_once()... /index.php on line 21

Posted: Wed Nov 15, 2017 12:06 pm
by warisaha
Hello everyone!

I'm also haveing the similar issue. My website is www.ddplus.us and I'm getting the following error.
Fatal error: require_once(): Failed opening required '/home3/deccanys/public_html/www.ddplus.us/catalog/model/module/wate ... ermark.php' (include_path='.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php') in /home/deccanys/public_html/www.ddplus.us/system/modification/catal ... /image.php on line 4

One more thing the admin login page i.e. http://ddplus.us/admin is loading but i'm unable to log into using the correct credentials.
Can anyone help me out. Thanks in advance!

Re: Fatal error: require_once()... /index.php on line 21

Posted: Thu Nov 16, 2017 1:47 am
by straightlight
warisaha wrote:
Wed Nov 15, 2017 12:06 pm
Hello everyone!

I'm also haveing the similar issue. My website is www.ddplus.us and I'm getting the following error.
Fatal error: require_once(): Failed opening required '/home3/deccanys/public_html/www.ddplus.us/catalog/model/module/wate ... ermark.php' (include_path='.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php') in /home/deccanys/public_html/www.ddplus.us/system/modification/catal ... /image.php on line 4

One more thing the admin login page i.e. http://ddplus.us/admin is loading but i'm unable to log into using the correct credentials.
Can anyone help me out. Thanks in advance!
Already replied on this post: viewtopic.php?f=191&t=199609&p=703213&h ... rk#p703213