Support forum login

©2006-2008 IAAI Software

Contact Us

Fatal error

Submitted by Axonic on Sun, 2008-05-11 06:33.

Hi, I have just purchased PT and i'm very keen to get going. I have an account with 1 & 1 and uploaded everything as instructed but when I navigate to the setup.php I get this error:

Fatal error: main() [function.require]: Failed opening required '../config.php' (include_path='.:/usr/lib/php') in /homepages/8/d244371009/htdocs/includes/common.php on line 10

Any help would be welcome
Thanks
Rob

Submitted by dmorison on Sun, 2008-05-11 06:38.

Hello Rob,

Before running setup.php; you need to copy config.php.dist as config.php, and edit it to contain the appropriate settings for your site; in particular the database server settings.

After creating config.php, setup.php should then run fine!

Please see the following page for more info:

http://www.pricetapestry.com/node/4

Cheers,
David.

--
Developer, Price Tapestry
For unrelated PHP, MySQL or Affiliate Marketing tech help please post your questions on my personal forum

Submitted by Axonic on Sun, 2008-05-11 07:06.

Hi David, thanks for such a quick response. I have followed the instructions for changing the config and renaming to config.php. I have uploaded to a subdirectory. The first few lines of the config are:

<?php
  $config_title = "Thrifty Spider";
  $config_charset = "utf-8";
  $config_baseHREF = "/spiderweb/";
  $config_useRewrite = true;
  $config_useRelated = true;
  $config_useTracking = true;
  $config_useJavaScript = true;
  $config_useInteraction = true;
  $config_currencyHTML = "&pound;";
  $config_resultsPerPage = 10;

Submitted by dmorison on Sun, 2008-05-11 07:09.

Hi,

Could you email me a link to the installation and i'll take a look for you...

(reply to your reg code or forum registration email is the easiest way to get me...)

Cheers,
David.

--
Developer, Price Tapestry
For unrelated PHP, MySQL or Affiliate Marketing tech help please post your questions on my personal forum

Submitted by Axonic on Sun, 2008-05-11 07:13.

Link to my site

{link saved}

Thanks
Rob

Submitted by Axonic on Sun, 2008-05-11 07:42.

Just a thought David, the database is MySQL5.0 would that cause a problem?
Rob

Submitted by dmorison on Sun, 2008-05-11 07:45.

Hi Rob,

I can see the problem - the file_exists() function is not working which common.php uses to locate config.php.

I'm just considering what to do about - I have come across this before so was just searching for the solution we worked out previously.

Do you know if your hosting account is Windows based?

Cheers,
David.

--
Developer, Price Tapestry
For unrelated PHP, MySQL or Affiliate Marketing tech help please post your questions on my personal forum

Submitted by dmorison on Sun, 2008-05-11 07:49.

Hi Rob,

Unfortunately, the last person who had this problem had to give up on their host because PHP was not installed with file system access. Can you try this test script:

test.php

<?php
 error_reporting
(E_ALL);
 print 
"<h1>Test</h1>";
 
$fp fopen("test.php","r");
 print (
$fp?"File System Functions OK!":"File System Functions NOT WORKING!");
?>

If this works (file system functions OK); then hopefully it is just file_exists() that does not work and I can modify common.php to use fopen instead of file_exits().

Please create a file called test.php containing the above code, and upload this / run it, then let me know what output you get...

Cheers,
David.

--
Developer, Price Tapestry
For unrelated PHP, MySQL or Affiliate Marketing tech help please post your questions on my personal forum

Submitted by Axonic on Sun, 2008-05-11 07:56.

The account is Linux
Rob

Submitted by Axonic on Sun, 2008-05-11 08:00.

Looks like ur on the right track David: output after running

Test
File System Functions OK!

Rob

Submitted by dmorison on Sun, 2008-05-11 08:07.

Hi Rob,

That's something at least - i've only come across this situation once before and the test script failed on that customer's account.

In this instance, since fopen() appears to be working; here's an alternative version of includes/common.php that will use fopen() instead of file_exists:

<?php
  
if ($fp = @fopen("config.php","r"))
  {
    
fclose($fp);
    require(
"config.php");
    
$common_path "includes/";
  }
  else
  {
    require(
"../config.php");
    
$common_path "../includes/";
  }
  require(
$common_path."javascript.php");
  require(
$common_path."tapestry.php");
  require(
$common_path."translate.php");
  require(
$common_path."database.php");
?>

Upload the above code in place of the existing includes/common.php and fingers crossed you should be able to continue with setup...

Cheers,
David.

--
Developer, Price Tapestry
For unrelated PHP, MySQL or Affiliate Marketing tech help please post your questions on my personal forum

Submitted by Axonic on Sun, 2008-05-11 08:11.

Fantastic, thank you so much David what a star...

Rob