I've locally installed the Perl module MediaWiki::API and successfully made a Perl script which uses it. I've now converted the script to Fasct CGI and placed it in my public_html with execute permission and .fcgi extension but it fails because it can't find MediaWiki::API
I don't know if such scripts run as me and should have my path or how to change the path, if they don't run as me does that mean I have to get MediaWiki::API installed site-wide?
You can see the error output in this test script: http://toolserver.org/~hippietrail/trycatch.fcgi
Andrew Dunbar (hippietrail)
When you say "locally", does this mean somewhere in your /home/hippietrail/* directory? If so, you can specify in the perl script to use the library of where the module is located.
For example, if you're modules were under the directory "/home/hippietrail/modules", you add a line to the perl script "use lib '/home/hippietrail/modules';" to use that library.
Please correct me if I am wrong.
On Tue, May 12, 2009 at 5:31 PM, Andrew Dunbar hippytrail@gmail.com wrote:
I've locally installed the Perl module MediaWiki::API and successfully made a Perl script which uses it. I've now converted the script to Fasct CGI and placed it in my public_html with execute permission and .fcgi extension but it fails because it can't find MediaWiki::API
I don't know if such scripts run as me and should have my path or how to change the path, if they don't run as me does that mean I have to get MediaWiki::API installed site-wide?
You can see the error output in this test script: http://toolserver.org/~hippietrail/trycatch.fcgihttp://toolserver.org/%7Ehippietrail/trycatch.fcgi
Andrew Dunbar (hippietrail)
2009/5/12 James R. e.wikipedia@gmail.com:
When you say "locally", does this mean somewhere in your /home/hippietrail/* directory? If so, you can specify in the perl script to use the library of where the module is located.
For example, if you're modules were under the directory "/home/hippietrail/modules", you add a line to the perl script "use lib '/home/hippietrail/modules';" to use that library.
Please correct me if I am wrong.
By "locally installed" I mean I followed the instructions on the Toolserver Wiki: https://wiki.toolserver.org/view/Installing_perl_modules_into_your_$HOME
So my local modules are in /home/hippietrail/lib I added this line as you suggest: use lib '/home/hippietrail/lib';
But I still see a bad gateway when I try to access the script from a browser. Also I don't know where to find the error log from the fcgi script.
On Tue, May 12, 2009 at 5:31 PM, Andrew Dunbar hippytrail@gmail.com wrote:
I've locally installed the Perl module MediaWiki::API and successfully made a Perl script which uses it. I've now converted the script to Fasct CGI and placed it in my public_html with execute permission and .fcgi extension but it fails because it can't find MediaWiki::API
I don't know if such scripts run as me and should have my path or how to change the path, if they don't run as me does that mean I have to get MediaWiki::API installed site-wide?
You can see the error output in this test script: http://toolserver.org/~hippietrail/trycatch.fcgi
Andrew Dunbar (hippietrail)
-- James R.
[[User:JamesR]] English Wikipedia Administrator
Toolserver-l mailing list Toolserver-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Hello, Am Tuesday 12 May 2009 11:58:42 schrieb Andrew Dunbar:
But I still see a bad gateway when I try to access the script from a browser. Also I don't know where to find the error log from the fcgi script.
/var/log/http/errors
If you grep for your name, you see that you had have path-problems tomorrow which are now solved (BTW: I said to you last night in the channel that it is a path-problem).
The problem is now that your script doesn't generate any output (at least zeus says so).
Sincerly, DaB.
2009/5/12 DaB. WP@daniel.baur4.info:
Hello, Am Tuesday 12 May 2009 11:58:42 schrieb Andrew Dunbar:
But I still see a bad gateway when I try to access the script from a browser. Also I don't know where to find the error log from the fcgi script.
/var/log/http/errors
I could find some old errors there but if I did tail -f /var/log/http/errors I didn't see fresh errors come through as I modified the code and accessed the URL.
If you grep for your name, you see that you had have path-problems tomorrow which are now solved (BTW: I said to you last night in the channel that it is a path-problem).
It was tricky because there were two path problems: finding MediaWiki::API and then that module finding JSON::XP which is installed on nightshade but not wolfsbane.
The problem is now that your script doesn't generate any output (at least zeus says so).
It does now. I modified MediaWiki::API locally to use JSON which I installed locally instead of JSON::XP which cannot be installed locally.
Thanks for your help.
Andrew Dunbar (hippietrail)
Sincerly, DaB.
-- wp-blog.de
Toolserver-l mailing list Toolserver-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Andrew Dunbar wrote:
2009/5/12 DaB. WP@daniel.baur4.info:
Hello,
It does now. I modified MediaWiki::API locally to use JSON which I installed locally instead of JSON::XP which cannot be installed locally.
Thanks for your help.
Andrew Dunbar (hippietrail)
FWIW, JSON::XS installs fine.
toolserver-l@lists.wikimedia.org