Hello, just loaded openNab 0.07 on my server. Ran through the first couple of tests ok but then have got stuck after typing:
First of all I had some messages moaning they couldn't access something or other, so i changed the rights on the folders and that got rid of them. But this one's still here:
Warning: file_get_contents(..//vl/plugins/saveboot/files/bootcode.bin) [function.file-get-contents]: failed to open stream: No such file or directory in /home/blah/public_html/vl/includes/boot.php on line 49
And that's all. No 'amber' or any crazy text.
What's that all about then?
The bc.jsp call returns the nabaztag bootcode. It is called at each boot of the nabaztag.
In normal mode, the script calls the bc.jsp on Violet server to get the code and send it back to the bunny (this code is starting with 'amber').
In standalone mode (defined by config opennab.ini entry 'ServerMode'), OpenNab does not connect to Violet and use a local bootcode file. This file is referenced in the 'BootCode' config entry. Its default value is "/vl/plugins/saveboot/files/bootcode.bin"
So the "Warning: file_get_contents(..//vl/plugins/saveboot/files/bootcode.bin) [function.file-get-contents]: failed to open stream: No such file or directory" error usually happens in standalone mode when there's no such file.
But it also happens in other modes when OpenNab does not manage to connect to Violet. When Violet's bc.jsp call fails, OpenNab uses the local file as a fallback.
I guess that's what happens here: OpenNab does not manage to connect to Violet.
Activating the maximum level of log (opennab.ini LogLevel=4) might give us some additional info. It will at least logs the curl error (curl is the php module used for http calls in OpenNab). The log file will be in folder /vl/logs/.
Hope this helps.
thanks for your quick reply.
i've changed the value so it reads Loglevel=4 , but no logs have actually appeared.
i guess that's a bit of a problem! is there any other way i can find out which bit is failing?
Ooops, my fault. I forgot that logging was inhibited when performing calls through a standard web browser. Information is only logged when the bunny itself performs the http calls.
I will be looking forward to implement an override for this in next version.
Meanwhile, please edit file /vl/config.php and at row 74 replace :
define('VISUAL_DEBUG', $_SERVER['HTTP_USER_AGENT'] != 'MTL');
Then logs will be present even when bc.jsp and other http calls are made from a standard web browser.
that's no problem, changed it and the logs are working now. this it what i got:
2007-10-02 23:08:57 Curl header : User-Agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199) Gecko/20070914 Firefox/188.8.131.52
2007-10-02 23:08:57 Curl header : Accept = text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
2007-10-02 23:08:57 Curl header : Accept-Language = en-us,en;q=0.5
2007-10-02 23:08:57 Curl header : Accept-Encoding = gzip,deflate
2007-10-02 23:08:57 Curl header : Accept-Charset = ISO-8859-1,utf-8;q=0.7,*;q=0.7
2007-10-02 23:08:57 Curl header : Keep-Alive = 300
2007-10-02 23:08:57 Curl header : Connection = keep-alive
2007-10-02 23:08:57 GET http://r.nabaztag.com/vl/bc.jsp?v=0.0.0.10&m=xx:xx:xx:xx:xx:xx&l=00:00:00:00:00:00&p=00:00:00:00:00:00&h=4
2007-10-02 23:08:59 *** Curl ERROR :
2007-10-02 23:08:59 version number is 0
2007-10-02 23:08:59 Curl status : 0 http://r.nabaztag.com/vl/bc.jsp?v=0.0.0.10&m=xx:xx:xx:xx:xx:xx&l=00:00:00:00:00:00&p=00:00:00:00:00:00&h=4
2007-10-02 23:08:59 Curl time start transfer : 0 / total 0
2007-10-02 23:08:59 Curl bytes upload : 0 / download 0
2007-10-02 23:08:59 Curl speed upload : 0 / download 0
2007-10-02 23:08:59 version number is 0
2007-10-02 23:08:59 Unable to patch quietears, wrong bc version
2007-10-02 23:08:59 /vl/bc.jsp?v=0.0.0.10&m=xx:xx:xx:xx:xx:xx&l=00:00:00:00:00:00&p=00:00:00:00:00:00&h=4
doesn't look good, is curl even enabled?
I think cURL is enabled because calls to multiple cURL functions do not generate any error BUT:
- the curl_errno function returns something different than 0 (because it causes the log of "*** Curl ERROR :") which means an error actually occured in cURL.
- the curl_error function returns and empty string which means the occuring error has no description
So we still have to find what the error is...
In /vl/includes/request.php, line 80, we can replace
addToLog( '*** Curl ERROR : '.curl_error($curlHandle), 1 );
addToLog( '*** Curl ERROR : ['.curl_errno($curlHandle).'] '.curl_error($curlHandle), 1 );
I made this modification for OpenNab next version. I never thought the error number would be useful if we had the error description in the log but it looks like we definitely need it.
We can also have a look at http://server.com/vl/tests/phpinfo.php
It will give us the details for the apache/php install. We will see if cURL is correctly listed as a php module.
After that, I'm afraid of running out of ideas...
ok, the phpinfo came up as follows:
System Linux middns2.co.uk 184.108.40.206a #7 Mon Apr 2 16:38:13 BST 2007 i686
Build Date Jul 2 2007 11:41:21
Configure Command './configure'
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20050606
Debug Build no
Zend Memory Manager enabled
Thread Safety disabled
Registered PHP Streams php, http, ftp, https, ftps, compress.bzip2, compress.zlib
The curl bit said:
CURL support enabled
CURL Information libcurl/7.12.1 OpenSSL/0.9.7a zlib/220.127.116.11 libidn/0.5.6
So at least curl is there. And after I changed the log thing i got exactly the same as before but with
2007-10-03 20:20:28 *** Curl ERROR : 
Anyway, thanks for all your help with this. I'm convinced it must be something my web host has done, they seem to restrict lots of things! Might be time to switch hosts.
OpenNab 0.09 no longer uses curl.
Maybe it will solve those issues.
Log in to post a comment.