hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Software and Control Panels : Cpanel & PHP5 but no PDO
Reply

Forum Jump

Cpanel & PHP5 but no PDO

Reply Post New Thread In Hosting Software and Control Panels Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old
Junior Guru Wannabe
 
Join Date: Oct 2006
Posts: 65

Cpanel & PHP5 but no PDO


Hi,

I'm trying to configure my VPS which has cpanel installed to enable PDO support for the PHP5 build on the machine. Whenever I use the /scripts/easyapache script I have no option to enable PDO anywhere. I've even modified the profiles.

I can see that "--disable-pdo" is being implemented somewhere, but I don't know where.

Can anyone suggest how I enable PDO support and maintain PHP version 5?

Thanks.



Sponsored Links
  #2  
Old
Corporate Member
 
Join Date: Aug 2004
Location: Canada
Posts: 3,411
Try running the installer from the web interface. I know at least on the web one you have the option of pdo and pdo_mysql both of which say experimental.

__________________
Tony B. - Chief Executive Officer
Hawk Host Inc. Proudly serving websites since 2004
Quality Shared and VPS Hosting
PHP 5.3.x & PHP 5.4.x & PHP 5.5.X Support!

  #3  
Old
Junior Guru Wannabe
 
Join Date: Oct 2006
Posts: 65
Where is this web-based installer interface?

Sponsored Links
  #4  
Old
Junior Guru Wannabe
 
Join Date: Oct 2006
Posts: 65
found it, sorry

  #5  
Old
Junior Guru Wannabe
 
Join Date: Oct 2006
Posts: 65
No wait, aint found it, sorry. I can't see anything in WHM 11 that allows me to upgrade PHP5 with PDO?

  #6  
Old
Corporate Member
 
Join Date: Aug 2004
Location: Canada
Posts: 3,411
You want "Apache Update" which is found in the WHM menu.

__________________
Tony B. - Chief Executive Officer
Hawk Host Inc. Proudly serving websites since 2004
Quality Shared and VPS Hosting
PHP 5.3.x & PHP 5.4.x & PHP 5.5.X Support!

  #7  
Old
Junior Guru Wannabe
 
Join Date: Oct 2006
Posts: 65
Thanks TonyB

  #8  
Old
Web Hosting Master
 
Join Date: Aug 2002
Location: Canada
Posts: 647
I've found the CPanel easyapache system to be problematic with many of our customer's machines though. Quite often, it claims a certain config line that when applied to source, doesn't even work.

Further, it builds in a very generalized manner, ignoring important flags that could really improve performance.

Here's something I could recommend:

1. Peel your config line from a phpinfo page or do the following:

# mkdir /devel
# cd /devel
# php -r "phpinfo(-1)" > phpcompile
# nano phpcompile

This will bring up an editor that lets you edit your php config line. Delete all lines but the one that contains the config line (one of the first few lines) with CTRL+K.

2. Remove all of the quotation marks from the config line. It will look something like this:
Quote:
./configure '--with-abc' '--with-def' ...
Turn it into:

Quote:
./configure --with-abc --with-def
All on a single line -- very important!

3. Still editing the "phpcompile" file, add the proper CFLAGS for your system's architecture above. So for example, on our 950D box, we have this line at the very top, and our php configure directive below it:

Quote:
export CFLAGS="-march=x86-64 -O3 -pipe -msse2 -mfpmath=sse -mmmx -fomit-frame-pointer"

./configure --disable-debug --with-apxs --with-curl --with-gd --with-jpeg-dir=/usr/local/lib --with-mcrypt ....
You can find the proper line for your stepping if you google about a bit. This really helps the binary out! Note the -O3 flag as well, also very important. You can also consider adding the --enable-inline-optimization flag to your PHP configure directive. It makes for a fatter, yet faster binary. Nonetheless (digressing, sorry!) in this case you'll want to add the proper PDO directives in the config line at this step.

4. Save phpcompile, exit the editor.

5. Download the PHP source from php.net

6. Unpack the source tar.gz, and copy your phpcompile to its directory, and run it.. ie:

# cp phpcompile /devel/php-5.2.5/
# chmod 700 /devel/php-5.2.5/phpcompile
# cd php-5.2.5
# ./phpcompile

7. If your CPanel's configure directive was accurate (50/50 chance here it seems) then everything will go through without a hitch! You may have to install missing client headers or includes though. If you have yum this is a piece of cake, ex:

#yum install libpng-devel

8. # make && make install

After this you have recompiled PHP. May need to clean up your httpd.conf after the above is complete.

Source builds are better, faster, etc. Avoid easyapache like the plague.

Hope this post helps someone!
Alex

Reply

Related posts from TheWhir.com
Title Type Date Posted
Hulk Hogan's Hostamania Announces Partnership with cPanel Web Hosting News 2013-12-10 12:12:09
GoDaddy Supports cPanel as Part of Web Hosting Updates Web Hosting News 2014-05-09 12:40:20
cPanel & WHM Software 11.36 Reaches Stable Tier Status Web Hosting News 2013-04-09 11:44:33
cPanel Security Updates Address Perl Module Vulnerabilities Web Hosting News 2012-12-06 12:55:54
Hosting Control Panel cPanel & WHM 11.34 Release Hits Stable Tier Web Hosting News 2012-11-12 17:04:57


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?