php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18768 true / false constants not defined with apache
Submitted: 2002-08-07 03:58 UTC Modified: 2002-10-17 23:06 UTC
Votes:8
Avg. Score:5.0 ± 0.0
Reproduced:8 of 8 (100.0%)
Same Version:8 (100.0%)
Same OS:8 (100.0%)
From: phpsurf at ifrance dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4CVS-2002-08-07 OS: windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: phpsurf at ifrance dot com
New email:
PHP Version: OS:

 

 [2002-08-07 03:58 UTC] phpsurf at ifrance dot com
The constants true/false (and certainly other pre-defined constants) are not defined when PHP is called from apache, but they are when PHP is called in command line !

here is a test script: test.php
<?php
var_dump(PHP_VERSION, true, TRUE);
?>

1- on command line : C:\php>php test.php
outputs :
string(9) "4.3.0-dev"
bool(true)
bool(true)

2- but called from apache : http://localhost/test.php
it outputs :
string(11) "PHP_VERSION"
string(4) "true"
string(4) "TRUE"

see the constants are no more booleans but strings !

I'm using PHP 4.3.0 alpha 2
with Apache 1.3.24

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-17 23:06 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Feb 12 12:00:01 2026 UTC