Jump to content

PHP 5.3 & MySQLi


Recommended Posts

No matter how long I try, I can't get a working PHP 5.3 with mysqli support.

I've read and tried tutorials everywhere, I've ranged through many errors, no errors, many different things, but the end result is always one of these:

1) It wont load period

2) It loads but mysqli doesn't load

 

Does anyone know exactly how to get these to work together?

 

I'm using a VPS with CentOS 5.4 i386.

There is no control panel, I've installed:

- Apache 2.2

- MySQL via YUM (all bits)

- PHP 5.3.1

 

Apache and PHP have no problem together.

MySQL works on it's own.

 

I've messed with lots in the php.ini file with no success.

As I read now PHP 5.3.* now comes with mysqli built it.

So I configure it...

./configure --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd

Make it, install it, and PHPINFO() still tells me there is mysqli.

 

If tried a ton of different configuration lines, and all that compile have the same outcome.

I've been trying to get this server working for about 5 days now, and I'm really getting towards the end of my tether with this one...

Link to comment
Share on other sites

Is there any reason you installing from source instead of using the package manager?

 

I am new to Linux, and this is my first VPS, so I could be very off track here.

But if by package manager you mean YUM, yum only seems to support of to PHP 5.2.?

I specifically need 5.3.* and mysqli.

If you know a better way to install it, I'm honestly all ears.

Link to comment
Share on other sites

  • 2 weeks later...

Does config or make output any errors?  Also, make sure the native driver for MySQL is building correctly.

 

 

Also, you might have to set yum to use an alternate repo to do PHP 5.3.  As for which repo, no idea :).  (CentOS tries to stay very stable and what not, so sometimes they lag behind quite a bit in new software.  As such, the yum repo from another distro might have PHP 5.3 in it.)

 

 

Edit:

 

If you look at http://php.net/downloads.php on the left PHP suggests http://iuscommunity.org/ as a possible repo for PHP 5.3.

 

So, you could try something like:

 

Make a file in /etc/yum.repo.d/ called ius.repo with:

 

[ius]

name=IUS Repo

baseurl=http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/

gpgcheck=1

 

Then run something like:

 

yum --enable-repo=ius install php53

 

(If you had another version of PHP installed from the main repo, you would probably have to remove it first.)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.