Require is not a function.
It's a language construct.
As such, it has never had a defined return value.
You can try include instead, just for fun, but you'd be better off to code
it cleaner and check something that virt_cust.inc does or sets and erroring
out if that didn't happen.
require 'template/virt_cust.inc';
if (isset($customer)) error("Fatal Error");
--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Php Questions <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 04, 2001 5:48 PM
Subject: Upgrade Issue
Today, I upgraded our development web server from PHP 4.02 to 4.06.
the exact configure string was:
./configure --with-apxs=/usr/sbin/apxs --with-mysql=/usr --with-mcrypt=/usr/
local/lib --enable-versioning --with-ldap=/usr/local
None of the support files (apache, mysql, mcrypt, openldap) were changed
only the php tarball from their website.
Now I have this interesting problem:
the source:
<?
require("templates/virt_cust.inc") or error("Fatal Error");
produces this error message:
Fatal error: Failed opening required '1'
(include_path='.:/usr/local/lib/php') in
/home/httpd/html/distsupp/templates/virt_cust_form.php on line 2
The file is there and it works fine when I remove the "or error(..." code
from the end of line 2.
It appears that adding this code causes require() to interpret the file name
as a boolean TRUE.
This problem did not happen with 4.02.
Does anyone know of a configuration option or anything I can correct to make
this syntax work again with 4.06?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]