Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    2

    Default PHP cli not working for 5.3.3

    We have PHP 5.3.3 installed using cPanel WHM on our hosting, but the cli is not working properly.

    When executing the command: "php -a", all output I get is "Interactive mode enabled", but no prompt appears.

    I solved this issue in the past in a RedHat machine (this server is running under CentOS) by compiling PHP but adding the option "--with-readline".

    The phpinfo generated with the compiled PHP doesn't show such option and I couldn't find it in the wizard for recompiling PHP.

    Any ideas? Thanks in advance for the help and for taking your time =)

  2. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    In the following folder:

    Code:
    /var/cpanel/easy/apache/rawopts
    Create a file called all_php5 there and put this into that file:

    Code:
    --with-readline
    Then run /scripts/easyapache --force to recompile Apache. I tested this on my machine and I get the following when entering php -a in root SSH now:

    Code:
    # php -a
    Interactive shell
    
    php >
    Prior to adding that line and recompiling Apache, php -a was not returning a prompt for php >
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    2

    Default

    Thanks a bunch =) Haven't tried it, but this should be really useful.

    I do think this should be the default on the PHP configuration... after all, who wants the cli if there's no interpreter working?

    Again, thanks.

Similar Threads & Tags
Similar threads

  1. PHP option only for CLI
    By Esky in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-18-2011, 10:52 AM
  2. Php Cli & Cpanel
    By metroservers in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-21-2008, 05:34 PM
  3. Problems with php cli :(
    By maxymas in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-20-2007, 05:44 AM
  4. Need php-cli, not in ports
    By hariskhan in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 01-26-2007, 07:59 AM
  5. PHP cli upgrade
    By ethank in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-23-2005, 10:57 AM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube