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.

PHP problems

Discussion in 'General Discussion' started by hodfords, Feb 22, 2002.

  1. hodfords

    hodfords Active Member

    Joined:
    Feb 22, 2002
    Messages:
    43
    Likes Received:
    1
    Trophy Points:
    6
    We have a dedicated server and only I have full control to the configuration to the server.

    We run complicated PHP scripts on the server and suddenly one day this week, thie scripts were giving error messages. Suddenly PHP is not able to understand the following command.

    We are calling CGI PHP from within a php script using the following line:-

    exec(&php -q input.php & output.html&, $result_array);

    And now the output.html contains the error message:-

    X-Powered-By: PHP/4.0.6 Content-type: text/html No input file specified.

    As opposed to the parsed output of input.php. This problem never existed last week.

    Please advise what might be the problem.


    Jason.
     
  2. bens

    bens Member

    Joined:
    Aug 15, 2001
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    I too have noticed PHP problems recently.
    Is this related to cPanel?
     
  3. feanor

    feanor Well-Known Member

    Joined:
    Aug 13, 2001
    Messages:
    836
    Likes Received:
    0
    Trophy Points:
    16
    OK.... some more details will have to be produced for anyone here to be able to help out.

    CPanel runs with its own particular php binary, it doesn't even use or directly hook into the php installation that works with Apache, as far as I know. And, the latest version that CPanel supports is 4.1.1 (and all previous)...... you guys are using 4.0.6 so I don't see how this could be a connected if it was related to a recent update.

    More details will help immensely.
     
  4. hodfords

    hodfords Active Member

    Joined:
    Feb 22, 2002
    Messages:
    43
    Likes Received:
    1
    Trophy Points:
    6
    Exact Errors

    We have a content management system on our server that generates all html files on the whole website, which gives the website much greater performance than dynamically generating all the pages.

    We generate the html files using php files as templates. Hence we use the command:-

    exec(&php -q templatefile.php & ouputfile.html&,$result_array);

    I have checked the logs and on the 19 Feb, 2002- the system was still functioning fine, that was the last record of it working.

    But when we ran the system again in the last couple days, all the files generated just contained the error message:-

    &X-Powered-By: PHP/4.0.6 Content-type: text/html No input file specified.&

    secondly, we were able to pass variables into the &templatefile.php& like thus:-

    exec(&php -q templatefile.php param1 param2 & ouputfile.html&,$result_array);

    and the templatefile.php would be able to get param1 param2 through the argv array which now does not function either.

    Now, I am the only person with root access and I have not made any configurational changes to the server and one day the php is not working the same way as before, hence it must be due to something that is constantly updating. viz. Cpanel. There is no other process on our server that can change the configuration.

    Secondly, can the two versions of php on the server run completely independently.

    Please advise what could be happening here, as I would really appreciate if this would never happen again.

    Thanks,
    Jason.
     
  5. patchwork

    patchwork Well-Known Member

    Joined:
    Nov 2, 2001
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    16
    running php through the exec command or as a cron job or telnet will use /usr/bin/php

    If you need a specific version of php, upload a different copy of the php executable and a copy of php.ini to a different directory and change your commands to suit.

    [quote:6bdefc75d7]
    secondly, we were able to pass variables into the &templatefile.php& like thus:-

    exec(&php -q templatefile.php param1 param2 & ouputfile.html&,$result_array);

    and the templatefile.php would be able to get param1 param2 through the argv array which now does not function either.
    [/quote:6bdefc75d7]

    Just enable the argv/argc option in your new php.ini file. I think its automatically disabled in new php.ini files.

    Pete
     
  6. hodfords

    hodfords Active Member

    Joined:
    Feb 22, 2002
    Messages:
    43
    Likes Received:
    1
    Trophy Points:
    6
    Tried using exactly the same commands that didn't work a few days ago, worked again, so thanks for sorting the problem out.

    Jason.
     
  7. hodfords

    hodfords Active Member

    Joined:
    Feb 22, 2002
    Messages:
    43
    Likes Received:
    1
    Trophy Points:
    6
    Come back

    Dear sirs,

    The problems have come back again, after 3 months of everything running fine- please advise what you did last time to resolve the problem.

    We have an entire content management system running on this one command powering over 20 sites, so this is urgent.

    Please get back ASAP.

    Jason.
     
Loading...

Share This Page