This is a standard script from Kannel (gateway-1.5.0/contrib/kannel-monitor)
Standard script posted /var/www/html/kannel-monitor
If using a test script, all ok
<?php
    $url = "http://localhost/";;
    if (($fp = fopen($url, "r"))) {
    echo "Ok";
    }
    else {
    echo "Not ok";
    }
    fclose($fp);
?>

Perhaps the problem of access to the port 13000 (Kannel admin)

Kannel 1.5.0, Centos 7, Kannel independently compiled


-----Original Message-----
From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Milan P. Stanic
Sent: Tuesday, March 01, 2016 5:26 PM
To: de...@kannel.org
Subject: Re: Error in kannel-monitor

Dear Vladimir,

Please post your questions to users@kannel.org mailing list where you have 
better chances to get answer. de...@kannel.org list is for developers 
discussions.

On Tue, 2016-03-01 at 10:47, Беляев Владимир Николаевич wrote:
>         $url = $config["base_url"]."/status.xml";
>         $xml_data = "";
>         /* open the file description to the URL */
>         if (($fp = fopen($url, "r"))) {
>             $bgcolor = 'green';
>             /* read the XML input */
>             while (!feof($fp)) {
>                 $xml_data .= fread($fp, 200000);
>             }
>             fclose($fp);
> 
> Through the browser opens the URL

It is not clear (at least to me) what you are trying to do with this php script 
and how do invoke it. Please try to describe what you are trying to achieve and 
how do you do that. Also describe your working environment i.e. your OS and how 
did you installed Kannel and accompanying software.

> > When you open a kannel-monitor I get an error
> > 
> > [Tue Feb 09 09:50:14.899177 2016] [:error] [pid 45752] [client 
> > 172.19.1.35:56951] PHP Warning:
> > fopen(http://localhost:13000/status.xml?password=): failed to open stream:
> > Permission denied in /var/www/html/kannel-monitor/index.php on line 
> > 91
> > 
> > What can be wrong&
> 
> Message tells that the index.php cannot open something (file, socket or 
> something else).
> Look at line 91 in index.php script and see what file it is trying to open 
> and check the permissions of that file and who is the owner of it.
> 
> Or, post your index.php script (just few lines around line 91) so someone 
> could give you a hint.
> 
> 
> 



Reply via email to