Page 1 of 1

Help! Need to change trailing to correct path

PostPosted: 11. December 2008 20:50
by excentricus
Greetings Everone!

This is my first post here, though I've been using xampp for a few months now without problems and I have my first question to the pros.
I've searched the forum but couldn't find suitable solution to this so here goes:

After installing a new script I get the following error message:

Code: Select all
Warning: include(E:/XAMPP/htdocs/conf/includes.inc.php) [function.include]: failed to open stream: No such file or directory in E:\XAMPP\htdocs\edirectory\conf\config.inc.php on line 76

Warning: include() [function.include]: Failed opening 'E:/XAMPP/htdocs/conf/includes.inc.php' for inclusion (include_path='.;E:\XAMPP\php\pear\') in E:\XAMPP\htdocs\edirectory\conf\config.inc.php on line 76

Fatal error: Call to undefined function mobile_ismobile() in E:\XAMPP\htdocs\edirectory\conf\loadconfig.inc.php on line 55


I see that the trailing is backwards and I needs to have the correct path. Where would I change it to display the trailing forward?

This is the first time I'm seeing this; All other scripts and CMS's (about 15 total) are running just fine.
Also, when uploaded to server (linux box) it works just fine.

Can anyone help?

Many Thanks

Re: Help! Need to change trailing to correct path

PostPosted: 11. December 2008 20:54
by Wiedmann
Warning: include(E:/XAMPP/htdocs/conf/includes.inc.php) [function.include]: failed to open stream: No such file or directory

Does the file "E:\XAMPP\htdocs\conf\includes.inc.php" exists?

Re: Help! Need to change trailing to correct path

PostPosted: 11. December 2008 21:04
by excentricus
Yes, it does! All the files and folders are correct. It's the path with backward trailing that's most likely causing this. Any idea what to do?

Re: Help! Need to change trailing to correct path

PostPosted: 11. December 2008 21:26
by glitzi85
Could you please post the include-Statement that causes the error.

glitzi

Re: Help! Need to change trailing to correct path

PostPosted: 11. December 2008 21:46
by excentricus
Here's the config.inc.php that that includes the statement:

Code: Select all
<?

   # ----------------------------------------------------------------------------------------------------
   # * FILE: /conf/config.inc.php
   # ----------------------------------------------------------------------------------------------------

   # ----------------------------------------------------------------------------------------------------
   # EDIRECTORY ADMINISTRATOR EMAIL
   # ----------------------------------------------------------------------------------------------------
   define(EDIR_ADMIN_EMAIL, "name@company.com");

   # ----------------------------------------------------------------------------------------------------
   # DATABASE CONNECTION PARAMETERS
   # ----------------------------------------------------------------------------------------------------
   define(DEFAULT_DB,         "DIRECTORYDB");
   define(_DIRECTORYDB_HOST,  "localhost");
   define(_DIRECTORYDB_USER,  "root"); //Should be changed
   define(_DIRECTORYDB_PASS,  ""); //Should be changed
   define(_DIRECTORYDB_NAME,  "dbase"); //Should be changed
   define(_DIRECTORYDB_EMAIL, EDIR_ADMIN_EMAIL);
   define(_DIRECTORYDB_DEBUG, "hide");

   # ----------------------------------------------------------------------------------------------------
   # DEFINE EDIRECTORY FOLDER - Should be changed leave it blank (with no trailing slash) if you install on root
   # ----------------------------------------------------------------------------------------------------
   if (!defined("EDIRECTORY_FOLDER")) define(EDIRECTORY_FOLDER, ""); //Should be changed

   # ----------------------------------------------------------------------------------------------------
   # TMP FOLDER PATH DEFINITION
   # ----------------------------------------------------------------------------------------------------
   define(TMP_FOLDER, $_SERVER["DOCUMENT_ROOT"].EDIRECTORY_FOLDER."/upload/tmp");

   # ----------------------------------------------------------------------------------------------------
   # DEFINE EDIRECTORY ROOT
   # ----------------------------------------------------------------------------------------------------
   if (!defined("EDIRECTORY_ROOT")) define(EDIRECTORY_ROOT, $_SERVER["DOCUMENT_ROOT"].EDIRECTORY_FOLDER);

   # ----------------------------------------------------------------------------------------------------
   # DEFINE DEFAULT URL
   # ----------------------------------------------------------------------------------------------------
   if ((!$_SERVER["HTTPS"]) || ($_SERVER["HTTPS"] == "off")) {
      define(HTTPS_MODE, "off");
      if (!defined("DEFAULT_URL")) define(DEFAULT_URL, "http://".$_SERVER["HTTP_HOST"].EDIRECTORY_FOLDER);
   } else {
      define(HTTPS_MODE, "on");
      if (!defined("DEFAULT_URL")) define(DEFAULT_URL, "https://".$_SERVER["HTTP_HOST"].EDIRECTORY_FOLDER);
   }

   # ----------------------------------------------------------------------------------------------------
   # SECURE URL
   # ----------------------------------------------------------------------------------------------------
   define(SECURE_URL, "https://".$_SERVER["HTTP_HOST"].EDIRECTORY_FOLDER);

   # ----------------------------------------------------------------------------------------------------
   # NON_SECURE_URL
   # ----------------------------------------------------------------------------------------------------
   define(NON_SECURE_URL, "http://".$_SERVER["HTTP_HOST"].EDIRECTORY_FOLDER);

   # ----------------------------------------------------------------------------------------------------
   # INCLUDE GLOBAL INCLUDES
   # ----------------------------------------------------------------------------------------------------
   include(EDIRECTORY_ROOT."/conf/includes.inc.php");

?>


I hope that helps.

Cheers!

Re: Help! Need to change trailing to correct path

PostPosted: 11. December 2008 23:10
by glitzi85
Change

Code: Select all
if (!defined("EDIRECTORY_FOLDER")) define(EDIRECTORY_FOLDER, ""); //Should be changed

to
Code: Select all
if (!defined("EDIRECTORY_FOLDER")) define(EDIRECTORY_FOLDER, "edirectory");


glitzi

Re: Help! Need to change trailing to correct path

PostPosted: 11. December 2008 23:29
by excentricus
Thanks glitzi85 (and everyone else who took interest in ths), that solved it!

I just had to add a trailing before the directory like this "/directory"

Wish I looked in apachefriends forum earlier as it took me couple of days to get over this.

Thanks again for your help.

Re: Help! Need to change trailing to correct path

PostPosted: 12. December 2008 09:15
by Wiedmann
Code: Select all
if (!defined("EDIRECTORY_FOLDER")) define(EDIRECTORY_FOLDER, "edirectory");

Thanks glitzi85 (and everyone else who took interest in ths), that solved it!

"glitzi85" is right, it was a configueration error in your script.

Does the file "E:\XAMPP\htdocs\conf\includes.inc.php" exists?

Yes, it does!

But, because this is working, your answer was wrong:
The file "E:\XAMPP\htdocs\conf\includes.inc.php" does not exists.

(Please be more carefull next time, if you answer a question in a support forum.)