SOLUTION to "Warning: require_once... Fatal error: require_once()"
Permalink Browser Info Environment
I have had this happen a few times over the years when moving sites and I always forget the simple solution. It always takes quite a bit of searching before I finally find the answer, too, so I am just posting it here with a really obvious title so it is easy to find.
If you have just moved your site from local to live, let's say, and you get an error message like this:
It looks scary at first because the whole website appears to be broken if that Designer Content block you made was on your homepage.
But, your whole website is NOT broken. All you have to do is go to your dashboard and clear the cache.
How to get to your dashboard:
(A.)www.www.yourdomain.com/index.php/dashboard...
or
(B.) Temporary URL version for sites that aren't live yet:
http://51.76.243.107/~example/index.php/dashboard...
or
(C.) Temporary URL version for sites that aren't live yet on a plan with unlimited domains:
http://51.76.243.107/~example/yourdomain.com/index.php/dashboard...
*These temporary URL setups follow Hostgator's temporary URL setup, but I think it is a fairly common way for hosts to set up temporary URLs... Example B is Hostgator's Hatchling plan for single domain hosting and C is Hostgator's Baby plan for unlimited domains... ~example is the root domain and ~example/yourdomain.com are all the additional domains you add to the hosting account, so if you're having this error message on your root domain, always use example B format.)
If you have just moved your site from local to live, let's say, and you get an error message like this:
Warning: require_once(/usr/home/user/public_html/domain.com/new/concrete/blocks/home_box_content/controller.php) [function.require-once]: failed to open stream: No such file or directory in /usr/home/user/public_html/domain.com/new/concrete/core/models/block_types.php on line 824 Fatal error: require_once() [function.require]: Failed opening required '/usr/home/user/public_html/domain.com/new/concrete/blocks/home_box_content/controller.php' (include_path='/usr/home/user/public_html/domain.com/new/libraries/3rdparty://usr/home/user/public_html/domain.comnew/concrete/libraries/3rdparty:.:/usr/local/lib/php') in /usr/home/user/public_html/domain.comnew/concrete/core/models/block_types.php on line 824
It looks scary at first because the whole website appears to be broken if that Designer Content block you made was on your homepage.
But, your whole website is NOT broken. All you have to do is go to your dashboard and clear the cache.
How to get to your dashboard:
(A.)www.www.yourdomain.com/index.php/dashboard...
or
(B.) Temporary URL version for sites that aren't live yet:
http://51.76.243.107/~example/index.php/dashboard...
or
(C.) Temporary URL version for sites that aren't live yet on a plan with unlimited domains:
http://51.76.243.107/~example/yourdomain.com/index.php/dashboard...
*These temporary URL setups follow Hostgator's temporary URL setup, but I think it is a fairly common way for hosts to set up temporary URLs... Example B is Hostgator's Hatchling plan for single domain hosting and C is Hostgator's Baby plan for unlimited domains... ~example is the root domain and ~example/yourdomain.com are all the additional domains you add to the hosting account, so if you're having this error message on your root domain, always use example B format.)
Type: | Discussion |
---|---|
Status: | New |
In case it helps someone, I had the exact same issue after upgrading to C5.6.3.1 and after banging my head against a wall I noticed that the error message referred to a block name that was different to the actual one I created with Designer Content. It turns out I had made an earlier attempt at it, but deleted/uninstalled it. However, the "BlockType" table in the database still stored a line for that block type. I just had to go into phpMySQL, open "BlockType" table, and delete that row and the problem was fixed.
Interesting, I remember doing something similar in the past, but I couldn't get it to work. Probably because I'm not all that familiar with deleting stuff in phpMyAdmin.
It seems like just navigating to the Cache page in the dashboard and clearing it works most of the time for me, even though I clear cache before I export everything, so I don't quite understand why this problem persists until cache is cleared again on the newly created/transferred site. Maybe it has something to do with blocks on old versions of pages (?). I just learned something about that in the C5 video tutorials on Youtube.
It seems like just navigating to the Cache page in the dashboard and clearing it works most of the time for me, even though I clear cache before I export everything, so I don't quite understand why this problem persists until cache is cleared again on the newly created/transferred site. Maybe it has something to do with blocks on old versions of pages (?). I just learned something about that in the C5 video tutorials on Youtube.