Hey all, I'm still having trouble installing MediaWiki on a Solaris machine. I've got someone with more coding experience helping me out. I've posted his latest problem below, please advise. Thanks
The installation seems to be working now.
The problem with those "constant already defined" and duplicate namespace warnings and errors seems to be an issue with relative pathnames and the require_once statement.
I made these changes to config/index.php:
# require_once( "../includes/DefaultSettings.php" ); # require_once( "../includes/MagicWord.php" ); # require_once( "../includes/Namespace.php" ); require_once( "/absolute/path/to/includes/DefaultSettings.php" ); require_once( "/absolute/path/to/includes/MagicWord.php" ); require_once( "/absolute/path/to/includes/Namespace.php" );
And then the configure/install started working.
Here's the output (on Solaris/SunOS 5.9):
MediaWiki 1.3.7 installation
Please include all of the lines below when reporting installation problems. Checking environment...
* PHP 4.3.8: ok * Warning: PHP's register_globals option is enabled. MediaWiki will work correctly, but this setting increases your exposure to potential security vulnerabilities in PHP-based software running on your server. You should disable it if you are able. * PHP server API is apache; ok, using pretty URLs (index.php/Page_Title) * Have XML / Latin1-UTF-8 conversion support. * PHP's memory_limit is 16M. If this is too low, installation may fail! Attempting to raise limit to 20M... ok. * Have zlib support; enabling output compression. * Found GD graphics library built-in, image thumbnailing will be enabled if you enable uploads. * Installation directory: XXX/mediawiki * Script URI path: /mediawiki * MySQL error 1045: Access denied for user: 'root@207.228.226.7' (Using password: NO) * Trying regular user... ok. * Connected to database... 4.0.20-log; enabling MySQL 4 enhancements * Database XXX exists * Creating tables... done. * Initializing data... * Created sysop account XXX. * Initialising log pages... *
Initialising "MediaWiki" namespace... Clearing message cache...Done.
Creating LocalSettings.php...
Success! Move the LocalSettings.php file into the parent directory, then follow this link to your wiki.
When move LocalSettings.php and follow that link, first I get the expected redirect to http://ourdomain/mediawiki/index.php/Main_Page, but then when I go to that page, I don't get anything back.
Here's the exact output from the server:
$ curl -i http://domain/mediawiki/index.php/Main_Page HTTP/1.1 200 OK Date: Thu, 28 Oct 2004 20:08:39 GMT Server: Apache/1.3.31 (Unix) mod_jk/1.2.5 FrontPage/5.0.2.2635 mod_fastcgi/2.4.2 mod_throttle/3.1.2 PHP/4.3.8 mod_ssl/2.8.18 OpenSSL/0.9.7d X-Powered-By: PHP/4.3.8 Vary: Accept-Encoding,Cookie Expires: -1 Cache-Control: private, must-revalidate, max-age=0 Last-modified: Thu, 28 Oct 2004 19:13:27 GMT Content-language: en Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=utf-8
And that's it. No html, no body, no errors.
I've enabled mediawiki debugging, and here's the log:
Start request GET /mediawiki/index.php/Main_Page Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Host: domain Pragma: no-cache User-Agent: curl/7.10.8 (sparc-sun-solaris2.9) libcurl/7.10.8 OpenSSL/0.9.7d ipv6 zlib/1.1.4
SQL: SELECT cur_text FROM cur WHERE cur_namespace='8' AND cur_title='Linktrail' LIMIT 1 SQL: DELETE FROM objectcache WHERE exptime<'2004-10-28 20:08:41' SQL: SELECT value,exptime FROM objectcache WHERE keyname='our_db:messages'
SQL: SELECT 1 FROM user_newtalk WHERE user_ip='XXX.XXX.XXX.XXX' Servr: http://domain SQL: BEGIN SQL: SELECT cur_id FROM cur WHERE cur_namespace=0 AND cur_title='Main_Page' SQL: SELECT cur_touched,cur_is_redirect FROM cur WHERE cur_id=5 We're confused. tryFileCache() - not cacheable SELECT cur_text,cur_timestamp,cur_user,cur_user_text,cur_comment,cur_counter,cur_restrictions,cur_touched FROM cur WHERE cur_id=5 SQL: SELECT cur_text,cur_timestamp,cur_user,cur_user_text,cur_comment,cur_counter,cur_restrictions,cur_touched FROM cur WHERE cur_id=5 SQL: SELECT lcc_cacheobj FROM linkscc WHERE lcc_pageid = 5 SQL: SELECT ss_total_views, ss_total_edits, ss_good_articles FROM site_stats WHERE ss_row_id=1 SQL: UPDATE cur SET cur_counter = cur_counter + 1 WHERE cur_id = 5 SQL: COMMIT ** private caching; Thu, 28 Oct 2004 19:13:27 GMT ** SQL: SELECT cur_id FROM cur WHERE cur_namespace=2 AND cur_title='XXX.XXX.XXX.XXX' SQL: SELECT cur_id FROM cur WHERE cur_namespace=1 AND cur_title='Main_Page' SQL: BEGIN SQL: UPDATE LOW_PRIORITY site_stats SET ss_total_views=(ss_total_views+1),ss_total_edits=(ss_total_edits),ss_good_artic\ les=(ss_good_articles) WHERE ss_row_id=1 SQL: COMMIT SQL: BEGIN SQL: COMMIT Request ended normally
I've also enabled PHP error logging, but nothing is written there. There don't appear to be any PHP errors.
The SQL database access seems to be working. If I run the queries manually, I see the data. The site stats (ss_total_views) are being updated, even though the page isn't actually rendered.
I've repeated the whole thing with language set to "en - English - Unicode" and to "en - English - Latin-1". Same results.
And, finally, if I run the PHP from the command line, then it totally works! Something like this:
$ export PATH_INFO="/Main_Page" $ php index.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <meta name="KEYWORDS" content="Main Page" /> <meta name="robots" content="index,follow" /> <link rel="shortcut icon" href="/favicon.ico" />
<title>Main Page - OurWiki</title> <style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "/mediawiki/stylesheets/monobook/main.css"; /*]]>*/</style> <link rel="stylesheet" type="text/css" media="print" href="/mediawiki/stylesheets/commonPrint.css"/> ...
So it must be something to do with the environment where the web server is running (user "www", group "other"), but I have no idea how to debug this further.
We don't have root access on the server, so I can't su to www and rerun the script from the command line.
-- Rich Points Rich@RichPoints.com http://RichPoints.com -- Rich Points Rich@RichPoints.com http://RichPoints.com
So your only problem is that when using a browser you don't get any HTML, but when you run PHP from the command line, it works?
What browser are you using? Can you link us to the wiki?
On Tue, 2 Nov 2004 10:44:35 -0700, poster poster@richpoints.com wrote:
Hey all, I'm still having trouble installing MediaWiki on a Solaris machine. I've got someone with more coding experience helping me out. I've posted his latest problem below, please advise. Thanks
The installation seems to be working now.
The problem with those "constant already defined" and duplicate namespace warnings and errors seems to be an issue with relative pathnames and the require_once statement.
I made these changes to config/index.php:
# require_once( "../includes/DefaultSettings.php" ); # require_once( "../includes/MagicWord.php" ); # require_once( "../includes/Namespace.php" ); require_once( "/absolute/path/to/includes/DefaultSettings.php" ); require_once( "/absolute/path/to/includes/MagicWord.php" ); require_once( "/absolute/path/to/includes/Namespace.php" );
And then the configure/install started working.
Here's the output (on Solaris/SunOS 5.9):
MediaWiki 1.3.7 installation
Please include all of the lines below when reporting installation problems. Checking environment...
* PHP 4.3.8: ok * Warning: PHP's register_globals option is enabled. MediaWiki will work correctly, but this setting increases your exposure to potential
security vulnerabilities in PHP-based software running on your server. You should disable it if you are able. * PHP server API is apache; ok, using pretty URLs (index.php/Page_Title) * Have XML / Latin1-UTF-8 conversion support. * PHP's memory_limit is 16M. If this is too low, installation may fail! Attempting to raise limit to 20M... ok. * Have zlib support; enabling output compression. * Found GD graphics library built-in, image thumbnailing will be enabled if you enable uploads. * Installation directory: XXX/mediawiki * Script URI path: /mediawiki * MySQL error 1045: Access denied for user: 'root@207.228.226.7' (Using password: NO) * Trying regular user... ok. * Connected to database... 4.0.20-log; enabling MySQL 4 enhancements * Database XXX exists * Creating tables... done. * Initializing data... * Created sysop account XXX. * Initialising log pages... *
Initialising "MediaWiki" namespace... Clearing message cache...Done.
Creating LocalSettings.php... Success! Move the LocalSettings.php file into the parent directory, then follow this link to your wiki.
When move LocalSettings.php and follow that link, first I get the expected redirect to http://ourdomain/mediawiki/index.php/Main_Page, but then when I go to that page, I don't get anything back.
Here's the exact output from the server:
$ curl -i http://domain/mediawiki/index.php/Main_Page HTTP/1.1 200 OK Date: Thu, 28 Oct 2004 20:08:39 GMT Server: Apache/1.3.31 (Unix) mod_jk/1.2.5 FrontPage/5.0.2.2635 mod_fastcgi/2.4.2 mod_throttle/3.1.2 PHP/4.3.8 mod_ssl/2.8.18 OpenSSL/0.9.7d X-Powered-By: PHP/4.3.8 Vary: Accept-Encoding,Cookie Expires: -1 Cache-Control: private, must-revalidate, max-age=0 Last-modified: Thu, 28 Oct 2004 19:13:27 GMT Content-language: en Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=utf-8
And that's it. No html, no body, no errors.
I've enabled mediawiki debugging, and here's the log:
Start request GET /mediawiki/index.php/Main_Page Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Host: domain Pragma: no-cache User-Agent: curl/7.10.8 (sparc-sun-solaris2.9) libcurl/7.10.8 OpenSSL/0.9.7d ipv6 zlib/1.1.4
SQL: SELECT cur_text FROM cur WHERE cur_namespace='8' AND cur_title='Linktrail' LIMIT 1 SQL: DELETE FROM objectcache WHERE exptime<'2004-10-28 20:08:41' SQL: SELECT value,exptime FROM objectcache WHERE keyname='our_db:messages'
SQL: SELECT 1 FROM user_newtalk WHERE user_ip='XXX.XXX.XXX.XXX' Servr: http://domain SQL: BEGIN SQL: SELECT cur_id FROM cur WHERE cur_namespace=0 AND cur_title='Main_Page' SQL: SELECT cur_touched,cur_is_redirect FROM cur WHERE cur_id=5 We're confused. tryFileCache() - not cacheable SELECT cur_text,cur_timestamp,cur_user,cur_user_text,cur_comment,cur_counter,cur_restrictions,cur_touched FROM cur WHERE cur_id=5 SQL: SELECT cur_text,cur_timestamp,cur_user,cur_user_text,cur_comment,cur_counter,cur_restrictions,cur_touched FROM cur WHERE cur_id=5 SQL: SELECT lcc_cacheobj FROM linkscc WHERE lcc_pageid = 5 SQL: SELECT ss_total_views, ss_total_edits, ss_good_articles FROM site_stats WHERE ss_row_id=1 SQL: UPDATE cur SET cur_counter = cur_counter + 1 WHERE cur_id = 5 SQL: COMMIT ** private caching; Thu, 28 Oct 2004 19:13:27 GMT ** SQL: SELECT cur_id FROM cur WHERE cur_namespace=2 AND cur_title='XXX.XXX.XXX.XXX' SQL: SELECT cur_id FROM cur WHERE cur_namespace=1 AND cur_title='Main_Page' SQL: BEGIN SQL: UPDATE LOW_PRIORITY site_stats SET ss_total_views=(ss_total_views+1),ss_total_edits=(ss_total_edits),ss_good_artic\ les=(ss_good_articles) WHERE ss_row_id=1 SQL: COMMIT SQL: BEGIN SQL: COMMIT Request ended normally
I've also enabled PHP error logging, but nothing is written there. There don't appear to be any PHP errors.
The SQL database access seems to be working. If I run the queries manually, I see the data. The site stats (ss_total_views) are being updated, even though the page isn't actually rendered.
I've repeated the whole thing with language set to "en - English - Unicode" and to "en - English - Latin-1". Same results.
And, finally, if I run the PHP from the command line, then it totally works! Something like this:
$ export PATH_INFO="/Main_Page" $ php index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <meta name="KEYWORDS" content="Main Page" /> <meta name="robots" content="index,follow" /> <link rel="shortcut icon" href="/favicon.ico" />
<title>Main Page - OurWiki</title> <style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "/mediawiki/stylesheets/monobook/main.css"; /*]]>*/</style> <link rel="stylesheet" type="text/css" media="print" href="/mediawiki/stylesheets/commonPrint.css"/>
...
So it must be something to do with the environment where the web server is running (user "www", group "other"), but I have no idea how to debug this further.
We don't have root access on the server, so I can't su to www and rerun the script from the command line.
-- Rich Points Rich@RichPoints.com http://RichPoints.com -- Rich Points Rich@RichPoints.com http://RichPoints.com _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
So your only problem is that when using a browser you don't get any HTML, but when you run PHP from the command line, it works?
What browser are you using? Can you link us to the wiki?
Yes, that's basically the problem.
It seems to happen regardless of the web browser (Firefox, Mozilla, IE, curl).
The URL for the wiki is http://reclaimdemocracy.org/rdc/
If I go straight to the web server by telnet, I can definitely confirm nothing is being output from the script:
$ telnet reclaimdemocracy.org 80 Trying 207.228.227.98... Connected to reclaimdemocracy.org. Escape character is '^]'. GET /rdc/index.php/Main_Page Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Accept-Encoding: gzip,deflate Accept-Language: en-us,en;q=0.5 Cache-Control: no-cache Connection: keep-alive Host: reclaimdemocracy.org Keep-Alive: 300 Pragma: no-cache User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
Connection to reclaimdemocracy.org closed by foreign host.
But then if I check the mediawiki log, I can see that the script ran. I even added some debugging statements (prefixed with "bsm") to verify that the script is calling the routines.
Start request GET /rdc/index.php/Main_Page
SQL: SELECT cur_text FROM cur WHERE cur_namespace='8' AND cur_title='Linktrail' LIMIT 1 SQL: DELETE FROM objectcache WHERE exptime<'2004-11-02 23:47:26' SQL: SELECT value,exptime FROM objectcache WHERE keyname='XXX:messages'
SQL: SELECT 1 FROM user_newtalk WHERE user_ip='207.228.227.98' Servr: http://www.reclaimdemocracy.org SQL: BEGIN SQL: SELECT cur_id FROM cur WHERE cur_namespace=0 AND cur_title='Main_Page' SQL: SELECT cur_touched,cur_is_redirect FROM cur WHERE cur_id=5 We're confused. tryFileCache() - not cacheable SELECT cur_text,cur_timestamp,cur_user,cur_user_text,cur_comment,cur_counter,cur_restrictions,cur_touched FROM cur WHERE cur_id=5 SQL: SELECT cur_text,cur_timestamp,cur_user,cur_user_text,cur_comment,cur_counter,cur_restrictions,cur_touched FROM cur WHERE cur_id=5 SQL: SELECT lcc_cacheobj FROM linkscc WHERE lcc_pageid = 5 SQL: SELECT ss_total_views, ss_total_edits, ss_good_articles FROM site_stats WHERE ss_row_id=1 SQL: UPDATE cur SET cur_counter = cur_counter + 1 WHERE cur_id = 5 SQL: COMMIT bsm - in OutputPage::output ** private caching; Thu, 28 Oct 2004 19:13:27 GMT ** bsm - in SkinPHPTal::outputPage SQL: SELECT cur_id FROM cur WHERE cur_namespace=2 AND cur_title='207.228.227.98' bsm - title is Main Page SQL: SELECT cur_id FROM cur WHERE cur_namespace=1 AND cur_title='Main_Page' SQL: BEGIN SQL: UPDATE LOW_PRIORITY site_stats SET ss_total_views=(ss_total_views+1),ss_total_edits=(ss_total_edits),ss_good_articles=(ss_good_articles) WHERE ss_row_id=1 SQL: COMMIT SQL: BEGIN SQL: COMMIT Request ended normally
I can't tell you about the rest of it, but I did notice that http://reclaimdemocracy.org/rdc/ doesn't point to mediawiki's index.php. Is mediawiki installed in the /rdc directory? If you're using rewrite rules, double check them so that this is fixed. I don't think that's related to the problem
The output I get is what is outputed by PHP if the script doesn't override it.
Try some of the things mentioned in the other things on the list.
Brion?
On Tue, 2 Nov 2004 19:34:28 -0700, poster poster@richpoints.com wrote:
The URL for the wiki is http://reclaimdemocracy.org/rdc/
If I go straight to the web server by telnet, I can definitely confirm nothing is being output from the script:
[clipped]
-- Jamie ------------------------------------------------------------------- http://endeavour.zapto.org/astro73/ Thank you to JosephM for inviting me to Gmail!
On Nov 2, 2004, at 6:34 PM, poster wrote:
If I go straight to the web server by telnet, I can definitely confirm nothing is being output from the script:
[snip]
Connection to reclaimdemocracy.org closed by foreign host.
Odd... No output is typically caused by PHP/Apache crashing, but there actually are headers returned (you need to put HTTP/1.0 at the end of the GET line to see the headers returned; otherwise it dumps the content only without any headers). Can you check Apache's error_log just in case?
Try disabling the gzip output filter. Remove these lines from near the top of LocalSettings.php: ## Compress output if the browser supports it if( !ini_get( 'zlib.output_compression' ) ) @ob_start( 'ob_gzhandler' );
It shouldn't be having any effect, since my telnet test doesn't ask for gzip and I still get nothing. But try it just in case...
Also, try disabling the PHPTal skin; a few people have reported intermittent PHP crashes exacerbated by changes to the PHPTal template (possibly caused by a bug in their PHP accelerator module?) Set in LocalSettings.php: $wgUsePHPTal = false;
That will revert to the 'old' appearance of MediaWiki 1.2 and earlier, which uses different output code paths.
-- brion vibber (brion @ pobox.com)
I tried the suggestions brion offered (details below). The last suggestion worked. Disabling PHPTal enables us to use the wiki, but only with the older appearance. I guess we could either live with that, or try digging into the PHPTal module and debugging it.
*** Adding the HTTP/1.0 string to the end of the get line produced additional headers:
$ telnet reclaimdemocracy.org 80 Trying 207.228.227.98... Connected to reclaimdemocracy.org. Escape character is '^]'. GET /rdc/index.php/Main_Page HTTP/1.0 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Accept-Language: en-us,en;q=0.5 Cache-Control: no-cache Connection: keep-alive Host: reclaimdemocracy.org Keep-Alive: 300 Pragma: no-cache User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
HTTP/1.1 200 OK Date: Wed, 03 Nov 2004 21:32:01 GMT Server: Apache/1.3.31 (Unix) mod_jk/1.2.5 FrontPage/5.0.2.2635 mod_fastcgi/2.4.2 mod_throttle/3.1.2 PHP/4.3.8 mod_ssl/2.8.18 OpenSSL/0.9.7d X-Powered-By: PHP/4.3.8 Vary: Accept-Encoding,Cookie Expires: -1 Cache-Control: private, must-revalidate, max-age=0 Last-modified: Thu, 28 Oct 2004 19:13:27 GMT Content-language: en Connection: close Content-Type: text/html; charset=utf-8
Connection to reclaimdemocracy.org closed by foreign host.
*** disabling the gzip output filter had no effect.
*** disabling PHPTal skin makes a huge difference. Once I set that to false, I get a nicely formatted page back. Works with telnet and web browsers.
Thanks for the tips. Now at least we can get something up and know what module to look at for further debugging.
mediawiki-l@lists.wikimedia.org