Page MenuHomePhabricator

"Constant already defined" error message during installation of 1.3.5
Closed, ResolvedPublic

Description

Author: christophe.foiret

Description:
OS : Windows NT
Package : EasyPHP 1.6

MediaWiki 1.3.5 installation
Please include all of the lines below when reporting installation problems.
Checking environment...

WARNING: PHP 4.3.2 or higher is recommended. Older versions from 4.1.x up may work but are not actively supported. · PHP 4.2.0: ok · PHP server API is apache; ok, using pretty URLs (index.php/Page_Title) · Have XML / Latin1-UTF-8 conversion support. · PHP is configured with no memory_limit. · No zlib support. · Found GD graphics library built-in, image thumbnailing will be enabled if you enable uploads. · Installation directory: d:\easyphp\www\mediawiki-1.3.5 · Script URI path: /mediawiki-1.3.5 Warning: $wgProxyKey is insecure Notice: Constant pear_error_return already defined in d:\easyphp\www\mediawiki-1.3.5 \PHPTAL-NP-0.7.0\libs\PEAR.php on line 24

Notice: Constant pear_error_print already defined in d:\easyphp\www\mediawiki-1.3.5
\PHPTAL-NP-0.7.0\libs\PEAR.php on line 25

Notice: Constant pear_error_trigger already defined in d:\easyphp\www\mediawiki-1.3.5
\PHPTAL-NP-0.7.0\libs\PEAR.php on line 26

Notice: Constant pear_error_die already defined in d:\easyphp\www\mediawiki-1.3.5\PHPTAL-
NP-0.7.0\libs\PEAR.php on line 27

Notice: Constant pear_error_callback already defined in d:\easyphp\www\mediawiki-1.3.5
\PHPTAL-NP-0.7.0\libs\PEAR.php on line 28

Fatal error: Cannot redeclare class pear in d:\easyphp\www\mediawiki-1.3.5\PHPTAL-NP-
0.7.0\libs\PEAR.php on line 72


Version: 1.3.x
Severity: major

Details

Reference
bz618

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 6:59 PM
bzimport set Reference to bz618.
bzimport added a subscriber: Unknown Object (MLST).

ovvldc wrote:

I have the same problem with Namespace constants on the Mac (setting Hardware/OS
to all/all if I can):

MediaWiki 1.3.5 installation

Please include all of the lines below when reporting installation problems.
Checking environment...

  • PHP 4.3.2: ok
  • PHP server API is apache; ok, using pretty URLs (index.php/Page_Title)
  • Have XML / Latin1-UTF-8 conversion support.
  • PHP is configured with no memory_limit.
  • Have zlib support; enabling output compression.
  • Couldn't find GD library or ImageMagick; image thumbnailing disabled.
  • Installation directory: /Library/WebServer/Documents/wiki
  • Script URI path: /wiki

    Notice: Constant NS_MEDIA already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 8

Notice: Constant NS_SPECIAL already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 9

Notice: Constant NS_MAIN already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 12

Notice: Constant NS_TALK already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 13

Notice: Constant NS_USER already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 14

Notice: Constant NS_USER_TALK already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 15

Notice: Constant NS_WP already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 16

Notice: Constant NS_WIKIPEDIA already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 17

Notice: Constant NS_WP_TALK already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 18

Notice: Constant NS_WIKIPEDIA_TALK already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 19

Notice: Constant NS_IMAGE already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 20

Notice: Constant NS_IMAGE_TALK already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 21

Notice: Constant NS_MEDIAWIKI already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 22

Notice: Constant NS_MEDIAWIKI_TALK already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 23

Notice: Constant NS_TEMPLATE already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 24

Notice: Constant NS_TEMPLATE_TALK already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 25

Notice: Constant NS_HELP already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 26

Notice: Constant NS_HELP_TALK already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 27

Notice: Constant NS_CATEGORY already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 28

Notice: Constant NS_CATEGORY_TALK already defined in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 29

Fatal error: Cannot redeclare class namespace in

/Library/WebServer/Documents/wiki/includes/Namespace.php on line 57

ovvldc wrote:

Setting severity to major because the web-based installer won't work in this way
and the potential workaround requires some work.

Can those of you experiencing this problem provide a dump of output from the phpinfo() function? There
must be something causing it...

ovvldc wrote:

PHPinfo() output

This is my PHPinfo() output file. I took out the document paths and the IP
adress of the server over privacy considerations. Other info:

Apple iBook G4, 800 MHZ, 640 MB RAM.

Attached:

ovvldc wrote:

It seems like I found the bug that was bothering my installation, though I don't
understand why the implementation is wrong. The problem goes away when I comment
out the following lines in config/index.php

require_once( "../includes/MagicWord.php" );
require_once( "../includes/Namespace.php" );

It takes a while to complete, but now I managed to get a completed
localsettings.php.

ovvldc wrote:

I tested this with 1.4beta1 and the installation works smoothly.
Still there in 1.3.8, though..

Any projection as to when 1.4 is going to hit production stability?

Thanks for the feedback! Resolving as fixed.

1.4.0 should be released within the next week or two.

zigger wrote:

*** Bug 1258 has been marked as a duplicate of this bug. ***

ovvldc wrote:

Just installed 1.4.0 and got the old problem again.
I could still fix it in the same way: just comment out the two offending lines:

  1. require_once( "../includes/MagicWord.php" );
  2. require_once( "../includes/Namespace.php" );

Sorry. Though I am a lot more worried about bug 1727, which makes my wiki all
but unusable.

Please test with 1.4.2; changes to the include path in the installer have been made.

No response from user who reopened the bug. Resolving as FIXED again.