The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

fopen()

Discussion in 'General Discussion' started by Mark36ph, Mar 2, 2007.

  1. Mark36ph

    Mark36ph Active Member

    Joined:
    Jun 18, 2005
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    just a quick question, does fopen() need any php stuff installed onto it so that it can work?
    because im trying to use a script that requires fopen and im getting an error message.
    This message has only started comming up since i moved server. On the other server i was on it worked fine, so i know its not the script.
     
  2. biggdogg285

    biggdogg285 Well-Known Member

    Joined:
    May 14, 2004
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I think fopen is a permissions problem. For instance if a PHP script can't open a open a TXT file and write to it. This error will appear.

    I always fix the problem by CHMOD'ing the file to 777.

    Hope this information helps!
     
  3. gorilla

    gorilla Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    699
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney / Australia
    the new server seems to have fopen disabled in php.ini
    you need to contact your sysadmin regarding this security setting in php
     
  4. Mark36ph

    Mark36ph Active Member

    Joined:
    Jun 18, 2005
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    ok ill have a look at the chmod and the php.ini file
     
  5. Mark36ph

    Mark36ph Active Member

    Joined:
    Jun 18, 2005
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Hello, i have checked the php.ini and fopen seems to be aloud, and changed the chmod and it still doesnt seem to work :confused:
    any other ideas?

    is it anyhting to do with zend optimizer?
    the server i was on had that on it
     
    #5 Mark36ph, Mar 3, 2007
    Last edited: Mar 3, 2007
  6. gorilla

    gorilla Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    699
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney / Australia
    Check if allow_url_fopen = On and check if fopen is included in 'disable_functions ='

    Personally I would disable especially allow_url_fopen , but each to there own i guess ;)
     
  7. Mark36ph

    Mark36ph Active Member

    Joined:
    Jun 18, 2005
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    disable_functions no value no value
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,471
    Likes Received:
    199
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    What is the path to your php.ini? I'm asking to see if you're looking at the right one.
     
  9. Mark36ph

    Mark36ph Active Member

    Joined:
    Jun 18, 2005
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    its ok, seems to be working now, i recompiled php with apache and it works :confused:

    ahwell!
    thanks :)
     

Share This Page