php-general Digest 23 Oct 2007 12:08:54 -0000 Issue 5087

Topics (messages 263525 through 263537):

Re: problem with foreach
        263525 by: Robert Cummings

MySQL connector installation/upgrade problems
        263526 by: David Zentgraf
        263530 by: Martin Marques
        263531 by: David Zentgraf

Re: [PHP-INSTALL] MySQL connector installation/upgrade problems
        263527 by: Colin Guthrie
        263534 by: Colin Guthrie
        263536 by: David Zentgraf
        263537 by: Colin Guthrie

Re: Thoughts on multiple servers
        263528 by: Per Jessen

Re: Proposal of DOM non-standard method: 
DOMDocument::loadCharacterEntitiesFromDtd($path)
        263529 by: Per Jessen

Re: Php generated html email
        263532 by: Richard Heyes

window.open() and search engines
        263533 by: Richard Heyes
        263535 by: Edward Kay

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
On Mon, 2007-10-22 at 19:59 -0400, Bastien Koert wrote:
> I am sure that I am late to the party, but am sure that
> double or single quotes at least are needed around the
> attribute values to make this work

Late to the party and completely off the mark taboot. Don't need quotes
at all. It's bad practice to omit them, but it works fine.

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
Hi,

I'm trying to upgrade a server running CentOS 3 to an up-to-date MySQL 5 installation + PHP4. I installed the MySQL 5 package, server and client, via RPMs and they work fine, the client tells me it's version 5.0.45. I went on to recompile PHP 4.4.7 --with-mysql, but it's still using MySQL client libraries version 3.23.58. I'm kind of at a loss where it takes these versions from or how I can get it to use the newer libraries.

Any hints would be greatly appreciated.

Chrs,
Dav

--- End Message ---
--- Begin Message ---
David Zentgraf escribió:
Hi,

I'm trying to upgrade a server running CentOS 3 to an up-to-date MySQL 5 installation + PHP4. I installed the MySQL 5 package, server and client, via RPMs and they work fine, the client tells me it's version 5.0.45. I went on to recompile PHP 4.4.7 --with-mysql, but it's still using MySQL client libraries version 3.23.58. I'm kind of at a loss where it takes these versions from or how I can get it to use the newer libraries.

Any hints would be greatly appreciated.

Wouldn't it be easier to upgrade to CentOS 5?

--- End Message ---
--- Begin Message ---
On  23. Oct 2007, at 19:55, Martin Marques wrote:

Wouldn't it be easier to upgrade to CentOS 5?

We tried to explain that to our host, but their service *major expletive*, and other hosts in Tokyo ain't better either. :-(

Chrs,
Dav

--- End Message ---
--- Begin Message ---
David Zentgraf wrote:
> Hi,
> 
> I'm trying to upgrade a server running CentOS 3 to an up-to-date MySQL 5
> installation + PHP4. I installed the MySQL 5 package, server and client,
> via RPMs and they work fine, the client tells me it's version 5.0.45. I
> went on to recompile PHP 4.4.7 --with-mysql, but it's still using MySQL
> client libraries version 3.23.58. I'm kind of at a loss where it takes
> these versions from or how I can get it to use the newer libraries.
> 
> Any hints would be greatly appreciated.

Do rpm -qa --nosignature | grep -i mysql and see what old libraries you
have lying around. Specifically look for the devel libraries/packages.
Remove the 3.x versions via RPM and make sure you've installed the
relevant -devel package from MySQL 5.

