# PDO: Are there plans to support Mysql 5 soon?

- Thread: https://externals.io/message/19729
- Original archive: https://news-web.php.net/php.internals/19729
- Started by Holografix on 2005-10-26T17:22:54+00:00
- Messages: 15
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #19729 — Holografix — 2005-10-26T17:22:54+00:00

URL: https://externals.io/message/19729#19729

Hi

With PHP 5.1 knocking at the door, I guess many people would like to take 
advantage og mysql 5 new features.

Best regards

---

## #19731 — Antony Dovgal — 2005-10-26T17:56:02+00:00

URL: https://externals.io/message/19729#19731 · In reply to: #19729

> Hi
> 
> With PHP 5.1 knocking at the door, I guess many people would like to take 
> advantage og mysql 5 new features.

What's the problem with MySQL 5 ?
Did you try ext/mysqli ( http://php.net/mysqli ) ?

-- 
Wbr, 
Antony Dovgal

---

## #19732 — Jasper Bryant-Greene — 2005-10-26T18:04:08+00:00

URL: https://externals.io/message/19729#19732 · In reply to: #19729

> With PHP 5.1 knocking at the door, I guess many people would like to take 
> advantage og mysql 5 new features.

I use PDO with MySQL 5 every day. What's the problem?

-- 
Jasper Bryant-Greene
General Manager
Album Limited

e: jasper@album.co.nz
w: http://www.album.co.nz/
p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303
a: PO Box 579, Christchurch 8015, New Zealand

---

## #19733 — Holografix — 2005-10-26T18:09:09+00:00

URL: https://externals.io/message/19729#19733 · In reply to: #19731

Hi
I know mysqli but already have some code (dao classes) based on pdo and I 
would like to keep it.
Thanks anyway.

Best regards
holo

"Antony Dovgal" <antony@zend.com> escreveu na mensagem 
news:435FC332.2060806@zend.com...
> 
> > […]
>
> What's the problem with MySQL 5 ?
> Did you try ext/mysqli ( http://php.net/mysqli ) ?
>
> -- 
> Wbr, Antony Dovgal

---

## #19734 — Holografix — 2005-10-26T18:32:12+00:00

URL: https://externals.io/message/19729#19734 · In reply to: #19731

Hi
I know mysqli but already have some code (dao classes) based on pdo and I
would like to keep it.

I am almost sure I read a message from Wez Furlong saying that pdo doesn't 
actualy support mysql 5 sometime ago.
I will try it in a couple of hours. Now it's time to dinner and watch a 
football game.
Thank you very much.

Best regards
holo

"Antony Dovgal" <antony@zend.com> escreveu na mensagem
news:435FC332.2060806@zend.com...
> 
> > […]
>
> What's the problem with MySQL 5 ?
> Did you try ext/mysqli ( http://php.net/mysqli ) ?
>
> -- 
> Wbr, Antony Dovgal

---

## #19735 — Holografix — 2005-10-26T18:32:19+00:00

URL: https://externals.io/message/19729#19735 · In reply to: #19731

Hi
I know mysqli but already have some code (dao classes) based on pdo and I
would like to keep it.

I am almost sure I read a message from Wez Furlong saying that pdo doesn't 
actualy support mysql 5 sometime ago.
I will try it in a couple of hours. Now it's time to dinner and watch a 
football game.
Thank you very much.

Best regards
holo

"Antony Dovgal" <antony@zend.com> escreveu na mensagem
news:435FC332.2060806@zend.com...
> 
> > […]
>
> What's the problem with MySQL 5 ?
> Did you try ext/mysqli ( http://php.net/mysqli ) ?
>
> -- 
> Wbr, Antony Dovgal

---

## #19737 — Holografix — 2005-10-26T18:39:09+00:00

URL: https://externals.io/message/19729#19737 · In reply to: #19729

Hi

I am almost sure I read a message from Wez Furlong saying that pdo doesn't
actualy support mysql 5 sometime ago.
I will try it in a couple of hours. Now it's time to dinner and watch a
football game.
Thank you very much.

Best regards
holo

""Holografix"" <holografix@gmail.com> escreveu na mensagem
news:12.DE.22886.21BBF534@pb1.pair.com...
> Hi
>
> With PHP 5.1 knocking at the door, I guess many people would like to take
> advantage og mysql 5 new features.
>
> Best regards

---

## #19738 — Wez Furlong — 2005-10-26T18:50:41+00:00

URL: https://externals.io/message/19729#19738 · In reply to: #19737

What I said was something along the lines of me not going to knock
myself out with a beta version of mysql when we're trying to push out
a release.

Unless the client API seriously changed in mysql 5, there should be no
reason that PHP will stop working if you upgrade to mysql 5.

--Wez.


> Hi
>
> I am almost sure I read a message from Wez Furlong saying that pdo doesn't
> actualy support mysql 5 sometime ago.
> I will try it in a couple of hours. Now it's time to dinner and watch a
> football game.
> Thank you very much.
>
> Best regards
> holo
>
> ""Holografix"" <holografix@gmail.com> escreveu na mensagem
> news:12.DE.22886.21BBF534@pb1.pair.com...
> > […]

---

## #19744 — Ilia Alshanetsky — 2005-10-26T21:27:36+00:00

URL: https://externals.io/message/19729#19744 · In reply to: #19737

pdo_mysql is not version specific, it'll work with 3.23,4.0,4.1 and even
5.0 version of MySQL.

Ilia

---

## #19746 — oliver.graetz@arcor.de — 2005-10-26T21:58:55+00:00

URL: https://externals.io/message/19729#19746 · In reply to: #19744

Ilia Alshanetsky schrieb:
> pdo_mysql is not version specific, it'll work with 3.23,4.0,4.1 and even
> 5.0 version of MySQL.

Well, now it is not anymore. I had to wait several months not being able
to use PDO because my Windows/XAMPP was already using MySQL 4.1 and the
PDO betas were _not_ functioning. So, those careful complaints about
"will it work?" are very much valid ;-)

OLLi

---

## #19749 — oliver.graetz@arcor.de — 2005-10-26T22:29:51+00:00

URL: https://externals.io/message/19729#19749

Do you read the posts you're commenting on?

I said there _were_ (there are not anymore) problems with PDO betas on
_Windows_ systems (that was a PECL build for PHP 5.0.3). This was not a
complaint on anything and I didn't complain then because it was beta and
not meant to be used with PHP 5.0.x, it's just to support that it is
reasonable for people to ask "will it work?".

The fact is that XAMPP/Win32 users could not start using PDO from PECL
for several months without having to downgrade their MySQL and that was
known (I read something in german about "all the nasty changes in MySQL
happenend in 4.1" but -- Murphy's Law -- I can't find the source, from
some PHP conference, anymore using Google).

OLLi

---

## #19770 — Holografix — 2005-10-28T00:55:00+00:00

URL: https://externals.io/message/19729#19770 · In reply to: #19729

Hi

I'm having this problems with php 5.1 latest snapshot and mysql 5.0.15 only 
on linux FC4. On windows works fine.

This code:

$pdo = new PDO('mysql:host=localhost;dbname=dbtest', 'user', 'pass');
$pdo->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );

$stmt = $pdo->prepare('select * from words limit 10');
$stmt->execute();

$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);

or this code:

$pdo = new PDO('mysql:host=localhost;dbname=dbteste', 'root', 
'solaris2002');
$pdo->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );

