Have you tried loading the url from the script 
(http://localhost:13000/status.xml?password=) directly in your browser? if so, 
was it successful? I'm inclined to think that the error has to do with the 
password you are using, which is empty in this case.

Can you paste your conf?

Thnx

Sent from my iPhone

> On Mar 2, 2016, at 22:45, Беляев Владимир Николаевич <v.bely...@sngb.ru> 
> wrote:
> 
> $url = "http://localhost/";; - This test script.
> In the working script specified port
> 
> At the same error :
> PHP Warning: fopen(http://localhost:13000/status.xml?password=): failed to 
> open stream: Permission denied in /var/www/html/kannel-monitor/index.php
> 
> Perhaps the problem of access to the port 13000 (Kannel admin)
> This all works through a browser
> 
> It is possible to fix?
> 
> 
> -----Original Message-----
> From: users [mailto:users-boun...@kannel.org] On Behalf Of Milan P. Stanic
> Sent: Wednesday, March 02, 2016 10:31 PM
> To: users@kannel.org
> Subject: Re: Error in kannel-monitor
> 
>> On Wed, 2016-03-02 at 10:49, Беляев Владимир Николаевич wrote:
>> 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)
> 
> Thanks God I didn't touched PHP in last fifteen years but from code snippet 
> above it seems that you are right.
> Variable $url is missing port part.
> I'm not sure how to set port in php but I think it should be $url = 
> "http://localhost:13000/";
> 
> Few years ago I made small Perl monitor for Kannel and defined URL (host and 
> port) in that way in the script.
> 
>> 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