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.

Developing ON cPanel server with Zend Framework

Discussion in 'cPanel Developers' started by jap, Apr 13, 2007.

  1. jap

    jap Registered

    Joined:
    Apr 8, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I've just started using Zend Framework but it seems that cPanel isn't really "ready" for that, there were some things I would like to compile extra in my PHP version.

    - PDO Mysql support
    - Mod rewrite

    I also can't install them using the software management system in WHM.
    Would it be possible to compile the PHP again using shell and maybe using some plugins by cPanel if those exist?

    Thanks
    Jasper
     
  2. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    You can build them with easyapache.
     
  3. empiror

    empiror Registered

    Joined:
    May 17, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    PDO MySQL

    This stumped me for a while as I needed PDO MYSQL for the excellent Zend Framework. You won't find PDO MySQL in easyapache as CPanel don't officially support it yet. I was, however, able to install it by compiling PHP manually. To do this you'll need to first install the latest PDO and PDO_MYSQL drivers which you can do with the following commands:

    Code:
    pecl install pdo
    
    pecl install pdo_mysql
    You then need to compile PHP manually with something similar to the following command lines:

    Code:
    service httpd stop
    
    cd /home/cpapachebuild/buildapache
    
    cd php-5.2.1 (or whatever is your latest install)
    
    make clean
    
    ./configure --with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local --with-xml --enable-bcmath --enable-calendar --with-curl --enable-exif --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --enable-magic-quotes --with-mysqli --with-mysql=/usr --with-openssl --enable-discard-path --with-pspell --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --enable-soap --with-zlib --enable-pdo=shared --with-pdo-mysql=shared --with-pdo-sqlite=shared --with-sqlite=shared
    
    make
    
    make install
    
    service httpd restart
    Make sure you get a copy of your existing configure line before issuing these commands and then add "--with-zlib --enable-pdo=shared --with-pdo-mysql=shared --with-pdo-sqlite=shared --with-sqlite=shared" to the end of it.

    You'll then need to update the php.ini file with:

    Code:
    extension=pdo.so
    extension=pdo_mysql.so
    [You can find the location of your php.ini file and your existing compile options by running a PHP script that simply calls the phpinfo() function.]

    Don't forget to restart apache again after updating the php.ini file with:

    Code:
    service httpd restart
    Hope that helps.
     
Loading...

Share This Page