$rows = array();
foreach ($pdo->query('select * from words limit 10') as $row) {
   $rows[] = $row;
}

===> [Fri Oct 28 01:43:38 2005] [notice] child pid 1949 exit signal 
Segmentation fault (11)


This code:

$link = mysqli_connect('localhost', 'user', 'pass', 'dbtest');   (line 5)

$res = mysqli_query($link, 'select * from words limit 1000');

$rows = array();
while ($row = mysqli_fetch_assoc($res)) {
   $rows[] = $row;
}

or this code:

$link = new mysqli('localhost', 'user', 'pass', 'dbtest');   (line 5)

$res = $link->query('select * from words limit 10');

$rows = array();
while ($row = $res->fetch_assoc()) {
   $rows[] = $row;
}

===> Fatal error: Trying to clone an uncloneable object of class mysqli in 
/wwwroot/home/testes/php_my2.php on line 5

PHP Configure
./configure --prefix=/usr/local \
--with-apxs2=/usr/local/apache2/bin/apxs \
--enable-force-cgi-redirect \
--enable-magic-quotes \
--enable-memory-limit \
--with-libxml-dir=/usr/local \
--with-openssl=/usr/local/ssl \
--with-zlib=/usr/local \
--enable-calendar \
--enable-mbstring \
--enable-exif \
--enable-ftp \
--with-curl=/usr/local \
--with-curlwrappers \
--with-gd \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-zlib=/usr/local \
--with-freetype-dir=/usr/local \
--enable-gd-native-ttf \
--with-imap=/usr/local \
--with-imap-ssl=/usr/local/ssl \
--with-mhash=/usr/local \
--with-mcrypt=/usr/local \
--with-mysql=/usr/local/mysql \
--with-zlib-dir=/usr/local \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
--with-pgsql=/usr/local \
--enable-pdo=yes \
--with-pdo-mysql=/usr/local/mysql \
--with-pdo-pgsql=/usr/local/pgsql \
--enable-simplexml \
--with-libxml-dir=/usr/local \
--with-xsl=/usr/local \
--enable-soap \
--with-libxml-dir=/usr/local \
--with-dom=/usr/local \
--with-zlib-dir=/usr/local \
--with-iconv=/usr/local \
--with-tidy=/usr/local \
--enable-wddx \
--with-xmlreader \
--with-libxml-dir=/usr/local \
--with-xmlrpc \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--disable-debug \

