php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56144 constant already defined error
Submitted: 2004-07-23 21:03 UTC Modified: 2014-02-28 12:33 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: selsky at columbia dot edu Assigned: krakjoe (profile)
Status: Closed Package: APC (PECL)
PHP Version: 4.3.8 OS: Solaris 9
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: selsky at columbia dot edu
New email:
PHP Version: OS:

 

 [2004-07-23 21:03 UTC] selsky at columbia dot edu
Description:
------------
I'm trying to view the capabilties test page for my Horde installation.  When I load the page a second time, I see the following error message:

Unknown error: Constant already defined (/opt/php-4.3.8/lib/php/PEAR.php:44)

This doesn't happen on the first page load.  Is there something strange about how APC caches define() calls?

PEAR.php line 44 contains:

    define('PEAR_OS',    'Unix'); // blatant assumption



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-07 00:21 UTC] rasmus@php.net
Can you reproduce this with a script that just contains that define line?  I tried here and I couldn't.
 [2004-09-09 04:09 UTC] selsky at columbia dot edu
This PHP code does the trick:

<?php

error_reporting(E_ALL);

include 'PEAR.php';
include 'DB.php';

?>

PEAR 1.3.2
DB 1.6.4

The output looks like this:

Notice: Constant already defined in /opt/php-4.3.8/lib/php/PEAR.php on line 24

Notice: Constant already defined in /opt/php-4.3.8/lib/php/PEAR.php on line 25

Notice: Constant already defined in /opt/php-4.3.8/lib/php/PEAR.php on line 26

Notice: Constant already defined in /opt/php-4.3.8/lib/php/PEAR.php on line 27

Notice: Constant already defined in /opt/php-4.3.8/lib/php/PEAR.php on line 28

Notice: Constant already defined in /opt/php-4.3.8/lib/php/PEAR.php on line 33

Notice: Constant already defined in /opt/php-4.3.8/lib/php/PEAR.php on line 35

Notice: Constant already defined in /opt/php-4.3.8/lib/php/PEAR.php on line 42

Notice: Constant already defined in /opt/php-4.3.8/lib/php/PEAR.php on line 43

Notice: Constant already defined in /opt/php-4.3.8/lib/php/PEAR.php on line 44
 [2014-02-28 12:33 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2014-02-28 12:33 UTC] krakjoe@php.net
Closing, for a number of reasons:

 The bug is ~10 years old.
 The original behaviour cannot be present any more.
 APC is no longer the primary, supported means by which we advise caching opcodes.

Thanks for helping to make PHP better :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 07:01:29 2024 UTC