Find the answer to your Linux question:
Results 1 to 3 of 3
I ran apt-get to install php5, then i did php5-cli, php5-gd....then i restarted the apache server. The resultant phpinfo is at the bottom of the post. My problem is that ...
  1. #1
    Just Joined!
    Join Date
    Feb 2006
    Posts
    6

    enabling php5-cli



    I ran apt-get to install php5, then i did php5-cli, php5-gd....then i restarted the apache server. The resultant phpinfo is at the bottom of the post. My problem is that cli is disabled and I thought php4.3.0+ had CLI enabled by default. How do I enable? (I'm using dotdeb oldstable btw)

    thanks..

    '../configure' '--disable-cli' '--disable-cgi' '--with-apxs=/usr/bin/apxs' '--prefix=/usr' '--disable-debug' '--with-config-file-path=/etc/php5/apache' '--disable-rpath' '--with-regex=php' '--enable-memory-limit' '--disable-debug' '--with-layout=GNU' '--disable-pear' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-bcmath' '--with-bz2' '--enable-ctype' '--with-db2' '--enable-dbx' '--with-iconv' '--enable-exif' '--enable-filepro' '--enable-ftp' '--enable-dbase' '--with-gettext' '--with-mime-magic' '--enable-mbstring' '--with-pcre-regex' '--enable-shmop' '--enable-soap' '--enable-sockets' '--enable-simplexml' '--with-libxml-dir=/usr' '--with-dom=/usr' '--with-xsl=/usr' '--with-sqlite' '--enable-sqlite-utf8' '--enable-tokenizer' '--enable-yp' '--with-zlib' '--with-zlib-dir=/usr' '--with-kerberos=/usr' '--with-openssl=/usr' '--with-exec-dir=/usr/lib/php5/libexec' '--disable-static' '--without-pear' '--with-curl=shared,/usr' '--with-gd=shared' '--with-jpeg-dir=shared,/usr' '--with-xpm-dir=shared,/usr/X11R6' '--with-png-dir=shared,/usr' '--with-freetype-dir=shared,/usr' '--enable-gd-native-ttf' '--enable-gd-jis-conv' '--with-mcrypt=shared,/usr' '--with-ming=shared,/usr' '--with-imap=shared,/usr' '--with-imap-ssl' '--with-ldap=shared,/usr' '--with-mhash=shared,/usr' '--with-mm' '--with-mysql=shared,/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=shared,/usr/bin/mysql_config' '--with-pgsql=shared,/usr' '--with-unixODBC=shared,/usr' '--with-tidy=shared' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-sybase-ct=shared,/usr' '--with-ttf=shared,/usr' '--with-xmlrpc=shared'

  2. #2
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Ft. Polk, LA
    Posts
    796
    IIRC the cli version is just a binary that doesn't send HTTP headers and doesn't print html errors. The HTTP headers is simple to bypass with the -q option. If you don't mind seing html errors in the console, then use the -q option to php in your cli scripts like so:
    Code:
    #!/usr/bin/php -q
    <?php
    echo "How are you today? ";
    $line = rtrim(fgets($STDIN, 1024));
    if ($line == "good")
        echo "Glad to hear that.\n";
    elseif ($line == "bad")
        echo "I'm sorry to hear that.\n";
    ?>

  3. #3
    Just Joined!
    Join Date
    Feb 2006
    Posts
    6
    i added that to the script. but i don't think it's working still. i run the script by typing the filename, and it doesn't work, nor does pre-ceeding it with 'php <filename>' work.. any ideas?

Posting Permissions

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