Mysql Configure
./configure --prefix=/usr/local/mysql \
--with-named-z-libs=/usr/local \
--with-mysqld-user=mysql \
--with-charset=latin1 \
--with-collation=latin1_general_ci \
--enable-local-infile \
--without-debug \
--without-bench \
--without-docs \
--without-man \

mysql_xxxx functions works fine.

All of this samples works with php 5.1 and mysql 4.0.15 (linux).

Best regards




""Holografix"" <holografix@gmail.com> escreveu na mensagem 
news:12.DE.22886.21BBF534@pb1.pair.com...
> Hi
>
> With PHP 5.1 knocking at the door, I guess many people would like to take 
> advantage og mysql 5 new features.
>
> Best regards

---

## #19772 — Holografix — 2005-10-28T01:09:03+00:00

URL: https://externals.io/message/19729#19772 · In reply to: #19729

Sorry
There are only problems with pdo

mysqli problems were due to zend.ze1_compatibility_mode = On. Now it's off 
and no mysqli errors.

best regards


""Holografix"" <holografix@gmail.com> escreveu na mensagem 
news:12.DE.22886.21BBF534@pb1.pair.com...
> Hi
>
> With PHP 5.1 knocking at the door, I guess many people would like to take 
> advantage og mysql 5 new features.
>
> Best regards

---

## #19773 — Wez Furlong — 2005-10-28T01:11:22+00:00

URL: https://externals.io/message/19729#19773 · In reply to: #19772

A backtrace would help a lot


> Sorry
> There are only problems with pdo
>
> mysqli problems were due to zend.ze1_compatibility_mode = On. Now it's off
> and no mysqli errors.
>
> best regards
>
>
> ""Holografix"" <holografix@gmail.com> escreveu na mensagem
> news:12.DE.22886.21BBF534@pb1.pair.com...
> > […]

---

## #19781 — Holografix — 2005-10-28T13:50:59+00:00

URL: https://externals.io/message/19729#19781 · In reply to: #19729

Hi

Sorry to bother all of you with silly questions
I kept php.ini and my.cnf, deleted every single presence of php 5.1/mysql 5 
files. Downloaded last snapshot, compile with same configure options and 
everything is working fine. I can't figure out my mistake.
I apologize one more time.

best regards and have a nice weekend
holo




""Holografix"" <holografix@gmail.com> escreveu na mensagem 
news:12.DE.22886.21BBF534@pb1.pair.com...
> Hi
>
> With PHP 5.1 knocking at the door, I guess many people would like to take 
> advantage og mysql 5 new features.
>
> Best regards
