Results 1 to 5 of 5

Thread: RHEL/CentOS: How to enable php openssl extension

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default RHEL/CentOS: How to enable php openssl extension

    Hi all... I need some help to get php openssl extension to work. Don't know if I have to recompile php??... My system: centOS 6.3, php 5.3.6, nginx web server

    I believe openSSL is already installed but it's currently disabled. phpinfo page shows the following:

    Configure Command './configure' '--prefix=/usr/local/php-fcgi' '--with-mcrypt=/usr' '--enable-fastcgi' '--enable-force-cgi-redirect' '--disable-ipv6' '--with-zlib' '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-iconv' '--enable-mbstring=cn' '--with-mysql=/usr' '--enable-sockets' '--without-pear' '--enable-pcntl' '--enable-sysvshm' '--enable-sysvmsg' '--enable-shmop' '--enable-shared' '--enable-exif' '--with-freetype-dir=/usr/local' '--with-ttf=/usr/local' '--enable-fpm'
    Server API FPM/FastCGI
    Virtual Directory Support disabled
    Configuration File (php.ini) Path /usr/local/php-fcgi/lib
    Loaded Configuration File /usr/local/php-fcgi/lib/php.ini
    Scan this dir for additional .ini files (none)
    Additional .ini files parsed (none)
    PHP API 20090626
    PHP Extension 20090626
    Zend Extension 220090626
    Zend Extension Build API220090626,NTS
    PHP Extension Build API20090626,NTS
    Debug Build no
    Thread Safety disabled
    Zend Memory Manager enabled
    Zend Multibyte Support disabled
    IPv6 Support disabled
    Registered PHP Streams compress.zlib, php, file, glob, data, http, ftp, phar
    Registered Stream Socket Transports tcp, udp, unix, udg
    Registered Stream Filters zlib.*, convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk

    Phar

    Phar: PHP Archive support enabled
    Phar EXT version 2.0.1
    Phar API version 1.1.1
    SVN revision $Revision: 307915 $
    Phar-based phar archives enabled
    Tar-based phar archives enabled
    ZIP-based phar archives enabled
    gzip compression enabled
    bzip2 compression disabled (install pecl/bz2)
    OpenSSL support disabled (install ext/openssl)

    Notice how "OpenSSL support" is shown as "disabled".

    Running php -m gives the following:

    # php -m
    PHP Warning: Module 'mysqli' already loaded in Unknown on line 0
    [PHP Modules]
    bz2
    calendar
    Core
    ctype
    curl
    date
    ereg
    exif
    fileinfo
    filter
    ftp
    gd
    gettext
    gmp
    hash
    iconv
    json
    libxml
    mbstring
    mcrypt
    mysql
    mysqli
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    readline
    Reflection
    session
    shmop
    SimpleXML
    sockets
    SPL
    sqlite3
    standard
    tokenizer
    xml
    zip
    zlib


    [Zend Modules]


    SO I know openSSL is there but how do I enable it in php? If I have to recompile php, what steps do I need to do? I don't want to risk breaking anything that's currently functioning. I do have the php-5.3.6 src folders already in the system (I believe the previous build was done with compilation from that folder... by someone else). I want to keep all the original configurations, except that I only need to add openSSL support.

    Please help? Thank you very much!

  2. #2
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,500
    Thanks
    17
    Thanked 790 Times in 507 Posts
    Rep Power
    10

    Default

    Did you installed php using package manager or compiled using command line options? Are you using some sort of control panel? Also state your Linux / Unix distro and version name.
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  3. #3
    Junior Member
    Join Date
    Aug 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    centOS 6.3 (Final)

    kernel 3.9.3-x86-linode52 i686 i686 i386 GNU/Linux

    I don't know how it was done before, but I suspect he did it with package manager. I think there's no control panel. Or can I tell from the system how this was done? Any folder/file that I can look for the trace?

    Thank you very much for the response!

  4. #4
    Junior Member
    Join Date
    Aug 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Ok I confirmed with the person who installed php, he did it with compilation on command line. do I need to do ./configure --with-openssl only? Or do I need to do ./configure with the whole original optons and plus --openssl option? Also, is the entry shown in "configure"the original options (the ones listed in phpinfo page)?

    Thanks

  5. #5
    Junior Member
    Join Date
    Aug 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Ok I've figured it out. I recompiled php with "--with-openssl" option added (among all the original options). Restarted php and it worked. Thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Loading Expect On CentOS / RHEL / Red Hat 6.x Server
    By sumnguy in forum CentOS / RHEL / Fedora
    Replies: 2
    Last Post: 14th May 2013, 10:24 PM
  2. RHEL / CentOS Linux Mounting Debugfs
    By vzxen in forum CentOS / RHEL / Fedora
    Replies: 5
    Last Post: 1st May 2012, 11:52 PM
  3. [Solved] Best CentOS / RHEL Reposoitory For Updating php to 5.3.x ?
    By vamsi in forum CentOS / RHEL / Fedora
    Replies: 6
    Last Post: 25th May 2010, 05:29 PM
  4. [Solved] CentOS / RHEL Add Custom Modules To Anaconda
    By katsushiro in forum CentOS / RHEL / Fedora
    Replies: 8
    Last Post: 15th July 2009, 11:20 PM
  5. Chat Server for RHEL/CentOS/Fedora
    By bappa_tapas in forum Linux software
    Replies: 0
    Last Post: 29th September 2008, 02:16 PM

Tags for this Thread

Posting Permissions

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