Topic on Project:Support desk

Server hangs up while using bot class

8
202.88.239.42 (talkcontribs)

Server hangs up when i use my mediawiki bot, My code is as follows, I hope there is some issue with curl or may be some other. can some one help me what is the problem why server hands up during initialising the class and calling the functionality.

I tried to fine the discussion thread for wikibot page, i didnt get, if possible give me the link where i should create a thread for wikibot

Ciencia Al Poder (talkcontribs)

You could start by putting debug statements to find exactly the line that causes your server to hang.

202.88.239.42 (talkcontribs)

No statements in my error log of server, and no php errors also. Should i specifically put any statement to get more info about, Kindly help coz i am a fresher, i had made php errors in localsettings .

202.88.239.42 (talkcontribs)

I restarted my server after stopping the httpd service, changed my port still get the same error, I think the curl function present in callAPI has issues with my server, I am attaching the configuration along with .As you can see, i have just called a single function, which gives me error

<?php
include("Phpwikibot.php"); 
$username="a";
$password="p";
$wiki='http://localhost/';
$url='api.php?action=query&prop=revisions&titles=Ajith&rvprop=content';
$bot=new Wikibot($username, $password, $wiki);
$bot->callAPI($wiki, $url);
Ciencia Al Poder (talkcontribs)

The bot page seems to be w:User:Kaspo/Phpwikibot

Try contacting him, although that project seems dead. Maybe you should use another bot framework.

About the "error", it could help if you are more specific. What specific error message do you get?

202.88.239.42 (talkcontribs)

Ciencia, I am actually unlucky to get any error from my error log, actually the error log has no errors pertaining to it. I restatrted my server and it has only logs pertaining to restart. By the was, I found the following error in my mediawiki, does this affect my server hang?? Interface 'IContextSource' not found in /usr/local/apache2/htdocs/mediawiki-1.21.2/includes/context/ContextSource.php on line 30

202.88.239.42 (talkcontribs)

@Ciencia, Sir, I was unlucky to get any error regarding the issue in my error_log file. I restarted my server and have the log pertaining to it. [Mon Dec 15 17:05:41 2014] [notice] Apache/2.2.24 (Unix) PHP/5.4.13 configured -- resuming normal operations . By the way i found the following error in my mediawiki, does this affects my hang or does it makes sense when we use a bot . Interface 'IContextSource' not found in /Serverlocation/includes/context/ContextSource.php on line 30

Ciencia Al Poder (talkcontribs)

I don't know anything from the script you linked, and I'm not sure if I understand correctly your issue.

You say the server hangs. Could you please specify? The entire server (operating system) freezes? Just the web service (apache?). I doubt any of both issues could happen, and if they happen there must be something wrong with the web service and not MediaWiki.

If it's the script that you run what hangs, then you could look in the server access logs to see if the request even arrives to the server. If not it may be a firewall issue or some other interference.

Reply to "Server hangs up while using bot class"