I have just tried to install MediaWiki 1.3.11 on a virgin Fedora Core 3
box. It took me a while to figure out that I had to disable SELinux to
get the config directory to be fully writable, so it might be documenting
that for other users?
Anyway my problem is that MediaWiki does not get all the way through its
installation script and create the LocalSettings.php file. MySQL is
working and the DB looks fine if I examine it with phpMyAdmin. Any
suggestions?
Thanks in advance,
Paul
Checking environment...
PHP 4.3.9: ok
PHP server API is apache2handler; ok, using pretty URLs
(index.php/Page_Title)
Have XML / Latin1-UTF-8 conversion support.
PHP's memory_limit is 24M. If this is too low, installation may fail!
Have zlib support; enabling output compression.
Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if
you enable uploads.
Installation directory: /var/www/html/wiki
Script URI path: /wiki
Connected as root (automatic)
Connected to database... 3.23.58
Created database wikidb
Creating tables... done.
Initializing data...
Granting user permissions... Sorry! The wiki is experiencing some
technical difficulties, and cannot contact the database server.
On Tue, 2005-01-03 at 15:30 -0600, Wes Mauer wrote:
> I've looked around the site and through the archives, but I have not
> found how you can change the license message from within WikiMedia.
> What I am looking to do, is remove the GFDL text that appears in the
> bottom of my Wiki, and replace it with a notice indicating that the
> material (documents) is property of my employer. If anyone could point
> me to some documentation on how to do this, that would be much
> appreciated. Thanks in advance!
First off, I've moved the conversation to the mediawiki-l list, where
MediaWiki support info goes.
Second, any time you want to replace any text in MediaWiki, look in the
languages/Language.php file (for English) or the
languages/LanguageXX.php file, where XX is the two-letter language code
(LanguageDe.php is the German-language file, for example).
Third, the entry you need is 'gnunote' in the language file.
~Evan
--
Evan Prodromou
evan(a)bad.dynu.ca
Hi,
i am new to the list and wonder if i can ask some PHP question here:
if i fail the meaning of this list pls just ignore. thanks for answer anyhow ;)
NEWSLETTER : i couldnt find a function like this in mediawiki and did
not find an extension, too. during searching for extentions i decided
to write a simple extension to mail a newsletter to registered
users (only some dozend) but failed as i am not so trained with php
must mention that the newsletter function already worked fine
when i separated the newslettersend-module and used the (a little
modified)original emailform of specialpages to try it. but i wanted
a special entry in specialpages as NEWSLETTER and now mixed something up.
--the mailform appears but when i "submit" it complains class double-defined
and i cant find out where
--i also want to separate the db-connection as this seems to be a little unsecure ;)
(how?)
best regards Arno
##-----------------------------------------------------------
##newsletter.php
##-----------------------------------------------------------
<?php
# to use : include this file from your LocalSettings.php like this
# include("extensions/newsletter.php");
$wgExtensionFunctions[] = "wfnewsletter";
# This extension acts as a special page
require_once( 'includes/SpecialPage.php' );
function wfnewsletter() { //START EXTENSION FUNC
class NewsLetter extends SpecialPage {
function NewsLetter() {
SpecialPage::SpecialPage("NewsLetter");
}
function execute( $par ) {
global $wgUser, $wgOut, $wgRequest;
$nt = Title::newFromURL( "newFromURL");
$nu = User::newFromName( "newFromName");
$id = $nu->idForName();
$f = showForm($target);
if ( "success" == $action ) { $f->showSuccess(); }
else if ( "submit" == $action && $wgRequest->wasPosted() ) { $f->doSubmit(); }
else { $f->showForm( "" ); }
} // end execute function
} // end Newsletter class
global $wgMessageCache;
SpecialPage::addPage( new NewsLetter );
$wgMessageCache->addMessage( "newsletter", "NEWSLETTER" );
function EmailUserForm( $addr, $target ) {
global $wgRequest;
$this->mAddress = $addr;
$this->target = "NEWSLETTER";
$this->text = $wgRequest->getText( 'wpText' );
$this->subject = $wgRequest->getText( 'wpSubject' );
}//end function EmailUserForm
function showForm( $err ){
global $wgOut, $wgUser, $wgLang;
$wgOut->setPagetitle("newsletter to all registered users");
if ( $this->subject === "" ) {
$this->subject = "[..........yourwikiname.....-newsletter] no. ";
}
$emf = "sender";
$sender = $wgUser->getName();
$emr = "re";
$emm = "message";
$ems = "send";
$encSubject = htmlspecialchars( $this->subject );
$titleObj = Title::makeTitle( NS_SPECIAL, "Emailuser" );
$action = $titleObj->escapeLocalURL( "target={$this->target}&action=submit" );
if ( "" != $err ) {
$wgOut->setSubtitle( wfMsg( "formerror" ) );
$wgOut->addHTML( "<p><font color='red' size='+1'>{$err}</font>\n" );
}
$wgOut->addHTML( "<p>
<form id=\"emailuser\" method=\"post\" action=\"{$action}\">
<table border=0><tr>
<td align=right>{$emf}:</td>
<td align=left><strong>{$sender}</strong></td>
</tr><tr>
<td align=right>{$emt}:</td>
<td align=left><strong>{$rcpt}</strong></td>
</tr><tr>
<td align=right>{$emr}:</td>
<td align=left>
<input type=text name=\"wpSubject\" value=\"{$encSubject}\">
</td>
</tr><tr>
<td align=right>{$emm}:</td>
<td align=left>
<textarea name=\"wpText\" rows=10 cols=60 wrap=virtual>" . htmlspecialchars( $this->text ) .
"</textarea>
</td></tr><tr>
<td> </td><td align=left>
<input type=submit name=\"wpSend\" value=\"{$ems}\">
</td></tr></table>
</form>\n" );
}//end function showForm
function doSubmit(){
global $wgOut, $wgUser, $wgLang, $wgOutputEncoding;
$from = wfQuotedPrintable( $wgUser->getName() ) . " <" . $wgUser->getEmail() . ">";
$mailResult = newslettersend( $this->mAddress, $from, wfQuotedPrintable( $this->subject ), $this->text );
if (! $mailResult)
{
$titleObj = Title::makeTitle( NS_SPECIAL, "Emailuser" );
$encTarget = wfUrlencode( $this->target );
$wgOut->redirect( $titleObj->getFullURL( "target={$encTarget}&action=success" ) );
}
else
$wgOut->addHTML( wfMsg( "usermailererror" ) . $mailResult);
}// end function doSubmit()
function showSuccess() {
global $wgOut, $wgUser;
$wgOut->setPagetitle( wfMsg( "emailsent" ) );
$wgOut->addHTML( wfMsg( "emailsenttext" ) );
$wgOut->returnToMain( false );
}//end function showSuccess()
function newslettersend( $to, $from, $subject, $body ){
global $wgUser, $wgSMTP, $wgOutputEncoding, $wgErrorString;
$qto = wfQuotedPrintable( $to );
$headers =
"MIME-Version: 1.0\r\n" .
"Content-type: text/plain; charset={$wgOutputEncoding}\r\n" .
"Content-transfer-encoding: 8bit\r\n" .
//"From: {$from}\r\n" .
"From: ..............yourname...........";
"X-Mailer: ..........your newsletter";
$wgErrorString = "";
set_error_handler( "mailErrorHandler" );
$Config_host = "localhost";
$ConfigDBname = "...............your db";
$Config_user = "...............dbuser";
$Config_password = "...............password";
//connect to SQL
$db = mysql_connect($Config_host, $Config_user,$Config_password) or die ("no connection possible");
//select database
mysql_select_db($ConfigDBname, $db) or die ("connection to DB failed");
// define query
$z = 0;
$sql = "SELECT * FROM user";
// execute query
$result = mysql_query($sql);
while($arr = mysql_fetch_array($result, MYSQL_ASSOC))
{
$name = $arr['user_real_name'];
$username = $arr['user_name'];
$email = $arr['user_email'];
mail( "......try with your own email-adress first.....",$subject, $body, $headers );
echo($name);
$z++;
}
restore_error_handler();
return $wgErrorString;
//close query
mysql_free_result($result);
//close sql-connection
mysql_close($db);
}//end function newsletter
function mailErrorHandler( $code, $string ) {
global $wgErrorString;
$wgErrorString = preg_replace( "/^mail\(\): /", "", $string );
}//end function mailErrorHandler
} # End of extension function
?>
hello,
I've installed a captcha system (same as some Wordrpress or Drupal) on
my personal wiki.
There are still some caching problems (well, at least my Firefox caches
the image instead of reloading them which is a problem here)
Only my "Talk" pages are editable by non-sysop. Just create an account
and try it:
http://www.fxparlant.net/Talk:Captcha
Just reload the page when the imagecode is not readable
François
hello
recently i've set up two wikis on one server.
also i created an interwiki link from one wiki to the
other.
is it possible to use a picture from one wiki in an
article from the other wiki?
i think it should, because wikicommons is working
fine, but how?
or what should i do?
thanks, paul
__________________________________________________
Do You Yahoo!?
Log on to Messenger with your mobile phone!
http://sg.messenger.yahoo.com
Hi,
is it possible to link to the parent page automatically? E.g. using a
special variable ?
Let's say, I have:
1. Home
1.1 Chapter 1
1.1.1 Section 1
On Section 1 the link to Chapter 1 should be displayed, on Chapter 1 the
link to Home.
Thanx
Dorthe
Thanks for the follow-up and clarification, you are correct
linking php4 against the newer mysql libraries should
have worked too.
Terry
> -----Original Message-----
> From: mediawiki-l-bounces(a)wikimedia.org [mailto:mediawiki-l-
> bounces(a)wikimedia.org] On Behalf Of Brion Vibber
> Sent: Wednesday, March 02, 2005 2:24 AM
> To: MediaWiki announcements and site admin list
> Subject: Re: [Mediawiki-l] installation problem: ... cannot contactthe
> databaseserver
>
> Terry Lalonde wrote:
> > Sarcastic tone on -> Thanks for the help!
>
> Congratulations on solving your problem on your own; less than 10
hours
> elapsed between your first post and your follow-up.
>
> > Since I figured it out...I'll share.
> >
> > In this case the problem was the fact that I was using
> > PHP4.x.x and mysql4.1.10. There is a basic incompatability
> > between the two in terms of password authentication.
>
> If you were to search the mailing list archives for "MySQL 4.1" you'd
> see a number of previous notes on this with pointers to the help pages
> on dev.mysql.com. This is also mentioned in the release notes for all
> 1.4 beta releases.
>
> Note that there is not actually a basic incompatibility between PHP
4.x
> and MySQL 4.1; PHP 4.x will work fine with MySQL 4.1 if you link it
> against the MySQL 4.1 client libraries. Most precompiled binary
> distributions however are linked against older, incompatible
libraries.
> If you received both PHP and MySQL distributions from the same vendor,
> you should let them know they're shipping incompatible versions.
>
> If you're using MySQL 4.1, you should also be aware that mysqldump may
> corrupt your data if it performs character set conversion. Use the
same
> charset setting for dumping as the database is set to (eg, latin1 for
> both).
>
> -- brion vibber (brion @ pobox.com)
Sarcastic tone on -> Thanks for the help!
Since I figured it out...I'll share.
In this case the problem was the fact that I was using
PHP4.x.x and mysql4.1.10. There is a basic incompatability
between the two in terms of password authentication.
I upgraded to PHP5 and everything worked. The mysql client
within php4 used an older method of encryption(?). The
capability to use older style sql passwords exists via an
"old_password" function, but that defeats the improved security.
> -----Original Message-----
> From: mediawiki-l-bounces(a)wikimedia.org [mailto:mediawiki-l-
> bounces(a)wikimedia.org] On Behalf Of Terry Lalonde
> Sent: Tuesday, March 01, 2005 1:09 PM
> To: mediawiki-l(a)wikimedia.org
> Subject: [Mediawiki-l] installation problem: ... cannot contact the
> databaseserver
>
>
> My log page is attached below...The error message does not help me,
> maybe someone have seen it before.
>
>
> Any help is appreciated.
>
>
> Terry
>
>
> MediaWiki 1.3.11 installation
>
>
> Please include all of the lines below when reporting installation
> problems.
>
>
> Checking environment...
>
>
> * PHP 4.3.10RC1: ok
> * PHP server API is apache2handler; 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.
> * Couldn't find GD library or ImageMagick; image thumbnailing
> disabled.
> * Installation directory: /cad/local/Linux/apache2/htdocs/wiki
> * Script URI path: /wiki
> * Connected as root (automatic)
> * Connected to database... 4.1.10; enabling MySQL 4 enhancements
> * Database wikidb exists
> * There are already MediaWiki tables in this database. Checking if
> updates are needed...
>
> ...ipblocks is up to date.
> ...already have interwiki table
> ...indexes seem up to 20031107 standards
> ...have linkscc table.
> ...linkscc is up to date, or does not exist. Good.
> ...have hitcounter table.
> Converting links table to ID-ID...
> Sorry! The wiki is experiencing some technical difficulties, and
cannot
> contact the database server.
>
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l(a)Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l