Jump to content

Warning: include(../../configuration.php) [function.include]: failed to open...


jon2396

Recommended Posts

I am setting up a previously built Joomla site on my local host. I have successfully imported the database to my localhost. I have the site files in my localhost in localhost\xampp\htdocs\test and I have made the following changes to the configuration.php file in folder 'test':

 

var $dbtype = 'mysql';

var $host = 'localhost';

var $user = 'root';

var $db = 'ukactive1';

var $log_path = '/var/localhost/htdocs/logs';

var $tmp_path = '/var/localhost/htdocs/tmp';

 

The site accesses the database and much of the functionality in the site appears to be working, but here is my problem...

 

There are several custom modules on the site all of which previously worked perfectly. Now I get the following message on the site in my browser:

 

Warning: include(../../configuration.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\test\modules\mod_Searched_Companies\clsSearchedCompany.php on line 2

 

and also:

 

Warning: include() [function.include]: Failed opening '../../configuration.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\test\modules\mod_Searched_Companies\clsSearchedCompany.php on line 2

 

 

Line 2 in clsSearchedCompany.php contains the following:

 

include "../../configuration.php";

 

If anyone can help I would greatly appreciate it.

 

Many thanks

The warning is saying that the path definition is wrong.

 

failed to open stream: No such file or directory in......

 

It is looking in the wrong place for the file. Something is different in the paths between your localhost and your old server.

 

Change

 

include "../../configuration.php";

 

to

 

include($_SERVER['DOCUMENT_ROOT'].'/PATH/TO/configuration.php');

 

Change the PATH/TO part, to the actual path from your root directory to that file.

 

Hope that helps.

 

Well I'm not certain which configuration.php  file it is trying to call but I have tried your method assuming it is the joomla configuration file,  but I now have an error:

 

Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\test\modules\mod_Quick_Search\clsQuickSearch.php on line 8

 

Line 8 is

 

function getAllActivities()

{

$strSQL = "select * from activities order by Activity asc";

 

Any ideas?

 

 

Here are lines 1 to 13.

 

 

1  <?php

2 include  "/../../configuration.php;";

3 class quicksearch

4 {

5

6 function getAllActivities()

7 {

8 $strSQL = "select * from activities order by Activity asc";

9 //echo $strSQL;

10 $result = mysql_query($strSQL);

11 if(!$result)

12 {

13 return 0;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.