[nycphp-talk] mysql and mysqli together (with PHP 5.0.3)
David Mintz
dmintz at davidmintz.org
Sun Dec 26 13:32:56 EST 2004
On Fri, 24 Dec 2004, Hans Zaunere wrote:
>
> > I upgraded to MySQL 1.4.8. It's installed in /usr/local/mysql and I
> can
> > connect with it just fine via the command line.
>
> MySQL 4.1.8, right? :)
Numbers number numbers, to paraphrase Hamlet. (-:
> <snip />
> Depending exactly on the weirdness you're seeing, it could be related to
> the new authentication protocol and passwords MySQL 4.1.x uses by
> default.
>
I was seeing stuff so weird and mysterious that I didn't know where to
begin, hence the vagueness. I would try to use "classic" mysql and a let's
say page1.php would fail; so I'd try page2.php in a browser and kept
getting page1.php back at me. I would look at Apache error log and see
segmentation fault. I would get things quietly failing and not be able to
find a verbose error message anywhere.
I got tired and cowardly tried a different tack: compile php 4.3.10 with
just mysql support; compile php 5.0.3 with just mysqli support. Played
with some PEAR DB test scripts that checked the version at runtime and
loaded either mysql or mysqli depending. Worked fine in both 4 and 5. But
I could only get phpMyAdmin to work with mysqli. (PS I also hacked
PhpMyAdmin config to check the PHP version and load the appropriate
extension.)
Now I am finding a most peculiar behavior with my 4.3.10 which is breaking
phpMyAdmin et al and has nothing to do with MySQL. On a different
(FreeBSD) host the behavior is what you expect, but on my (RH9) machine, I
when I run this...
<?php
$array = array('one' ,'two','three' );
foreach ($array as $i) {
echo "$i<br />\n" ;
}
?>
... I get:
Array
Array
Array
.. instead of:
one
two
three
How strange is that?
---
David Mintz
http://davidmintz.org/
"Don't let the liberal media tell you what to think
and feel. If you have hatred in your heart, let it out."
-- Clayton Bigsby, black white supremacist
More information about the talk
mailing list