Results 1 to 7 of 7
  1. #1

    cPanel copy php errors help

    i have a site at http://cometorate.com/

    i tried todo a cPanel move to my server here.
    http://66.196.43.131/~cometora/

    on the new server above i keep getting the errors below. i just dont know what any of this means. can anyone help?

    Warning: fopen(/usr/local/apache/htdocs/online.txt) [function.fopen]: failed to open stream: Permission denied in /home/cometora/public_html/onlineold.php on line 14

    Warning: fclose(): supplied argument is not a valid stream resource in /home/cometora/public_html/onlineold.php on line 15

    Warning: chmod() [function.chmod]: No such file or directory in /home/cometora/public_html/onlineold.php on line 16

    Warning: fopen(/usr/local/apache/htdocs/online.txt) [function.fopen]: failed to open stream: No such file or directory in /home/cometora/public_html/onlineold.php on line 19

    Warning: flock(): supplied argument is not a valid stream resource in /home/cometora/public_html/onlineold.php on line 20

    Warning: feof(): supplied argument is not a valid stream resource in /home/cometora/public_html/onlineold.php on line 22

    Warning: fgets(): supplied argument is not a valid stream resource in /home/cometora/public_html/onlineold.php on line 24

  2. #2
    Join Date
    Jul 2007
    Location
    Los Angeles, CA, USA
    Posts
    36
    Hey,

    It looks like you are having problems with CHMOD. You will need to make sure that you are using the same setup on both servers.

    IE, if you are running suPHP or PHPsuExec on one server, you need to run it on the other. Or if you are running a different version of PHP on one, make sure its the same on the other server.


    It could also be the fact that the URL you have given does not work with your script, as your script might need http://cometorate.com/ to fully work.


    From,
    Adam
    About 99% of everything done in the world, good, or bad, is used to pay a mortgage, maybe the world will be a better place if we all rented!

  3. #3
    Join Date
    Jan 2006
    Location
    Athens, Greece
    Posts
    1,481
    The problem starts here:
    Warning: fopen(/usr/local/apache/htdocs/online.txt) [function.fopen]: failed to open stream: Permission denied in /home/cometora/public_html/onlineold.php on line 14

    In your new setup PHP doesn't have permission to access file online.txt
    Change the permissions and everything will work. Unless it is something phpsuexec related.

  4. #4
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    565
    Quote Originally Posted by Steve_Arm View Post
    The problem starts here:
    Warning: fopen(/usr/local/apache/htdocs/online.txt) [function.fopen]: failed to open stream: Permission denied in /home/cometora/public_html/onlineold.php on line 14

    In your new setup PHP doesn't have permission to access file online.txt
    Change the permissions and everything will work. Unless it is something phpsuexec related.
    Ensure that user cometora has accesss to online.txt if you are using phpSuExec or SuExec. Otherwise, you will get a permission denied error such as this one.
    David Grega
    cPanel Technical Product Specialist

  5. #5
    Join Date
    May 2003
    Location
    California, USA, Earth
    Posts
    1,098
    You should also check if you have SELinux enabled.
    Blesta - The Billing Platform for Hosting Providers
    Client Management, Billing, & Support Software
    Trial - Demo | 714-923-7325 | Twitter @blesta

  6. #6
    Join Date
    Aug 2007
    Posts
    57
    There's a few possibilities.

    1) Make sure the file exists at the specified path.
    2) Check for 'open_basedir' restrictions.
    3) Check permissions.

    SELinux is probably not the issue here; it could be, but I'd doubt it. If suexec was previously on/off, it should be the same on the new server.

    Note, though, the file you're concerned about is /usr/local/apache/htdocs/online.txt, not onlineold.php.


    open_basedir would be my top pick, behind the file not existing.

  7. #7
    Quote Originally Posted by Gesundheit View Post
    Hey,

    It looks like you are having problems with CHMOD. You will need to make sure that you are using the same setup on both servers.

    IE, if you are running suPHP or PHPsuExec on one server, you need to run it on the other. Or if you are running a different version of PHP on one, make sure its the same on the other server.


    It could also be the fact that the URL you have given does not work with your script, as your script might need http://cometorate.com/ to fully work.


    From,
    Adam
    thanks man your were right. the script need the full url to work.

Posting Permissions

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