[Mediawiki-l] Tag Extensions: ODBC and Web Services

George Kiraz gkiraz at gorgiaspress.com
Wed Dec 26 02:20:18 UTC 2007


I am running mediawiki on MySQL on a Windows server. I am writing a TAG extension which needs to pull data from a MS SQL data source. In the extension's PHP code, I have the line:

 $sqlconnect=odbc_connect($dsn,$username,$password);

When running this PHP code outside of the Wiki (e.g., in the DOS prompt by typing PHP code.php), the connection works and I actually pull out data from the database. But inside the extension code, $sqlconnect ends up being null. Is there a setting that I am missing that allows me to connect to an external database? Is one not allowed to connect to a database in a TAG extension code? (I am new to extensions).

I also tried pulling the same data via web services. I tried the line:

$client = new SoapClient("http://www.mydomain.com/MyService.asmx?wsdl");

Again, I successfully was able to pull data out of the web services when I ran the code outside of the wiki at the DOS prompt. But once in the Wiki extension code, my Wiki pages go blank!

Again, is there a setting that I am missing that will allow me to connect to databases and web services in TAG extensions?

Thanks

George A. Kiraz

-------------------------------------------------
George A. Kiraz, M.St. (Oxon), M.Phil., Ph.D. (Cantab)
Gorgias Press
180 Centennial Ave., Suite A
Piscataway, NJ 08854 USA
Tel. (732) 885-8900
Fax (732) 885-8908


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT05533.txt
Url: http://lists.wikimedia.org/pipermail/mediawiki-l/attachments/20071225/f612e8d1/attachment.txt 


More information about the MediaWiki-l mailing list