Eve For Enterprise    Eve Support Community    Forums  Hop To Forum Categories  Eve Community  Hop To Forums  Customization Ideas    OK, my API problems....
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Groupee Member
Picture of Mr.Design
Posted
OK, here we go, grab a drink and some snacks, I have a feeling this could get long Wink Big Grin

So I downloaded the widget that Michael has post up top. I unzipped it and it came with 2 files. One is test.php and the other is SimpleAuthentication.php

I opened them both in Notepad and made the following changes to test.php: In the top (the very top) I changed it to this:

 <?php 
           include_once('SimpleAuthentication.inc.php');
           setEveURL('http://hometalk.infopop.cc/eve');
           setSiteURL('http://hometalkxpress.com.com/test.php');
           login();
         
?> 


I DID NOT make any changed to SimpleAuthentication.php. I then uploaded them both to my domain hometalkxpress.com

I also DID NOT upload them to my Infopop webhosting account.

After I uploaded them I went to my eve CP and went under master settings, and then advanced. I check the box to allow certain requests from the following domains. I typed in: hometalkxpress.com and saved it.

I then went to http://hometalkxpress.com/test.php to see if it worked. It did not. I got this message: "Invalid Remote IP"

So then I went back to my eve CP and entered in our sites (hometalkxpress.com) IP which Jonmark told me was 64.202.163.190
(I checked the box and did it under the "allowed IPs" not domain name)

and clicked save.

I then went back to http://hometalkxpress.com/test.php and got the same error "Invalid Remote IP"

Frown So now I'm stumped, I know I must have done something wrong, but I don't know what.

Help!

Michael, you also have admin. powers on our forums in case I did something wrong with the IP or domain info.

Thanks in advance for the help Smile



 
Posts: 314 | Registered: September 08, 2004Reply With QuoteEdit or Delete MessageReport This Post

Posted Hide Post
Probably a very simple fix.

Here's the issue.

hometalkxpress.com is a virtual domain but requests that a script makes *from* it go out from *another* domain. This is very common.

I've attached a PHP script that will contact anoterh script on evedev.com.

Upload it to the same directory as your simpleAuth PHP scripts.

call it from a browser

http://hometalkxpress.com/whoisasking.php

It will tell you the IP or domain from which YOUR server is making its requests to eve.

Use this data to update your eve "permitted" domain/IP list.

Let us know how it goes.

This message has been edited. Last edited by: MichaelF,


Michael Farris<br/>
Groupee


Zip/GZ archivewhoisasking.zip (350 Bytes, 22 downloads) whoisasking zip
 
Posts: 185 | Registered: September 08, 2004Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Picture of Mr.Design
Posted Hide Post
Michael, its not letting me download it, it just brings up a page that says,

Remote Host: admin.infopop.com
Remote IP: 63.251.8.1



 
Posts: 314 | Registered: September 08, 2004Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Picture of Mr.Design
Posted Hide Post
Maybe you could try it again, or just send me the stuff needed via PT and I can paste it and save it from Notepad as a PHP page. Maybe that will work. Smile



 
Posts: 314 | Registered: September 08, 2004Reply With QuoteEdit or Delete MessageReport This Post

Posted Hide Post
OK -- I dropped the file into a zip for download. Unzip it an upload to your directory.


Michael Farris<br/>
Groupee
 
Posts: 185 | Registered: September 08, 2004Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Picture of Mr.Design
Posted Hide Post
OK we have a little bit of success here... I don't get the invalid IP any more... if I am logged out it brings me to the Groupee login page for my forums, however, then when I login it says

"Login Required, please try again later."



 
Posts: 314 | Registered: September 08, 2004Reply With QuoteEdit or Delete MessageReport This Post

Posted Hide Post
Odds are very good you have set

setEveURL('http://yourevename.infopop.cc/eve');

wrongly

this is your ***EVE*** site URL, not your remote site

Try http://hometalk.infopop.cc/eve

If not paste in that top few lines of code block from test.php here


Michael Farris<br/>
Groupee
 
Posts: 185 | Registered: September 08, 2004Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Picture of Mr.Design
Posted Hide Post
Nope, I have it set to my eve... here are the first lines on test.php:

 <?php 
           include_once('SimpleAuthentication.inc.php');
           setEveURL('http://hometalk.infopop.cc/eve');
           setSiteURL('http://hometalkxpress.com.com/test.php');
           login();
         
?> 



 
Posts: 314 | Registered: September 08, 2004Reply With QuoteEdit or Delete MessageReport This Post

Posted Hide Post
quote:
hometalkxpress.com.com
???


Michael Farris<br/>
Groupee
 
Posts: 185 | Registered: September 08, 2004Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Picture of Mr.Design
Posted Hide Post
Of course, a .com.com is all the rage these days Wink Big Grin

Hahaha, thanks for pointing that out, I fixed it, uploaded it, and POOF! It works now! YAY! So now the only other question I have it for any page I want to protect that way I just add this PHP script:
<?php
include_once('SimpleAuthentication.inc.php');
setEveURL('http://hometalk.infopop.cc/eve');
setSiteURL('http://hometalkxpress.com/test.php');
login();

?>

Then follow with my coding like a regular HTML page, but save it as a PHP document, correct?



 
Posts: 314 | Registered: September 08, 2004Reply With QuoteEdit or Delete MessageReport This Post

Posted Hide Post
Glad it works.

If you are including this bit of code on lots of pages you might streamline things by making one variable dynamic

setSiteURL('http://' .$_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']);

For example:



<?php
include_once('SimpleAuthentication.inc.php');
setEveURL('http://michael.infopop.cc/eve');
//setSiteURL('http://yousite.com/path/test.php');
setSiteURL('http://' .$_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']);
login();

?>

Otherwise your need to edit

setSiteURL('http://yousite.com/path/test.php');

to match each file name you protect. Just test.php won't work.

Remember this line

include_once('SimpleAuthentication.inc.php');

assumes that SimpleAuthentication.inc.php is in the same directory as the files.


Michael Farris<br/>
Groupee
 
Posts: 185 | Registered: September 08, 2004Reply With QuoteEdit or Delete MessageReport This Post
Groupee Member
Picture of Mr.Design
Posted Hide Post
Alrighty, thanks Smile



 
Posts: 314 | Registered: September 08, 2004Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

Eve For Enterprise    Eve Support Community    Forums  Hop To Forum Categories  Eve Community  Hop To Forums  Customization Ideas    OK, my API problems....