Extension talk:SQL2Wiki/old

Security
Hmm, how about DELETE * FROM `page`? Looks nice, but like a major security breach. --GunterS 11:03, 18 March 2007 (UTC)


 * Answer: That should be no concern. You have to handle security issues on database level. Set up a user account on each database you want to query from the wiki, and give it the minimal permissions sufficient to retrieve data.

GRANT ALL ON yourDB.* to 'wikisqlext'@'wikihost' GRANT SELECT ON yourDB.* to 'wikisqlext'@'wikihost'
 * Dont't do
 * Instead do

Incompatible with Mediawiki-1.8.4?
On my installation, it simply crashes with a segmentation fault (signal 11). The user gets a blank page.

Anyone got this one running on 1.8.x?

Could it be the settings of my php installation, or the mysql client libraries? But MediaWiki itself runs just fine, using (probably) the same php installation and mysql libs..

$meta = mysql_fetch_field($result, $i);
 * Update: it is the line
 * that generates the segmentation fault. Hmmm.. mysql_fetch_field should be a fairly often used function... to bad i'm not a php programmer who could fix that.


 * Google search
 * says i got a library information problem. Matching my first assumption, this is considered a fact now. I'll reinstall php and keep you updated if that fixed the error.


 * Major OOps:This should probably go to some php forum. it has nothing to do with the wonderful sql extension.
 * It turns out that during the linking phase of php, a path gets included that contains (old) mysql-4 libraries, before the path that contains the (correct) mysql-5 libraries. It's not php's fault, nor configure's fault, nor Sun's fault, nor mine.. it's just bad coincidence.
 * 3 possible solutions
 * do some very tricky configure thing
 * hack apachectl so LD_LIBRARY_PATH gets set
 * uninstall that fsckin Sunfreeware-mysql-4 bullshit.

Easy solution number 3 ;-)

Thank you very much for this useful extension!

How to have it worked with Special Pages / Templates?
Hi, Thank you for this extension. I've installed it and it works really good. However there are some problems with having it working in the templates or special pages. I get errors like: Warning: mysql_query: 80 is not a valid MySQL-Link resource in /wiki/includes/Database.php on line 435

Warning: mysql_errno: 80 is not a valid MySQL-Link resource in /wiki/includes/Database.php on line 660

Warning: mysql_errno: 80 is not a valid MySQL-Link resource in /wiki/includes/Database.php on line 660

Warning: mysql_errno: 80 is not a valid MySQL-Link resource in /wiki/includes/Database.php on line 660

Warning: mysql_query: 80 is not a valid MySQL-Link resource in /wiki/includes/Database.php on line 435

Warning: mysql_errno: 80 is not a valid MySQL-Link resource in /wiki/includes/Database.php on line 660

Warning: mysql_errno: 80 is not a valid MySQL-Link resource in /wiki/includes/Database.php on line 660

Warning: mysql_errno: 80 is not a valid MySQL-Link resource in /wiki/includes/Database.php on line 660 Unable to free MySQL result It seems the problem is with line: function doQuery( $sql ) { if( $this->bufferResults ) { $ret = mysql_query( $sql, $this->mConn ); } else { $ret = mysql_unbuffered_query( $sql, $this->mConn ); } return $ret; } Do you know how to fix it to make it possible to display queries in special pages and templates? thx in advance, Regards, Aretai 16:13, 20 March 2007 (UTC)


 * In fact the problem seems to be much wider than I thought. When nothing except this tag is put on the page then I get this error. Earlier on I've also put some php code that connects to the database and then it's working OK.

Aretai 14:47, 23 March 2007 (UTC)

The issue is related to the user you are using to access the db: if you are using the same user as the one which accesses normally the db, you will get this fault. Try creating a new user with limited rights and it should work. It does for me with MW 1.8.2. Jean-Lou Dupont 15:30, 23 March 2007 (UTC)

Love this extension!
This extension solves a lot of issues for me. I've been typically writing individual pages for SQL report output, now this can live directly on the Wiki. I suppose this dynamic content violates some kind of Wiki paradigm, it sure solves some issues for me. So what if somebody can't search on the report output.

Is there a way to individually specify a page in a "non-cached" list?

Appearance
Any ideas how to get number display automatically right adjusted? --HermannSchmitz 19:42, 15 May 2007 (UTC)