Re: [PHP] require_once failure

2009-06-25 Thread Daniel Brown
On Thu, Jun 25, 2009 at 07:26,
ste.paole...@tiscali.it wrote:
>
> Someone can help me? Why on Mac Os there are no problems?

Start by making sure that the file is there and is readable by the
user as which you are logged in.  Execute the command:

ls -l /usr/share/php/PHPUnit/Extensions/Database/Testcase.php

My guess is that it's not there, but if it is, that it is not readable.

-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1

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



Re: [PHP] require_once failure

2009-06-25 Thread Michael A. Peters

ste.paole...@tiscali.it 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:

 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:


s...@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

s...@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



RE: [PHP] require_once failure

2009-06-25 Thread Jay Blanchard
[snip] s...@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
[/snip]

The first thing I would do is check the permissions on the file to be
included. If those are OK modify your script to give the absolute path
to the file.

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