OpenSprinkler › Forums › OpenSprinkler Mobile and Web App › Installation issue
- This topic is empty.
-
AuthorPosts
-
February 18, 2014 at 6:26 am #22764
AnonymousInactiveHi,
I have my OpenSprinkler unit up and running on the network and now want to get the mobile app working.
I am attempting to run the initial install of the OpenSprinkler mobile app but am getting the error messages below (apologies for the plain text copy). I have a new WAMP install (Apache 2.4.4, PHP 5.4.12 under Windows 7). I’ve given all folders in the path full privileges and unzipped the git files into the WAMP server’s site directory. I’ve searched for quite a few hours for a possible lead to solve this, but without success. I have got a simple sample php app working on the WAMP server to verify it is basically up and running. Any advice or hints on next steps would be greatly appreciated.
Mark
( ! ) Warning: file_get_contents(http://127.0.0.1:8080/vs): failed to open stream: No connection could be made because the target machine actively refused it. in C:wampwwwsprinklersinstall.php on line 108
Call Stack
# Time Memory Function Location
1 0.0186 307840 {main}( ) ..install.php:0
2 0.0305 437088 isValidUrl( ) ..install.php:19
3 0.0305 437264 file_get_contents ( ) ..install.php:108February 18, 2014 at 1:04 pm #26056
SamerKeymasterThe error message is honestly expected. It should just be a warning echoed in your log file. Where are you seeing the error now?
The installer is checking if the system is a Raspberry Pi running the interval program locally (to autoconfigure). I will try to test on Windows but not sure why it would be different.
Thanks
February 18, 2014 at 9:11 pm #26057
AnonymousInactiveThanks for the further detail. The error message appeared in the browser (Chrome). Hadn’t looked in the log, but the following appears in the log, which seems to indicate actual issue as a call at line 144 of install.php (as you said, the first warning message is to be expected and not fatal).
[Tue Feb 18 22:29:56.397850 2014] [:error] [pid 780:tid 1480] [client 127.0.0.1:55275] PHP Warning: file_get_contents(http://127.0.0.1:8080/vs): failed to open stream: No connection could be made because the target machine actively refused it.rn in C:\wamp\www\sprinklers\install.php on line 108, referer: http://127.0.0.1/
[Tue Feb 18 22:29:56.398850 2014] [:error] [pid 780:tid 1480] [client 127.0.0.1:55275] PHP Stack trace:, referer: http://127.0.0.1/
[Tue Feb 18 22:29:56.398850 2014] [:error] [pid 780:tid 1480] [client 127.0.0.1:55275] PHP 1. {main}() C:\wamp\www\sprinklers\install.php:0, referer: http://127.0.0.1/
[Tue Feb 18 22:29:56.398850 2014] [:error] [pid 780:tid 1480] [client 127.0.0.1:55275] PHP 2. isValidUrl() C:\wamp\www\sprinklers\install.php:19, referer: http://127.0.0.1/
[Tue Feb 18 22:29:56.398850 2014] [:error] [pid 780:tid 1480] [client 127.0.0.1:55275] PHP 3. file_get_contents() C:\wamp\www\sprinklers\install.php:108, referer: http://127.0.0.1/
[Tue Feb 18 22:29:56.398850 2014] [:error] [pid 780:tid 1480] [client 127.0.0.1:55275] PHP Fatal error: Call to undefined function _() in C:\wamp\www\sprinklers\install.php on line 144, referer: http://127.0.0.1/
[Tue Feb 18 22:29:56.398850 2014] [:error] [pid 780:tid 1480] [client 127.0.0.1:55275] PHP Stack trace:, referer: http://127.0.0.1/
[Tue Feb 18 22:29:56.398850 2014] [:error] [pid 780:tid 1480] [client 127.0.0.1:55275] PHP 1. {main}() C:\wamp\www\sprinklers\install.php:0, referer: http://127.0.0.1/February 18, 2014 at 11:17 pm #26058
AnonymousInactiveI’ll also see if I can get Xdebug (part of the WAMP package) to trace what’s occurring.
February 18, 2014 at 11:37 pm #26059
SamerKeymasterAh you’re missing gettext that’s why. I’ll put a fix out for users without gettext.
Update: Also, it seems Windows LAMP setup is defaulted to putting notice and warning message on the page output (which makes no sense since the end-user is typically not the programmer).
Update 2: I pushed an update which should create the _() function which is the shorthand for gettext. This way, the app at least functions and outputs english strings if you are missing gettext. Let me know if this helps.
February 19, 2014 at 12:12 am #26060
AnonymousInactiveThank you for such a quick update. Problem still seems to be present, but line numbers quoted in the error log have shifted slightly so I think I’ve got the update in place (downloaded and unzipped the package and restarted WAMP). I’ll see if I can change the WAMP config to stop displaying the messages in the browser. Here are the log entries:
[Wed Feb 19 11:01:58.869708 2014] [:error] [pid 5688:tid 1476] [client 127.0.0.1:60802] PHP Warning: file_get_contents(http://127.0.0.1:8080/vs): failed to open stream: No connection could be made because the target machine actively refused it.rn in C:\wamp\www\sprinklers\install.php on line 109, referer: http://localhost/
[Wed Feb 19 11:01:58.869708 2014] [:error] [pid 5688:tid 1476] [client 127.0.0.1:60802] PHP Stack trace:, referer: http://localhost/
[Wed Feb 19 11:01:58.869708 2014] [:error] [pid 5688:tid 1476] [client 127.0.0.1:60802] PHP 1. {main}() C:\wamp\www\sprinklers\install.php:0, referer: http://localhost/
[Wed Feb 19 11:01:58.869708 2014] [:error] [pid 5688:tid 1476] [client 127.0.0.1:60802] PHP 2. isValidUrl() C:\wamp\www\sprinklers\install.php:19, referer: http://localhost/
[Wed Feb 19 11:01:58.869708 2014] [:error] [pid 5688:tid 1476] [client 127.0.0.1:60802] PHP 3. file_get_contents() C:\wamp\www\sprinklers\install.php:109, referer: http://localhost/
[Wed Feb 19 11:01:58.869708 2014] [:error] [pid 5688:tid 1476] [client 127.0.0.1:60802] PHP Fatal error: Call to undefined function _() in C:\wamp\www\sprinklers\install.php on line 150, referer: http://localhost/
[Wed Feb 19 11:01:58.869708 2014] [:error] [pid 5688:tid 1476] [client 127.0.0.1:60802] PHP Stack trace:, referer: http://localhost/
[Wed Feb 19 11:01:58.869708 2014] [:error] [pid 5688:tid 1476] [client 127.0.0.1:60802] PHP 1. {main}() C:\wamp\www\sprinklers\install.php:0, referer: http://localhost/February 19, 2014 at 12:34 am #26061
SamerKeymasterSorry about that! I made the mistake of updating the actual code but not the installer. See if this update fixes your issue.
As far as the notices go I suppose it is my duty to suppress/handle them better. I will see what I can do however in the mean time, changing your php.ini or adding “error_reporting(E_ERROR | E_WARNING | E_PARSE);” to the PHP file (not the best fix) should suppress the other notices.
February 19, 2014 at 12:38 am #26062
AnonymousInactiveSince your earlier post I had Success!
Your comment about gettext being missing, led me to start digging – all I needed to do was enable that extension in the php.ini file, and restart. WAMP 2.2 has gettext disabled by default. WAMP also has the php setting ‘display errors’ turned on by default, so turning that off, stopped the warning message display in the browser. Thanks very much for your help.
February 19, 2014 at 12:42 am #26063
SamerKeymasterAwesome! I actually pushed yet another update which suppresses the notices within the installer (since it most likely will fail). Thanks for making this issue known.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Mobile and Web App › Installation issue