Re: require_once failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ste.paoletti@xxxxxxxxxx wrote:
Hi all, I'm a php programmer an I found an anomaly.. it could be a bug. On Mac Os all goes right but on debian enviroment there are some problems: Suppose I've the file /home/ste/test.php containing the following line:
 <?php
set_include_path('/usr/share/php');
require_once

'PHPUnit/Extensions/Database/Testcase.php';

also suppose that file /usr/share/php/PHPUnit/Extensions/Database/Testcase.php really exist.


If I open a shell and runs the script I've the following fatal error:


ste@debian:~$ php -v
PHP 5.2.6-1+lenny2 with Suhosin-Patch 0.9.6.2

(cli) (built: Jan 26 2009 22:41:04)
Copyright (c) 1997-2008 The PHP

Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

with Zend Debugger v5.2.15, Copyright (c) 1999-2008, by Zend

Technologies

ste@debian:~$ php test.php
Warning: require_once

(PHPUnit/Extensions/Database/Testcase.php): failed to open stream: No

such file or directory in /home/ste/test.php on line 3

Fatal error:

require_once(): Failed opening required

'PHPUnit/Extensions/Database/Testcase.php'

(include_path='/usr/share/php') in /home/ste/ste.php on line 3




Someone can help me? Why on Mac Os there are no problems?
Thanks all

Are you sure it isn't in /usr/share/pear ??
I don't know Debian's layout, but CentOS/Fedora put pear stuff in /usr/share/pear - NOT /usr/share/php

I bet if you comment out the explicit setting if the include path it would work, the path to pear is usually in the default include path defined in the php.ini file on Linux installs.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux