New Server Setup - Ad Network causing error

Discussion in 'Co-op Advertising Network' started by ProductivePC, Jun 16, 2005.

  1. #1
    This is strange... On our current website. www.worldfamousgiftbaskets.net, the ad network works just fine. However, I am in the middle of moving everything over to a dedicated server and have given the ad_network_ads.txt file write persmissions and I am still receiving the following errors:

    Can anyone shed some light as to why I am receiving this error on the new server however the same exact code is on a different server and it gives me this??

    Warning: fopen(../ad_network_ads.txt) [function.fopen]: failed to open stream: Permission denied in \ad_network.php on line 37

    Warning: flock() expects parameter 1 to be resource, boolean given in \ad_network.php on line 38

    Notice: Undefined variable: ad_network in \ad_network.php on line 61

    Notice: Undefined index: SERVER_ADDR in \ad_network.php on line 65

    Notice: Undefined index: SERVER_ADDR in \ad_network.php on line 65

    Notice: Undefined index: SERVER_ADDR in \ad_network.php on line 65

    Notice: Undefined index: SERVER_ADDR in \ad_network.php on line 65

    Notice: Undefined index: SERVER_ADDR in \ad_network.php on line 65
     
    ProductivePC, Jun 16, 2005 IP
  2. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try turning on all error reporting error_reporting (E_ALL); Also... what permissions exactly are you giving ad_network.txt? it would need read/write permissions, not just write permission.
     
    exam, Jun 17, 2005 IP
  3. ProductivePC

    ProductivePC Peon

    Messages:
    362
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Okay, I wil turn on E_ALL and see what that says..... I am giving ad_network.txt read and write.... I just looked at the permissions for that folder in IIS and there was not write permissions set to that folder. To be more secure should I not set the individual files to be write instead of the whole folder?

    Anyway, just for testing I set the whole directory to write persmission for all users and now I only get the following error:

    Any Suggestions or ideas what that means?

    Notice: Undefined index: SERVER_ADDR in [pathway]\ad_network.php on line 65

    Notice: Undefined index: SERVER_ADDR in [pathway]\ad_network.php on line 65

    Notice: Undefined index: SERVER_ADDR in [pathway]\ad_network.php on line 65

    Notice: Undefined index: SERVER_ADDR in [pathway]\ad_network.php on line 65

    Notice: Undefined index: SERVER_ADDR in [pathway]\ad_network.php on line 65
     
    ProductivePC, Jun 17, 2005 IP
  4. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #4
    That makes it sound like the php variable $_SERVER['SERVER_ADDR'] is not set... and looking at the coop code, that would mean that neither $_SERVER['SERVER_ADDR'] nor $_SERVER['REMOTE_ADDR'] is set. (I think) you can test this by calling phpinfo() and seeing if these vars are set.
     
    exam, Jun 17, 2005 IP
  5. ProductivePC

    ProductivePC Peon

    Messages:
    362
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I found nothing in the php info or the php.ini that would allow me to turn those on.. Any other suggestions?
     
    ProductivePC, Jun 17, 2005 IP
  6. ProductivePC

    ProductivePC Peon

    Messages:
    362
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I reinstalled PHP with the ISAPI Filter and the error is now gone.
     
    ProductivePC, Jun 18, 2005 IP
  7. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Glad to hear all is well!
     
    exam, Jun 19, 2005 IP