You are here:  » Fresh install issue


Fresh install issue

Submitted by rickdebruin on Thu, 2016-04-14 13:19 in

Hi David.

I did a fresh install on a new website, setup.php went fine, but when I tried to access the pt/admin I got these messages.

Warning: require(config.advanced.php): failed to open stream: No such file or directory in /home/xxxx/public_html/mywebsite/pt/includes/common.php on line 6

Warning: require(config.advanced.php): failed to open stream: No such file or directory in /home/xxxx/public_html/mywebsite/pt/includes/common.php on line 6

Fatal error: require(): Failed opening required 'config.advanced.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxx/public_html/mywebsite/pt/includes/common.php on line 6

config.advanced is present, tried to fiddle around but nothing.
Any ideas?

Submitted by support on Thu, 2016-04-14 13:49

Hello Rick,

includes/common.php uses a file_exists() check to enable the same include files to be used whether in the top level or sub-directory of the site. Very occasionally, for some reason file_exists() can return incorrect information so the file_exists() check can be replaced with an fopen() instead. Look for the following code at line 2:

  if (file_exists("config.php"))

...and REPLACE with:

  if (@fopen("config.php","r"))

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by rickdebruin on Fri, 2016-04-15 08:02

Nope..not helping. Same issue.

Any more ideas?

Submitted by support on Fri, 2016-04-15 08:17

Hello Rick,

I just realised from the error message that it's the line 6 instance of including config.advanced.php which implies that the check for config.php passed meaning the script thinks it is being called from the top level and not /admin/

This might mean that a copy of config.php has accidentally ended up in the /admin/ folder - check if that is the case and delete the file as config.php should only be in the top level...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by rickdebruin on Fri, 2016-04-15 09:27

Cool..that's it.
Many thanks