Path Problem

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Path Problem

Postby potain » 13. November 2009 11:28

Hi

I am on XP home edition and have been using XAMPP for ages and recently mistakenly upgraded from 1.71 to 1.72 without realising that it was using PHP 5.3. It destroyed my phpMyAdmin privileges and after I realised that other installed programs had problems with 5.3. I uninstalled 1.72 and reinstalled 1.71.

The reason I mention this is that I've been having a whole lot of problems in installing/running a program into XAMPP with it not being to find the correct paths for it. The program installed without a hitch on WAMP.
Just wandering if a XAMPP setting could have been changed in all install/un-install/reinstall process and could be causing the problem.

The program uses a config.php file. The errors that I am getting are these:
Warning: include(PFSROOTclass/pfs.main.php) [function.include]: failed to open stream: No such file or directory in G:\xampp\htdocs\phpfaqsource\init.php on line 43
Warning: include() [function.include]: Failed opening 'PFSROOTclass/pfs.main.php' for inclusion (include_path='.;G:\xampp\php\pear\') in G:\xampp\htdocs\phpfaqsource\init.php on line 43
Fatal error: Class 'pfsMain' not found in G:\xampp\htdocs\phpfaqsource\init.php on line 44

The paths are:
DOCUMENT_ROOT: G:/xampp/htdocs
FOLDER: phpfaqsource/
PFSROOT: G:/xampp/htdocs/phpfaqsource
/

init.php line 43/44 are:
//PFS main class
include(PFSROOT.'class/pfs.main.php');
$pfs = new pfsMain();


The developer can't work out what's happening and thinks that there may be a fault in my XAMPP installation.

I also have this remark in phpMyAdmin:
Your PHP MySQL library version 5.0.51a differs from your MySQL server version 5.1.33. This may cause unpredictable behavior.

Any help will be much appreciated. Thanks in advance.
potain
potain
 
Posts: 9
Joined: 14. April 2006 04:50
Location: Brisbane Australia

Re: Path Problem

Postby Nobbie » 13. November 2009 11:55

>PFSROOT: G:/xampp/htdocs/phpfaqsource/

What does that mean? Which context? Value of an environment variable? Or what?

>include(PFSROOT.'class/pfs.main.php');

This include requires the definition of the constant PFSROOT. There must be a similar line like that anywhere in the config PHP script of that application:

Code: Select all
define('PFSROOT', 'G:/xampp/htdocs/phpfaqsource/');


Due to the error message, the constant PFSROOT is unknown, therefore it is replaced by a string with the value 'PFSROOT'. You are working with a weak error level, as notices are supressed. Otherwise you also would receive a message like "Notice: Use of undefined constant PFSROOT - assumed 'PFSROOT' in ..."

You should do a global search for "define('PFSROOT ..." in the PHP scripts and find out, whether there is one and what's going wrong.

>The developer can't work out what's happening and thinks that there may be a fault in my XAMPP installation.

Poor!
Nobbie
 
Posts: 8772
Joined: 09. March 2008 13:04

Re: Path Problem

Postby potain » 20. November 2009 15:11

Hi and thanks for the reply

I reinstalled 1.71 just to be sure.

The program in question has this in it's config.php:
//folder that PFS is installed in
// you must include the folder name and trailing slash or
// use '' if installed in document root
define('FOLDER','phpfaqsource/');

//Document Root to PFS installation
// the default setting below will work on most installations
// if your server does not report the correct document root, then you will
// need to replace $_SERVER['DOCUMENT_ROOT'] with the actual root path
define('PFSROOT',$_SERVER['DOCUMENT_ROOT'].'/'.FOLDER);



I've also discovered this error when viewing pearinfo() from http://localhost/xampp/ which is similar to the pear error reported before
Warning: require_once(PEAR/Info.php) [function.require-once]: failed to open stream: No such file or directory in G:\xampp\htdocs\xampp\pearinfo.php on line 4
Fatal error: require_once() [function.require]: Failed opening required 'PEAR/Info.php' (include_path='.;G:\xampp\php\pear\') in G:\xampp\htdocs\xampp\pearinfo.php on line 4
potain
 
Posts: 9
Joined: 14. April 2006 04:50
Location: Brisbane Australia

Re: Path Problem

Postby Nobbie » 20. November 2009 15:52

Can you run a phpinfo() and show me the value of "short_open_tag" (and which php.ini is used on your installation).
Nobbie
 
Posts: 8772
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 80 guests