Re: Upgrade Issue
| From: | Richard Lynch | Date: | Fri, 05 Oct 2001 05:30:31 +0000 |
| Subject: | Re: Upgrade Issue | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70033@lists.php.net to get a copy of this message | ||
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 richard@zend.com address is an endangered species -- Use
ceo@l-i-e.com
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 <php_questions@juiceplus.com>
Newsgroups: php.general
To: <php-general@lists.php.net>
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?