Results 1 to 16 of 16

Thread: php pdo?

  1. #1
    Join Date
    Nov 2006
    Posts
    74

    php pdo?

    How do I enable php pdo on a cpanel box? Is this a good idea or any downside to enabling this?

  2. #2
    Join Date
    Nov 2006
    Posts
    74
    Actually pdo-mysql is what I need enabled. I have mysql 5

  3. #3
    Join Date
    Feb 2004
    Location
    UK
    Posts
    170
    You can't add it using the apache build system at the moment. It is available in their new Apache 2 system, but that isn't stable yet. The only option is to compile it manually.
    David

  4. #4
    Join Date
    Nov 2006
    Posts
    74
    How do I compile it manually?

  5. #5
    Join Date
    Feb 2004
    Location
    UK
    Posts
    170
    Instructions are in the PHP manual at http://www.php.net/pdo
    David

  6. #6
    Join Date
    Nov 2006
    Posts
    74
    This is a cpanel box, I cannot do that.

  7. #7
    Join Date
    Feb 2004
    Location
    UK
    Posts
    170
    You can. You just download and compile it into Apache as would normally. You can grab the ./configure line from the cPanel build from a phpinfo() file.
    David

  8. #8
    Join Date
    Nov 2006
    Posts
    74
    What do you mean grab the configure line? What about the other modules? I do not know how to compile via command line to be honest

  9. #9
    Join Date
    Feb 2004
    Location
    UK
    Posts
    170
    If you don't know how to compile via the command line I might question why you are managing your own server. Perhaps you should e-mail your data centre and see if they can do it for you, or hire a server admin company to handle it.
    David

  10. #10
    Join Date
    Nov 2006
    Posts
    74
    No reason to question why I manage my own server. Cpanel has a built in apache compiler, that is why I don't compile via command line

  11. #11
    Join Date
    Nov 2006
    Posts
    74
    Can someone please give me an example command to run on a cpanel/centos box to enable pdo, gd, freetype, php 5, phpsuexec, mbstring, curl, curlssl, mcrypt?

  12. #12
    Join Date
    Feb 2004
    Location
    UK
    Posts
    170
    If you want the same as you have currently you'll need to copy the ./configure line from a phpinfo() file on your server. That will have all the correct paths etc. Then you can add --with-pdo and --with-pdo-mysql
    David

  13. #13
    Join Date
    Nov 2006
    Posts
    74
    This is what I see (I also added the pdo info at the end):

    './configure' '--prefix=/usr' '--with-xml' '--with-mm' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-iconv' '--with-imap=/usr/local/imap-2004g' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mm' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pdflib' '--with-pear' '--with-pgsql=/usr' '--with-pspell' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zip' '--with-zlib' '--with-pdo' --with-pdo-mysql'

    Do I simply run this anywhere in command prompt?

  14. #14
    Join Date
    Feb 2004
    Location
    UK
    Posts
    170
    You need to download a copy of PHP and then extract and run it from the extraction location. Also you missed a ' from the beginning of the --with-pdo-mysql. See the manual for instructions on compiling and installing.
    David

  15. #15
    Join Date
    Nov 2006
    Posts
    74
    This is a cpanel box and php is already there. What to do from here?

  16. #16
    Join Date
    Feb 2004
    Location
    UK
    Posts
    170
    It doesn't matter about the cPanel PHP build - your build will overwrite it when you run make install at the end of the setup process. Just follow the instructions as described in the PHP Manual for your OS.
    David

Posting Permissions

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