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
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.
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
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.
I found nothing in the php info or the php.ini that would allow me to turn those on.. Any other suggestions?