You can also use the MySQL 5 -shared-compat package to replace the
shared libraries needed by other apps in Fedora, although you may have
to do an "rpm -e --nodeps" to get rid of the currently installed library
prior to installing -shared-compat due to file conflicts. I always like
to test that this has worked tho (typically testing one of the apps in
the packages rpm moaned about when doing a normal "rpm -e" (sans
--nodeps) or by trying to rpm -e the newly installed -shared-compat just
to make sure it is providing the correct deps at least!

HTH


<gripe>
Be warned tho. If you use custom aggregate UDFs in MySQL 5 it the
current version will segfault on you. I tore my hair out over this.
Upstream MySQL have been pretty crap at responding or releasing
something that I reported months ago. The fact they removed all the
daily snapshots has not helped me help them to fix it either.

http://bugs.mysql.com/bug.php?id=30312

I had to stick with 5.0.27 for now.
</gripe>

Col

--- End Message ---
--- Begin Message ---
David Christopher Zentgraf wrote:
> On  23. Oct 2007, at 17:22, Colin Guthrie wrote:
> 
>> Do rpm -qa --nosignature | grep -i mysql and see what old libraries you
>> have lying around. Specifically look for the devel libraries/packages.
>> Remove the 3.x versions via RPM and make sure you've installed the
>> relevant -devel package from MySQL 5.
>>
>> You can also use the MySQL 5 -shared-compat package to replace the
>> shared libraries needed by other apps in Fedora, although you may have
>> to do an "rpm -e --nodeps" to get rid of the currently installed library
>> prior to installing -shared-compat due to file conflicts. I always like
>> to test that this has worked tho (typically testing one of the apps in
>> the packages rpm moaned about when doing a normal "rpm -e" (sans
>> --nodeps) or by trying to rpm -e the newly installed -shared-compat just
>> to make sure it is providing the correct deps at least!
> 
> I did install the shared-compat package (sorry, forgot to mention),
> which littered libmysqlclient.so.10 to .so.15 around my /usr/lib, and I
> guess that PHP is using .so.10 for some reason instead of .so.15 (or
> simply libmysqlclient.so, which is symlinked to .so.15).
> Are you saying that it's save to remove the old libs or the whole
> shared-compat package and simply install the current libs instead? I was
> thinking about it, but then again, these things are there for
> compatibility, so I hoped there was a way to explicitly tell PHP to use
> the latest version while leaving the others around.

The .so file (without the .10 or .15) is just used for compile time
linking, it's not used at runtime.

No, the shared-compat is the correct one ot use here as some of the core
Centos rpms may need a mysql v3 compatible client library.


If you compile PHP and it finds v3 of mysql that means that you must
have the old development libraries for mysql 3 installed in some
capacity (I believe).

What is the output of:
rpm -qa --nosignature --nodigest | grep -i mysql

This should give some clues.

I would imagine (don't know) that PHP would use the mysql_config program
to work out which mysql is installed and get the relevent cflags and
linking options. For me this is provided by the
MySQL-devel-community-5.0.27 package from MySQL... Is this definitely
installed?

Col

--- End Message ---
--- Begin Message ---
On  23. Oct 2007, at 20:33, Colin Guthrie wrote:

If you compile PHP and it finds v3 of mysql that means that you must
have the old development libraries for mysql 3 installed in some
capacity (I believe).

What is the output of:
rpm -qa --nosignature --nodigest | grep -i mysql

This should give some clues.

$ rpm -qa --nosignature --nodigest | grep -i mysql
MySQL-server-community-5.0.45-0.rhel3
mod_auth_mysql-20030510-2.ent
MySQL-shared-compat-5.0.45-0.rhel3
MySQL-client-community-5.0.45-0.rhel3
mysql-bench-3.23.58-16.RHEL3.1
MySQL-python-0.9.1-6
libdbi-dbd-mysql-0.6.5-5
perl-DBD-MySQL-2.1021-4.EL3
qt-MySQL-3.1.2-17.RHEL3
php-mysql-4.3.2-43.ent
MySQL-devel-community-5.0.45-0.rhel3

Now I'm even more confused, the 5.0.45 devel package *is* there.

I would imagine (don't know) that PHP would use the mysql_config program
to work out which mysql is installed and get the relevent cflags and
linking options. For me this is provided by the
MySQL-devel-community-5.0.27 package from MySQL... Is this definitely
installed?

$ mysql_config
Usage: /usr/bin/mysql_config [OPTIONS]
Options:
--cflags [-I/usr/include/mysql -g -pipe -march=i386 - mcpu=i686]
        --include        [-I/usr/include/mysql]
--libs [-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm] --libs_r [-L/usr/lib/mysql -lmysqlclient_r -lz - lpthread -lcrypt -lnsl -lm -lpthread]
        --socket         [/var/lib/mysql/mysql.sock]
        --port           [3306]
        --version        [5.0.45]
--libmysqld-libs [-L/usr/lib/mysql -lmysqld -lz -lpthread - lcrypt -lnsl -lm -lpthread -lrt]

Doing a simple ls -l on both /usr/lib/mysql and /usr/include/mysql shows me that all libraries in there are from Jul 5th, which is too old to be my recent MySQL install. So these seem to be the files that need updating. Which package will do that for me?

Chrs,
Dav

--- End Message ---
--- Begin Message ---
David Christopher Zentgraf wrote:
> On  23. Oct 2007, at 20:33, Colin Guthrie wrote:
> 
>> If you compile PHP and it finds v3 of mysql that means that you must
>> have the old development libraries for mysql 3 installed in some
>> capacity (I believe).
>>
>> What is the output of:
>> rpm -qa --nosignature --nodigest | grep -i mysql
>>
>> This should give some clues.
> 
> $ rpm -qa --nosignature --nodigest | grep -i mysql
> MySQL-server-community-5.0.45-0.rhel3
> mod_auth_mysql-20030510-2.ent
> MySQL-shared-compat-5.0.45-0.rhel3
> MySQL-client-community-5.0.45-0.rhel3
> mysql-bench-3.23.58-16.RHEL3.1
> MySQL-python-0.9.1-6
> libdbi-dbd-mysql-0.6.5-5
> perl-DBD-MySQL-2.1021-4.EL3
> qt-MySQL-3.1.2-17.RHEL3
> php-mysql-4.3.2-43.ent
> MySQL-devel-community-5.0.45-0.rhel3
> 
> Now I'm even more confused, the 5.0.45 devel package *is* there.

Yeah that looks pretty OK to me (tho' not overly knowledgeable with
Fedora/Centos packaging)

>> I would imagine (don't know) that PHP would use the mysql_config program
>> to work out which mysql is installed and get the relevent cflags and
>> linking options. For me this is provided by the
>> MySQL-devel-community-5.0.27 package from MySQL... Is this definitely
>> installed?
> 
> $ mysql_config
> Usage: /usr/bin/mysql_config [OPTIONS]
> Options:
>         --cflags         [-I/usr/include/mysql -g -pipe -march=i386
> -mcpu=i686]
>         --include        [-I/usr/include/mysql]
>         --libs           [-L/usr/lib/mysql -lmysqlclient -lz -lcrypt
> -lnsl -lm]
>         --libs_r         [-L/usr/lib/mysql -lmysqlclient_r -lz -lpthread
> -lcrypt -lnsl -lm -lpthread]
>         --socket         [/var/lib/mysql/mysql.sock]
>         --port           [3306]
>         --version        [5.0.45]
>         --libmysqld-libs [-L/usr/lib/mysql -lmysqld -lz -lpthread
> -lcrypt -lnsl -lm -lpthread -lrt]
> 
> Doing a simple ls -l on both /usr/lib/mysql and /usr/include/mysql shows
> me that all libraries in there are from Jul 5th, which is too old to be
> my recent MySQL install. So these seem to be the files that need
> updating. Which package will do that for me?

No, I reckon Jul 5th could be about right.... when was .45 released? I
had it in my head it was august but Jul doesn't seem too far before that
so entirely possible.

Use rpm -qf <filename> to see which package owns which files.

you can also use rpm -V <pck> to verify that the package has not be
modified on disk.

Does PHP 4 perhaps come with it's own mysql library in the source?
Perhaps you have to pass an argument?

Try using something like: --with-mysql=shared,/usr in the configure to
PHP. That's certainly how I configure PHP5. The args for 4 may be
different tho'.

Col.

--- End Message ---
--- Begin Message ---
Ronald Wiplinger wrote:

> Questions:
> 1. Any hints on above configuration?

I would take a look at LinuxHA for a high-availability N+1 solution.

> 2. Has anybody experience with a cluster mysql?
> 3. How to get the web servers working with the closest connection
> (according to the users IP) ?

You could set up two different views on your DNS, and then try to pick
the right view depending on the geographical location of your customer. 
There are also systems out there that will examine the routing tables,
and pick the "closest" server based on that.  I think UltraMonkey will
do something like that.

> 4. How do I get info about the users IP (within the web server) to
> provide startup settings, like Time zone & so time of the user,
> language, country, ... ?

Geographical mapping of the IP is your best option.  Lookup the IP in a
database to determine the country, then set a default for timezone,
language etc., but let the user override it. 

> 5. How to make it fail-fall-over if one of the server (web and/or
> database server!) is not working?

A high availability for geographically dispersed servers?  Maybe you
should take a look at Linux Virtual Server, I'm not certain it'll help
though. 


/Per Jessen, Zürich

--- End Message ---
--- Begin Message ---
Freyjkell wrote:

> DOMDocument::loadCharacterEntitiesFromDtd($path);
> 
> I like to load character entities (not whole document type
> definition).
> 

Whilst we're on this subject - where do you guys normally load character
entities from?  I recently ported some stuff from the PHPH4 XSLT
implementation (with saxon) to PHP5, and I seem to recall having
problems with getting entities defined.  


/Per Jessen, Zürich

--- End Message ---
--- Begin Message ---
Ronald Wiplinger wrote:
How can I create a html email directly from a web page via Php?
The page will include tables, background colors and pictures within the tables. The received email should be readable without Internet connection (pictures, must be sent with the email)

http://www.phpguru.org/static/htmlMimeMail5.html

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--- End Message ---
--- Begin Message --- Can anyone say for sure whether window.open() links get spidered by search engines?

Thanks.

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--- End Message ---
--- Begin Message ---
>
> Can anyone say for sure whether window.open() links get spidered by
> search engines?
>

>From my experience they don't, but I use a custom Javascript function to
open pop-ups.

--- End Message ---

Reply via email to