1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php-cli extension - How to ?

Discussion in 'Installation and Maintenance of Ports or Packages' started by Ronaldr, Jul 23, 2009.

  1. Ronaldr

    Ronaldr New Member

    Messages:
    37
    Likes Received:
    0
    Hello All,

    Im trying to install the php5-cli extension, when I installed my other php5 extensions initially I went to /usr/ports/lang/php5-extensions and did a make install clean. It prompted me for which extensions that I wanted.

    However now running the command simply reinstalls the extensions that I've already added.

    What do you think I should do ?

    -Thanks
     
  2. ale

    ale New Member

    Messages:
    1,059
    Likes Received:
    0
    Run make config in the port directory
     
  3. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Messages:
    10,610
    Likes Received:
    13
    Code:
    cd /usr/ports/lang/php5-extensions
    make config
    make install clean
    If the last command causes trouble (because extensions are already installed), replace with
    Code:
    make deinstall clean && make reinstall clean
     
  4. Ronaldr

    Ronaldr New Member

    Messages:
    37
    Likes Received:
    0
    Thanks alot now Im on the right track,

    That brought up the php extentions list however, I do not see the module CLI ?

    I see other modules that say they require cli ?

    Im confused
     
  5. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Messages:
    10,610
    Likes Received:
    13
    I'm guessing (not a PHP expert) that modules that require 'CLI only' can only be run from the command line, not through a webserver. Just type 'man php' on the command line, and see what gets printed:

    Code:
    NAME
           php - PHP Command Line Interface 'CLI'
    
    [...]
    
    FILES
           php-cli.ini    The configuration file for the CLI version of PHP.
     
  6. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,365
    Likes Received:
    0
    IIRC PHP installs the cli by default with the 'normal' PHP port.

    lang/php5

    Code:
    ===> The following configuration options are available for php5-5.2.10:
         CLI=on (default) "Build CLI version"
         CGI=on (default) "Build CGI version"
         APACHE=off (default) "Build Apache module"
         DEBUG=off (default) "Enable debug"
         SUHOSIN=on (default) "Enable Suhosin protection system (not for jails)"
         MULTIBYTE=off (default) "Enable zend multibyte support"
         IPV6=on (default) "Enable ipv6 support"
         MAILHEAD=off (default) "Enable mail header patch"
         REDIRECT=off (default) "Enable force-cgi-redirect support (CGI only)"
         DISCARD=off (default) "Enable discard-path support (CGI only)"
         FASTCGI=on (default) "Enable fastcgi support (CGI only)"
         PATHINFO=on (default) "Enable path-info-check support (CGI only)"
    ===> Use 'make config' to modify these settings