Re: [PHP-DB] php5 and mysql_connect

2004-12-06 Thread Jason Wong
On Monday 06 December 2004 22:46, Norland, Martin wrote:

 No, PHP5 does indeed have some new (and different) functions for mysql,
 but it supports (properly, nothing old about it) the normal mysql
 functions as well.  The change for PHP5 is that it no longer enables
 mysql functions by default (you need to now compile it with
 --with-mysql), and it no longer bundles the client libraries.

AFAIK no version of PHP ever did compile with mysql by default. You *had* to 
use --with-mysql if you wanted mysql support. The choice was whether to use 
the bundled library (the default if you didn't specify a directory with 
--with-mysql) or some other library.

 From http://www.faqts.com/knowledge_base/view.phtml/aid/22154

   - MySQL support.  There has been some confusion with regards to the
 disabling of MySQL by default in PHP 5.  This simply means that in
 order to use MySQL you must explictly use --with-mysql just like
 you do with most every other extension. 

If this is where you got the above from, then maybe you would like to point 
out to them that it is incorrect (not that it matters to people using PHP5 -- 
but people using PHP4 might wonder why they don't have mysql support when it 
is supposed to be enabled by default).

Actually, reading it again, it doesn't explicitly say the versions of PHP 
older than PHP5 enabled by mysql by default. Maybe it is your interpretation 
and reading between the lines which led to your above statement :)

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
/*
ultima netgod: My calculator has more registers than the x86, and
 -thats- sad
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] php5 and mysql_connect

2004-12-06 Thread Norland, Martin
 anyway mysql_connect() won't work in php5 - although I do believe it's

 possible to compile in the 'old' mysql lib yourself.

No, PHP5 does indeed have some new (and different) functions for mysql,
but it supports (properly, nothing old about it) the normal mysql
functions as well.  The change for PHP5 is that it no longer enables
mysql functions by default (you need to now compile it with
--with-mysql), and it no longer bundles the client libraries. 

From http://www.faqts.com/knowledge_base/view.phtml/aid/22154

  - MySQL support.  There has been some confusion with regards to the
disabling of MySQL by default in PHP 5.  This simply means that in
order to use MySQL you must explictly use --with-mysql just like
you do with most every other extension.  Also, the client libraries
are no longer bundled, this means you must use your MySQL sources 
instead of optionally using the version that comes with PHP 4.

People can still use --with-mysql[=DIR], this move isn't a big deal.

The reason for this action is three-fold:
  - MySQL 3 (which is bundled in PHP 4) : This bundled library
was no longer properly maintained.
  - MySQL 4 (never bundled) : Is GPL, so doesn't fit with the PHP 
license.
  - PHP is attempting to bundle less third party libraries.
  - Also listed in the following faq:
http://php.net/manual/faq.databases.php#faq.databases.mysql.php5

( That link doesn't work for me, without some help:
http://us2.php.net/manual/en/faq.databases.php#faq.databases.mysql.php5
)

  I have to admit to not understanding exactly why mysqli functions
would be available when mysql functions aren't - seems fundamentally
wrong, unless they're somehow using a library that the php developers
themselves are actively maintaining, or someone else is maintaining and
releasing under a compatible license.  Given their statement is they're
trying to bundle fewer third party libraries, that's all I can see.

The new functions for mysql are meant to be used with mysql 4.1.3+ only,
and they have some neat new things like bind variables.  I can't speak
as to whether one would gain performance from using mysqli_query over
mysql_query (though I would hope one wouldn't lose it!).

Cheers,
- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] php5 and mysql_connect

2004-12-06 Thread Norland, Martin
 AFAIK no version of PHP ever did compile with mysql by default. You
*had* to 
 use --with-mysql if you wanted mysql support. The choice was whether
to use 
 the bundled library (the default if you didn't specify a directory
with 
 --with-mysql) or some other library.
snip
 If this is where you got the above from, then maybe you would like to
point 
 out to them that it is incorrect (not that it matters to people using
PHP5 -- 
 but people using PHP4 might wonder why they don't have mysql support
when it 
 is supposed to be enabled by default).
snip
 Actually, reading it again, it doesn't explicitly say the versions of
PHP 
 older than PHP5 enabled by mysql by default. Maybe it is your
interpretation 
 and reading between the lines which led to your above statement :)

I'd like to point out to them that it's my intepretation that's
incorrect.  Only thing is, shucks - it's not.  Oh well, can't please all
of the people all of the time.

http://us2.php.net/manual/en/ref.mysql.php

 In PHP 4, the option --with-mysql is enabled by default. To disable
this default behavior, you may use the --without-mysql configure option.
Also in PHP 4, if you enable MySQL without specifying the path to the
MySQL install DIR, PHP will use the bundled MySQL client libraries.

I suppose we could say that it may not have been the default in PHP 3 -
but since that was released in '98, that might be pushing it a bit.  I
can't quickly find any mention of mysql and php3 on php's site - as it
relates to builtin support - but my skills in finding information there
may not be as honed as yours.

Sorry this got a little toasty, but it sure felt like a blind attack,
since the most cursory of checks revealed my statements true.

Cheers,
- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] php5 and mysql_connect

2004-12-06 Thread Jason Wong
On Monday 06 December 2004 23:54, Norland, Martin wrote:

 Sorry this got a little toasty, but it sure felt like a blind attack,
 since the most cursory of checks revealed my statements true.

I'm sorry if you felt that that was an attack. Your honour, in my defence, I 
confess that I haven't really read the Installation section of the MySQL 
functions chapter of the manual since sometime near the end of the PHP 3 
development cycle. And I've always relied on ./configure --help to show me 
what the defaults are for the particular version of PHP I'm installing. In 
light of the mitigating circumstances I declare this a mistrial :)

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
/*
BOFH Excuse #346:

Your/our computer(s) had suffered a memory leak, and we are waiting for them 
to be topped up.
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] php5 and mysql_connect

2004-12-05 Thread it clown
Hi

Sorry i ment i am running php5 on suse 9.1.When i run php
-m  i receive:

[PHP Modules]
ctype
dom
iconv
libxml
pcre
posix
session
SimpleXML
SPL
SQLite
standard
tokenizer
xml

How do i load mysql under the modules?Is this why
mysql_connect is not working?

Regards


On Sun, 05 Dec 2004 13:50:39 +0200
 it clown [EMAIL PROTECTED] wrote:
 Hi All,
 
 i have installed php5 and mysql on 9.1 and when i use php
 to connect to mysql i get the following error:
 
 Fatal error: Call to undefined function mysql_connect()
 
 Why is this happening and how do i fix it?
 
 My php script is correct i double checked.
 
 Thanks
 Regards

_
 For super low premiums, click here
 http://www.dialdirect.co.za/quote
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

_
For super low premiums, click here http://www.dialdirect.co.za/quote

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php