Jump to content

$_SERVER['REMOTE_ADDR'] problem on windows


stormen81

Recommended Posts

I am building a CMS on my Windows system.  I am trying to log the IP address in to a MYSQL Database.  I have no issues getting the IP address or MYSQL but here is the problem.

 

When I take the $_SERVER['REMOTE_ADDR'] and try to do something like this:

$ip = "update " . $_SERVER['REMOTE_ADDR'] . " to db";

 

I get an error say the unable to do this line "x".  I check it and it is the line with the $_SERVER['REMOTE']. 

Is there a way to parse the $_SERVER['REMOTE_ADDR']?  I have notice that SMF does parsing of the $_SERVER['REMOTE_ADDR'] and logs in the MYSQL db without an issue.

 

I am using a XAMPP server on my windows XP...  I am not sure if this a windows only issue yet... I need to try this on my MacBook with the OSX version of XAMPP.

 

Thanks for any help.

Stormen

Link to comment
Share on other sites

Found my error before posting this.  It was not the ";".

I had a $this-pre when it should have been a $this->pre... :facewall: ...which made the Fatal Catch error that was bugging me.  I was kinda thinking it was something else.

 

Thanks for the help.

Stormen

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.