SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2005
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    fwrite - Linux and ISP - Very Strange!

    Hello all,

    I run a web site via a hosting provider on Linux. The web site runs php scripts and one of the scripts writes information to a log file running on the same server as the php scripts. The directory where the log file is has a chmod of 777.

    Now as of about 48hrs ago everytime I attempt to execute the php script (via a url call) that writes to a log file it reaches the following line of code and the code seems to terminate with no warning or error code passed:

    fputs($fp, $line, strlen($line));

    Now here is the strange bit - if anyone else not using Paradise as their ISP attempts to execute the same script it works!!

    What I did next was execute the same script using the http://anon.free.anonymizer.com service which replaces your real IP with a bogus one... the script executed! So same machine - same ISP (Paradise) but through http://anon.free.anonymizer.com it works.

    I am at a lost to understand what is going on - before the offending line of code I added code to check write permissions on the log directory and the log file that was created - all reported back as okay - however as soon as the script attempts to put anything in the file and I have executed it through my ISP it fails with no error - the script just terminates!

    Oh - I also chmod the file to 777 before I attempted to write to it as well - still failed if I executed it.

    Has anyone heard of this? The fputs somehow is affected by the ISP I am using..

    Best Regards

    Zanis

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2005
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi all,

    Okay here is an update - the log directory and any files created within were chmod 664 - I proceeded to ask the hosting provider to chmod to 666 - now it all works fine again!!

    I was also told today that Paradise has released (if that is the correct word) some new IP ranges which seems to have been the same time this issue came up.

    Does Linux or PHP engine somehow attempt to validate an IP address?

    Cheers

    Zanis


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •