Jump to content

problem with isyProxy.php (?)


grahamk

Recommended Posts

Posted

I installed HAD on an apache2 web server and when I access the page I get errors underneath the header such as:

 

 
In my apache error log I see messages such as this:
 
[Mon Jan 04 17:28:40 2016] [error] [client 90.0.0.201] PHP Notice:  Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI' in /home/graham/had/rest/isyProxy.php on line 34
 
This took me to the rest/isyProxy.php program where i noticed these commented lines:

//echo "<br>" .  time() . "<br>";
//print_r($_SERVER[REQUEST_URI]);exit;
 
I uncommented the print;exit line and this is what i see in the browser if i run the program manually:
 
/rest/isyProxy.php
 
This is then sent to the isy via the next line which is a curl call and the call fails - that is how I interpret it anyway. :wink:
 
It seems to me that "/rest/isyProxy.php" string is my problem, but i am new to php so I have no idea if i am barking up the wrong tree or ?

Any help appreciated!!
 
Thanks,
  Graham
Posted

 

I installed HAD on an apache2 web server and when I access the page I get errors underneath the header such as:

 

 
In my apache error log I see messages such as this:
 
[Mon Jan 04 17:28:40 2016] [error] [client 90.0.0.201] PHP Notice:  Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI' in /home/graham/had/rest/isyProxy.php on line 34
 
This took me to the rest/isyProxy.php program where i noticed these commented lines:

//echo "<br>" .  time() . "<br>";

//print_r($_SERVER[REQUEST_URI]);exit;

 
I uncommented the print;exit line and this is what i see in the browser if i run the program manually:
 
/rest/isyProxy.php

 

This is then sent to the isy via the next line which is a curl call and the call fails - that is how I interpret it anyway. :wink:
 
It seems to me that "/rest/isyProxy.php" string is my problem, but i am new to php so I have no idea if i am barking up the wrong tree or ?

 

Any help appreciated!!

 
Thanks,
  Graham

 

 

Hi Graham

You replaced your info in these statements?

$isyUser = "admin";

$isyPassword = "admin";

$isyIp = "192.168.0.239";

 

The placement of the files, especially htaccess, is important. IIRC,it was relative to the root of the web server's default directory

 

Paul

Posted

Hi Graham

You replaced your info in these statements?

$isyUser = "admin";

$isyPassword = "admin";

$isyIp = "192.168.0.239";

 

The placement of the files, especially htaccess, is important. IIRC,it was relative to the root of the web server's default directory

 

Paul

Yes, I have made the edits and the files are in the right place. They do run as expected, but they are not creating comands that the ISY understands.

 

It appears to me that the unititialized constant REQUEST_URI is my issue, it appears to be filling in the name of the proxy program, not the REST call.  Odd.

 

Graham

 

Sent from my SAMSUNG-SM-G900A using Tapatalk

Posted

it occurs to me that If i run the program standalone, the output it gives is correct - so I'm a bit at square one.  The proxy is being called because i see the uninitialized constant message from the web server error log. So that does seem to be working.

Posted

I found the issue(s). Just in case anyone is curious:

 

Though it seemed htaccess was working, it was not. I had to go into my /etc/apache2/sites-available/default file and change AllowOverride from None to All. Then I had to link in the mod_rewrite module:

 

ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
 
restarted apache and bingo!!! :-)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...