I'm rebuilding a mediawiki on a host running knoppix. It used to be on another host that crashed and burned. mediawiki worked fine before the crash and I'm using a backup to the DB to regen the pages.
If I edit a page, when I hit save it goes to the URL http://localhost/wiki/index.php/pagename and it gives me an error page that says "Unable to connect Firefox can't establish a connection to the server at localhost. (..yadayada.) I guess this makes sense, as local host would be the client machine where I am browsing, not the server where mediawiki resides, right? But why does mediawiki put localhost in the URL?
If I then change the URL manually to http://actualDNSname/wiki/index.php/pagename, then it successfully loads the page with edits successfully done.
I am rebuilding this system, it is possible that mysql or apache got downgraded and that mediawiki is doesn't match any more. That is maybe this host had mysql 4.1 or even 5 running before.
now running mysqld Ver 4.0.24_Debian-10 for pc-linux-gnu on i386 (Source distribution) Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10-15 mod_ssl/2.8.22 OpenSSL/0.9.7d MediaWiki 1.4.7
Does this ring any bells?
On 06/04/06, Dave Burns tburns@hawaii.edu wrote:
I am rebuilding this system, it is possible that mysql or apache got downgraded and that mediawiki is doesn't match any more. That is maybe this host had mysql 4.1 or even 5 running before.
1. Upgrade MediaWiki as soon as possible 2. Check the value of $wgServer in LocalSettings.php is correct
On 4/5/06, Rob Church robchur@gmail.com wrote:
- Upgrade MediaWiki as soon as possible
I'm afraid it is out of sync already - should I really upgrade?
- Check the value of $wgServer in LocalSettings.php is correct
cat LocalSettings.php|grep wgServer
... nothing...
root@0[wiki]# cat LocalSettings.php|grep localhost $wgDBserver = "localhost";
So I changed that to the server's hostname, no change in my problem.
Thanks for trying!
On Thursday 06 April 2006 07:07, Dave Burns wrote:
On 4/5/06, Rob Church robchur@gmail.com wrote:
- Upgrade MediaWiki as soon as possible
I'm afraid it is out of sync already - should I really upgrade?
- Check the value of $wgServer in LocalSettings.php is correct
cat LocalSettings.php|grep wgServer
... nothing...
root@0[wiki]# cat LocalSettings.php|grep localhost $wgDBserver = "localhost";
So I changed that to the server's hostname, no change in my problem.
That is quite strange. The FAQ
http://meta.wikimedia.org/wiki/MediaWiki_FAQ#The_index_redirects_to_localhos...
also suggests setting $wgServer, and it worked fine for me on problematic servers.
On 4/6/06, Markus Krötzsch mak@aifb.uni-karlsruhe.de wrote:
On Thursday 06 April 2006 07:07, Dave Burns wrote:
On 4/5/06, Rob Church robchur@gmail.com wrote:
- Upgrade MediaWiki as soon as possible
I'm afraid it is out of sync already - should I really upgrade?
- Check the value of $wgServer in LocalSettings.php is correct
cat LocalSettings.php|grep wgServer
... nothing...
root@0[wiki]# cat LocalSettings.php|grep localhost $wgDBserver = "localhost";
So I changed that to the server's hostname, no change in my problem.
That is quite strange. The FAQ
Not strange at all. $wgServer and $wgDBserver are two different variables with different purposes.
$wgServer tells mediawiki what name to use in the host portion of the URLs it generates to link to wiki stuff.
$wgDBServer tells mediawiki the name of the host which is running mySql. This may or may not be the same machine which is running the web server, hence the separate variables.
If $wgServer is not set in LocalSettings.php, the value for it which is calculated in includes/DefaultSettings.php will be used. It defaults to localhost.
This is a general pattern. Configuration variables are set in includes/DefaultSettings.php before the code in LocalSettings.php is executed. This allows the default settings to be overriden in such a way that they are easy to preserve across versions of mediawiki. If you don't find a variable in LocalSettings.php, look for it in includes/DefaultSettings.php, but don't change it there, add the statement to change it in LocalSettings.php.
He needs to set $wgServer NOT $wgDBServer.
-- Rick DeNatale
Visit the Project Mercury Wiki Site http://www.mercuryspacecraft.com/
On Thursday 06 April 2006 14:31, Rick DeNatale wrote:
On 4/6/06, Markus Krötzsch mak@aifb.uni-karlsruhe.de wrote:
On Thursday 06 April 2006 07:07, Dave Burns wrote:
On 4/5/06, Rob Church robchur@gmail.com wrote:
- Upgrade MediaWiki as soon as possible
I'm afraid it is out of sync already - should I really upgrade?
- Check the value of $wgServer in LocalSettings.php is correct
cat LocalSettings.php|grep wgServer
... nothing...
root@0[wiki]# cat LocalSettings.php|grep localhost $wgDBserver = "localhost";
So I changed that to the server's hostname, no change in my problem.
That is quite strange. The FAQ
Not strange at all. $wgServer and $wgDBserver are two different variables with different purposes.
$wgServer tells mediawiki what name to use in the host portion of the URLs it generates to link to wiki stuff.
$wgDBServer tells mediawiki the name of the host which is running mySql. This may or may not be the same machine which is running the web server, hence the separate variables.
If $wgServer is not set in LocalSettings.php, the value for it which is calculated in includes/DefaultSettings.php will be used. It defaults to localhost.
This is a general pattern. Configuration variables are set in includes/DefaultSettings.php before the code in LocalSettings.php is executed. This allows the default settings to be overriden in such a way that they are easy to preserve across versions of mediawiki. If you don't find a variable in LocalSettings.php, look for it in includes/DefaultSettings.php, but don't change it there, add the statement to change it in LocalSettings.php.
He needs to set $wgServer NOT $wgDBServer.
Ah, sure! I misunderstood his email and believed that he did exactly that ... this should be it then.
On 06/04/06, Dave Burns tburns@hawaii.edu wrote:
On 4/5/06, Rob Church robchur@gmail.com wrote:
- Upgrade MediaWiki as soon as possible
I'm afraid it is out of sync already - should I really upgrade?
You're running server software which is out of date and contains known vulnerabilities. Whether or not to upgrade is, of course, your choice.
- Check the value of $wgServer in LocalSettings.php is correct
cat LocalSettings.php|grep wgServer
... nothing...
root@0[wiki]# cat LocalSettings.php|grep localhost $wgDBserver = "localhost";
So I changed that to the server's hostname, no change in my problem.
In that case, provide a value for $wgServer; set *that* to the hostname.
Rob Church
In that case, provide a value for $wgServer; set *that* to the hostname.
I added one line to LocalSettings.php: $wgServer = "hostname";
Then after I restart apache & mysql and edit a page, when I save the edit I get sent to URL:
http://hostname/wiki/hostnamehostname/wiki/index.php/name_of_edited_page
When I manually edit the URL to be http://hostname/wiki/index.php/name_of_edited_page, it shows the edit to have been saved. So this is not a disaster, just kinda embarrassing.
Thanks for the input!
Dave
According to http://www.mediawiki.org/wiki/Help:$wgServer, $wgServer should also include the "http".
Also, try to preview a page with the variable "{{SERVER}}" - in Wikimedia projects, it shows things like "http://meta.wikimedia.org"; what about your wiki?
Dave Burns wrote:
In that case, provide a value for $wgServer; set *that* to the hostname.
I added one line to LocalSettings.php: $wgServer = "hostname";
Then after I restart apache & mysql and edit a page, when I save the edit I get sent to URL:
http://hostname/wiki/hostnamehostname/wiki/index.php/name_of_edited_page
When I manually edit the URL to be http://hostname/wiki/index.php/name_of_edited_page, it shows the edit to have been saved. So this is not a disaster, just kinda embarrassing.
Thanks for the input!
Dave _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
On 4/6/06, Rotem Liss mail@rotemliss.com wrote:According to http://www.mediawiki.org/wiki
/Help:$wgServer, $wgServer should also include the "http".
So I added something like: $wgServer = "http://hostname.domain.com";
And it works now! Yayyy!!!!
Thank you thankyou!
Also, try to preview a page with the variable "{{SERVER}}" - in
Wikimedia projects, it shows things like "http://meta.wikimedia.org"; what about your wiki?
How to preview a page with a variable? When I type in the URL http://hostname.com/wiki/%7B%7BSERVER%7D%7D (with SERVER being literal) it sent me to http://hostname.com/wiki/%7B%7BSERVER%7D%7D, pretty sure this is not what you mean, but it was my only guess.
mahalo, Dave
As for the preview - go to a page, edit it, write "{{SERVER}}" in the contents, and preview it.
By the way, you should also add the variable $wgServerName, which should be without the "http://" (something like "hostname.domain.com").
Dave Burns wrote:
On 4/6/06, Rotem Liss mail@rotemliss.com wrote:According to http://www.mediawiki.org/wiki
/Help:$wgServer, $wgServer should also include the "http".
So I added something like: $wgServer = "http://hostname.domain.com";
And it works now! Yayyy!!!!
Thank you thankyou!
Also, try to preview a page with the variable "{{SERVER}}" - in
Wikimedia projects, it shows things like "http://meta.wikimedia.org"; what about your wiki?
How to preview a page with a variable? When I type in the URL http://hostname.com/wiki/%7B%7BSERVER%7D%7D (with SERVER being literal) it sent me to http://hostname.com/wiki/%7B%7BSERVER%7D%7D, pretty sure this is not what you mean, but it was my only guess.
mahalo, Dave _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Can you ping localhost? Can you access a url with http://localhost ?
mediawiki-l@lists.wikimedia.org