You are here:  » Help installing please

Support Forum



Help installing please

Submitted by shabbysheep on Sat, 2008-06-14 16:22 in

Hello, I am having some trouble getting PT up and running, I wonder if you could help.

I have uploaded all files to my server and have passed the setup:

Checking database connection...PASS

Checking database selection...PASS

Checking database tables...PASS

Setup Completed!

Using PHP Version 4.4.8

Using MySQL Version 5.0.22

I have uploaded a .csv file into "feeds"

But am unsure as to what to do next!

Navigating to {link saved}

gives me this:

Warning: main(includes/javascript.php) [function.main]: failed to open stream: No such file or directory in {saved} on line 13

Fatal error: main() [function.require]: Failed opening required 'includes/javascript.php' (include_path='.;c:\php4\pear') in {saved} on line 13

Should I have a control panel at this point?

If I navigate to {link saved}

I then get:

Notice: Undefined variable: config_baseHREF on line 8
Site Home
Notice: Undefined variable: config_baseHREF on line 10
Admin Home | Category Mapping Product Mapping Featured Products Moderate Reviews

I need not tell you I am a complete beginner to PHP, and have no idea how I should proceed.

My config.php file is:

<?php
  $config_title 
"Site Title";
  
$config_charset "utf-8";
  
$config_baseHREF "/";
  
$config_useRewrite false;
  
$config_useRelated true;
  
$config_useTracking true;
  
$config_useJavaScript true;
  
$config_useInteraction true;
  
$config_currencyHTML "&pound";
  
$config_resultsPerPage 10;
  
$config_databaseServer "213.171.219.88";
  
$config_databaseUsername "";
  
$config_databasePassword "";
  
$config_databaseName "CompareGamePrices";
  
$config_databaseTablePrefix "";
?>

I changed useRewrite to false because of a warning.

The username and password are included in the uploaded file.

Could you have a look and tell me where I am going wrong?

Many thanks, shabbysheep.

Submitted by support on Sat, 2008-06-14 17:30

Hi,

Sorry that you have had problems installing.

This has happened because there appears to be a config.php file in your /admin/ directory.

If you delete this file, you will then see the control panel as expected when you browse to /admin/.

There should only be a config.php file in the main directory, as the main include file looks for the config.php file to work out which directory it is in, so if the file exists in your admin directory it assumes that you are in the main directory, which is why the subsequent include files cannot be found.

That will be all it is!

All the best,

Cheers,
David.

Submitted by shabbysheep on Tue, 2008-06-17 13:38

Excellent David, thanks, that's another hurdle cleared. I am using a template from to start with until I learn a whole lot more. Everything looks good except I get a few lines of warning at the top of some pages.

Notice: Undefined variable: header in e:\domains\c\compare-game-prices.co.uk\user\htdocs\html\header.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at e:\domains\c\compare-game-prices.co.uk\user\htdocs\html\header.php:2) in e:\domains\c\compare-game-prices.co.uk\user\htdocs\html\header.php on line 12

Is this a config.php problem?

Thanks again for your previous help.

shabbysheep

Submitted by support on Tue, 2008-06-17 13:43

Hi,

This sounds like the html/header.php that you are using is using a $header[] variable without checking whether it is set; combined with your PHP installation being configured at the top warning level which means a that a warning is generated because of this.

If you could post line 2 of your header.php; i'll show you how to modify it to use isset() so that the notice is not displayed...

Cheers,
David.

Submitted by dbfcs on Tue, 2008-06-17 13:52

David,

The code used is:

<?php
if ($header["title"] !="") {
  
$header["title"] = str_replace("merchant:","",$header["title"]);
  
$header["title"] = str_replace("category:","",$header["title"]);
  
$header["title"] = str_replace("brand:","",$header["title"]);
  
$header["title"] = str_replace(":"," ",$header["title"]);
    }
  if (
file_exists("html/user_header_before.php")) require("html/user_header_before.php");
  if (
$config_charset)
  {
    
header("Content-Type: text/html;charset=".$config_charset);
  }
?>

For some reason the server is ignoring the first if statement. This works on dozens of other servers so I can't quite see why this isn't working on this server. Perhaps the isset solution will help get around this.

<?php
if (isset($header["title"])) {
if (
$header["title"] !="") {
  
$header["title"] = str_replace("merchant:","",$header["title"]);
  
$header["title"] = str_replace("category:","",$header["title"]);
  
$header["title"] = str_replace("brand:","",$header["title"]);
  
$header["title"] = str_replace(":"," ",$header["title"]);
}}
  if (
file_exists("html/user_header_before.php")) require("html/user_header_before.php");
  if (
$config_charset)
  {
    
header("Content-Type: text/html;charset=".$config_charset);
  }
?>

Submitted by support on Tue, 2008-06-17 13:56

Hi Dave,

That should suppress the warning, so i'm sure it will work fine as per your modification shown above.

Occasionally you come across a PHP installation that is configured at the highest error / warning level; so performing a comparison against an unset variable will generate the undefined variable notice - that will be all it is.

Cheers,
David.