[PHP] Compile PHP with MySQL support

2011-10-13 Thread Nick Khamis
Hello Everyone,

I am trying to compile php from source using the following config:

./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache/bin/apxs
--with-config-file-path=/usr/local/php
--with-mcrypt=/usr/local/bin/mcrypt --with-mysqli
--with-gettext=./ext/gettext --with-pear
--with-libxml-dir=/usr/include/libxml2 --with-zlib --with-gd
--enable-pcntl

Note the mysqli without pointing to /usr/local/mysql/bin/mysql_config.
The problem is MySQL is not installed on the machine, it is actually
installed on another server.

MySQLi Suport:

mysqli
MysqlI Support  enabled
Client API library version  5.1.49
Active Persistent Links 0
Inactive Persistent Links   0
Active Links0
Client API header version   5.1.49
MYSQLI_SOCKET   /var/run/mysqld/mysqld.sock

Directive   Local Value Master Value
mysqli.allow_local_infile   On  On
mysqli.allow_persistent On  On
mysqli.default_host no valueno value
mysqli.default_port 33063306
mysqli.default_pw   no valueno value
mysqli.default_socket   no valueno value
mysqli.default_user no valueno value
mysqli.max_linksUnlimited   Unlimited
mysqli.max_persistent   Unlimited   Unlimited
mysqli.reconnectOff Off

The machine I compiled PHP on does not have mysqli.so, and so I am
recieving the fatal call to undefined function mysql_connect()
error. Can someone tell me how to compile php from source with mysql
support, but actually mysql is installed on a different server?

Can I download a precompile mysqli anywhere? The PHP version is 5.1.49
as noted earlier.

Thanks in Advance,

Nick


Re: [PHP] Compile PHP with MySQL support

2011-10-13 Thread Simon J Welsh
On 14/10/2011, at 1:27 AM, Nick Khamis wrote:

 Hello Everyone,
 
 I am trying to compile php from source using the following config:
 
 ./configure --prefix=/usr/local/php
 --with-apxs2=/usr/local/apache/bin/apxs
 --with-config-file-path=/usr/local/php
 --with-mcrypt=/usr/local/bin/mcrypt --with-mysqli
 --with-gettext=./ext/gettext --with-pear
 --with-libxml-dir=/usr/include/libxml2 --with-zlib --with-gd
 --enable-pcntl
 
 Note the mysqli without pointing to /usr/local/mysql/bin/mysql_config.
 The problem is MySQL is not installed on the machine, it is actually
 installed on another server.
 
 MySQLi Suport:
 
 mysqli
 MysqlI Support  enabled
 Client API library version  5.1.49
 Active Persistent Links 0
 Inactive Persistent Links   0
 Active Links0
 Client API header version   5.1.49
 MYSQLI_SOCKET   /var/run/mysqld/mysqld.sock
 
 Directive   Local Value Master Value
 mysqli.allow_local_infile   On  On
 mysqli.allow_persistent On  On
 mysqli.default_host no valueno value
 mysqli.default_port 33063306
 mysqli.default_pw   no valueno value
 mysqli.default_socket   no valueno value
 mysqli.default_user no valueno value
 mysqli.max_linksUnlimited   Unlimited
 mysqli.max_persistent   Unlimited   Unlimited
 mysqli.reconnectOff Off
 
 The machine I compiled PHP on does not have mysqli.so, and so I am
 recieving the fatal call to undefined function mysql_connect()
 error. Can someone tell me how to compile php from source with mysql
 support, but actually mysql is installed on a different server?
 
 Can I download a precompile mysqli anywhere? The PHP version is 5.1.49
 as noted earlier.
 
 Thanks in Advance,
 
 Nick


You've only compiled in MySQLi. You also need to pass --with-mysql to 
configure. As you can compile in MySQLi, you should have no problems with MySQL.

---
Simon Welsh
Admin of http://simon.geek.nz/


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



Re: [PHP] Compile PHP with MySQL support

2011-10-13 Thread Sharl.Jimh.Tsin
在 2011-10-13四的 08:27 -0400,Nick Khamis写道:
 Hello Everyone,
 
 I am trying to compile php from source using the following config:
 
 ./configure --prefix=/usr/local/php
 --with-apxs2=/usr/local/apache/bin/apxs
 --with-config-file-path=/usr/local/php
 --with-mcrypt=/usr/local/bin/mcrypt --with-mysqli
 --with-gettext=./ext/gettext --with-pear
 --with-libxml-dir=/usr/include/libxml2 --with-zlib --with-gd
 --enable-pcntl
 
 Note the mysqli without pointing to /usr/local/mysql/bin/mysql_config.
 The problem is MySQL is not installed on the machine, it is actually
 installed on another server.
 
 MySQLi Suport:
 
 mysqli
 MysqlI Support  enabled
 Client API library version  5.1.49
 Active Persistent Links 0
 Inactive Persistent Links   0
 Active Links0
 Client API header version   5.1.49
 MYSQLI_SOCKET   /var/run/mysqld/mysqld.sock
 
 Directive   Local Value Master Value
 mysqli.allow_local_infile   On  On
 mysqli.allow_persistent On  On
 mysqli.default_host no valueno value
 mysqli.default_port 33063306
 mysqli.default_pw   no valueno value
 mysqli.default_socket   no valueno value
 mysqli.default_user no valueno value
 mysqli.max_linksUnlimited   Unlimited
 mysqli.max_persistent   Unlimited   Unlimited
 mysqli.reconnectOff Off
 
 The machine I compiled PHP on does not have mysqli.so, and so I am
 recieving the fatal call to undefined function mysql_connect()
 error. Can someone tell me how to compile php from source with mysql
 support, but actually mysql is installed on a different server?

install it locally.otherwise impossible.

 
 Can I download a precompile mysqli anywhere? The PHP version is 5.1.49
 as noted earlier.
 
 Thanks in Advance,
 
 Nick

-- 
Best regards,
Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**)

Using Gmail? Please read this important notice:
http://www.fsf.org/campaigns/jstrap/gmail?10073.


signature.asc
Description: This is a digitally signed message part


[PHP] Re: PHP Udate MySQL command

2010-06-04 Thread Gary

Sorry, just noticed that I had this line in the post.  (should not post 
before coffee).

 $sql = INSERT INTO contact  comments, VALUES = $test WHERE contact_id = 
 33;

It is supposed to be

$sql = UPDATE contact comments = '$test' WHERE contact_id = '33'


Gary gwp...@ptd.net wrote in message 
news:49.e6.07323.599d8...@pb1.pair.com...
I am trying to get an update command to work in PHP.  I am able to update 
records going directly to phpmyadmin command line. I have even let it 
produce the php code to insert, but have not been able to get it to work.

 I have it stripped down to one command hoping to get it to work then 
 replicate entire forms for clients to use direct.I get no error codes, I 
 only get my message It did not enter into DB;

 Anyone see where I am going wrong?

 Gary

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml;
 head
 meta http-equiv=Content-Type content=text/html; charset=utf-8 /
 titleUntitled Document/title
 /head

 body
 form action=?php echo $_SERVER['PHP_SELF']; ? method=post
 testinput name=test type=text /
 input name=submit type=submit value=submit /
 /form

 ?php


 $batchconnetion = mysql_connect(host, 'un', 'pw', 'db')//sanatized for 
 board
 or die('Error connecting with MySQL Database');

 $test=$_POST['test'];

 //$sql=update contact set type = \'$test\' where item_id = \'164\'; 
 //this is the code created by phpmyadmin

 $sql = INSERT INTO contact  comments, VALUES = $test WHERE contact_id = 
 33;

 mysql_query($sql,$batchconnetion);

 $result = mysql_query($sql,$batchconnetion);

 if($result == true) {
   echo Successfully Inserted Records;
   } else {
   echo It did not enter into DB;
 }

 mysql_close($batchconnetion);

 ?


 /body
 /html


 __ Information from ESET Smart Security, version of virus 
 signature database 5171 (20100604) __

 The message was checked by ESET Smart Security.

 http://www.eset.com



 



__ Information from ESET Smart Security, version of virus signature 
database 5171 (20100604) __

The message was checked by ESET Smart Security.

http://www.eset.com





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



Re: [PHP] Re: PHP and MySQL SELECT COUNT (*)

2008-09-18 Thread Vinny Gullotta
Thanks all, I appreciate the follow ups and the help with the code. I'm 
still relatively new with this stuff, and never had any formal training, 
it's all just been learn as I go, and I have to learn fast as this project 
is relatively urgent to get completed. I plan on going through all of my 
code on all of these pages and cleaning it up at the end to make it more 
efficient, so I will use these tips to help do that.


Thanks again to all who helped troubleshoot this. It is working great now 
and I think my bosses will be happy. =D



Nathan Rixham [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

learn something new every day! cheers Micah :)

Micah Gersten wrote:

While it's true that '.' concatenates and ',' is a list separator, The
comma is actually more appropriate in this instance since you are just
outputting each piece.  It saves the overhead of concatenation before
output.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Nathan Rixham wrote:

6:  vs '
when you use  php will parse the enclosed string for variables, when
you use ' it won't; so ' leads for faster code, and also encourages
you to code strongly by closing strings and concatenating variables.
Further it allows you to use valid html  around attributes rather
than the invalid '

7: , vs .
there is no vs :) to concatenate we use . (period) not , (comma)

so for 6  7..
echo 'td' . $i['servername'] . '/td';

I'm going to stop there, hope it helps a little bit; and I won't go
any further as half the fun is learning; so you finding out how to
save time on queries and write your own db handlers etc is not my
domain I reckons

Regards

nathan




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



[PHP] Re: PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Nathan Rixham

Vinny Gullotta wrote:
What I want to do is find the top 10 servers where the column steps = 
iisreset. The following code works great except that the page is not 
displaying the servername in the 'Server Name' column of my results 
(nothing appears, the column is just blank).


servername and steps are the important columns in the database table. 
$_POST[time1] and $_POST[time2] come from a form submitted.


When I copy and paste the entire select statement into the SQL tab in 
phpmyadmin (and replace the time variables with actual times 
corresponding to the timestamp column), it displays the correct results 
including servername. Everything works in the php page's results except 
for the servername. I feel like it's right in front of my face and 
that's why I can't see it lol. Any help would be greatly appreciated. 
Thanks in advance =)


My code...

$query = SELECT servername, COUNT(steps) FROM monitoring WHERE steps 
LIKE 'iisreset' AND timestamp = '$_POST[time2]' AND timestamp = 
'$_POST[time1]' GROUP BY servername ORDER BY COUNT(*) DESC LIMIT 10;

$result = mysql_query($query) or die(mysql_error());

# display column titles
echo centertable class='table'tr;
echo td class='tableHeader'centersmallbCount/b/small/td;
echo td class='tableHeader'centersmallbServer 
Name/b/small/td;

echo /tr;

#display results
while($i = mysql_fetch_row($result))
{
echo trtdsmallcenter, $i[COUNT('steps')], 
/center/small/td;

echo tdsmallcenter, $i[servername] ,/center/small/td/tr;
}
echo /table/centerbr;


just a few little notes.. because I'm like this today

(none of it is a you must do, or meant badly, just aiming to save you 
some time by passing on a few *things*)


1: SQL
in mysql queries /should/ use backticks (`) around database, table and 
column names, stop's them getting confused with variables or reserved 
words (like timestamp) and saves you future trouble :)


further, you'll be needing to use AS to turn COUNT(steps) into a nice 
name like stepcount


so..
$query = 'SELECT `servername`, COUNT(`steps`) AS stepcount FROM 
`monitoring` WHERE `steps` LIKE iisreset AND `timestamp` = ' . 
$_POST[time2] . ' AND `timestamp` = ' . $_POST[time1] . ' GROUP BY 
`servername` ORDER BY COUNT(*) DESC LIMIT 10';


2: you should be cleaning those posts before you add them to a mysql 
query; this has been covered many times so I won't repost it 
(mysql_real_escape() or sprintf or.. many different methods]


3: Needless multiple echo's; one will suffice just fine and show it up 
in your editor as a nice easily visible block of html :)


echo 'centertable class=tabletr
td class=tableHeadercentersmallbCount/b/small/td
td class=tableHeadercentersmallbServer Name/b/small/td
/tr';

4: valid xhtml; in my opinion there's no excuse now; it's been years 
since it came out (and you're already using css); this will do the same 
as above:

echo 'table class=center
tr
thCount/th
thServer Name/th
/tr';

[css to center the table would be]
table.center {
margin: 0 auto;
}

5: mysql_fetch_row() returns a numerical indexed array.. not associative 
thus:

$i = mysql_fetch_row($result)
print_r($i);

will show..
$i[0] = the server name
$i[1] = stepcount value

you'll be needing
$i = mysql_fetch_assoc($result);
print_r($i);

which will show
$i['servername'] = the server name
$i['stepcount'] = stepcount value

6:  vs '
when you use  php will parse the enclosed string for variables, when 
you use ' it won't; so ' leads for faster code, and also encourages you 
to code strongly by closing strings and concatenating variables.
Further it allows you to use valid html  around attributes rather than 
the invalid '


7: , vs .
there is no vs :) to concatenate we use . (period) not , (comma)

so for 6  7..
echo 'td' . $i['servername'] . '/td';

I'm going to stop there, hope it helps a little bit; and I won't go any 
further as half the fun is learning; so you finding out how to save time 
on queries and write your own db handlers etc is not my domain I reckons


Regards

nathan

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



Re: [PHP] Re: PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Micah Gersten
While it's true that '.' concatenates and ',' is a list separator, The
comma is actually more appropriate in this instance since you are just
outputting each piece.  It saves the overhead of concatenation before
output.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Nathan Rixham wrote:

 6:  vs '
 when you use  php will parse the enclosed string for variables, when
 you use ' it won't; so ' leads for faster code, and also encourages
 you to code strongly by closing strings and concatenating variables.
 Further it allows you to use valid html  around attributes rather
 than the invalid '

 7: , vs .
 there is no vs :) to concatenate we use . (period) not , (comma)

 so for 6  7..
 echo 'td' . $i['servername'] . '/td';

 I'm going to stop there, hope it helps a little bit; and I won't go
 any further as half the fun is learning; so you finding out how to
 save time on queries and write your own db handlers etc is not my
 domain I reckons

 Regards

 nathan


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



Re: [PHP] Re: PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Nathan Rixham

learn something new every day! cheers Micah :)

Micah Gersten wrote:

While it's true that '.' concatenates and ',' is a list separator, The
comma is actually more appropriate in this instance since you are just
outputting each piece.  It saves the overhead of concatenation before
output.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Nathan Rixham wrote:

6:  vs '
when you use  php will parse the enclosed string for variables, when
you use ' it won't; so ' leads for faster code, and also encourages
you to code strongly by closing strings and concatenating variables.
Further it allows you to use valid html  around attributes rather
than the invalid '

7: , vs .
there is no vs :) to concatenate we use . (period) not , (comma)

so for 6  7..
echo 'td' . $i['servername'] . '/td';

I'm going to stop there, hope it helps a little bit; and I won't go
any further as half the fun is learning; so you finding out how to
save time on queries and write your own db handlers etc is not my
domain I reckons

Regards

nathan



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



Re: [PHP] Re: PHP and MySQL SELECT COUNT (*)

2008-09-17 Thread Chris



1: SQL
in mysql queries /should/ use backticks (`) around database, table and 
column names, stop's them getting confused with variables or reserved 
words (like timestamp) and saves you future trouble :)


.. which is a mysql-ism - no other database supports this. As soon as 
you need to use another db (regardless of whether it's this application 
or not), you're stuffed.


For reserved word column names, you don't have much choice but don't do 
that in the first place ;)


http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html

Other db's will have a similar list - though in most cases, if it's a 
function or sql keyword (eg 'table'), it'll be reserved in all.


further, you'll be needing to use AS to turn COUNT(steps) into a nice 
name like stepcount


Which is also a mysql-ism. Most other db's don't let you use aggregate 
aliases in an order by clause (I think because the sql standard says 
don't do that).


--
Postgresql  php tutorials
http://www.designmagick.com/


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



Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread David Christopher Zentgraf

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

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



Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
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.

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



Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread David Christopher Zentgraf

On  23. Oct 2007, at 21:07, Colin Guthrie wrote:


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.


Ah sorry, I was thinking about source installs. RPMs keep the  
original creation date I guess. Not overly used to that.



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


Probing two random files in include/mysql and and lib/mysql show they  
belong to MySQL-devel-community-5.0.45-0.rhel3.



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


$ rpm -V MySQL-devel-community-5.0.45-0.rhel3
missing  d /usr/share/man/man1/comp_err.1.gz
missing  d /usr/share/man/man1/mysql_config.1.gz

I suppose this is, albeit not ideal, tolerable?


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


Yes, as of PHP4 the --with-mysql is on by default. I tried specifying  
--with-mysql-dir=/usr and also shared,/usr, but to no avail.


Chrs,
Dav

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



Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
David Christopher Zentgraf wrote:
 $ rpm -V MySQL-devel-community-5.0.45-0.rhel3
 missing  d /usr/share/man/man1/comp_err.1.gz
 missing  d /usr/share/man/man1/mysql_config.1.gz
 
 I suppose this is, albeit not ideal, tolerable?

Yeah this is fine. Your system is probably not setup to install docs and
therefore these files just didn't get installed.

 Does PHP 4 perhaps come with it's own mysql library in the source?
 Perhaps you have to pass an argument?
 
 Yes, as of PHP4 the --with-mysql is on by default. I tried specifying
 --with-mysql-dir=/usr and also shared,/usr, but to no avail.

Sorry mate I'm out of ideas... Without tracing through the configure
script to nail it down, I'm kinda stumped.

Col

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



[PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
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

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



Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
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

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



[PHP] tinymce, php and mysql problem

2007-05-29 Thread blueboy
Hi,

I am using tinymce to save news articles with very basic html styling in a 
database. This works well upto a point but when I get over a certain number 
of characters and then the  'you have an error in your SQL syntax' error. I 
am saving in as a LONGBLOB so it should not be a data type mismatch. Any 
ideas?

R. 

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



Re: [PHP] tinymce, php and mysql problem

2007-05-29 Thread Zoltán Németh
2007. 05. 29, kedd keltezéssel 10.29-kor blueboy ezt írta:
 Hi,
 
 I am using tinymce to save news articles with very basic html styling in a 
 database. This works well upto a point but when I get over a certain number 
 of characters and then the  'you have an error in your SQL syntax' error. I 
 am saving in as a LONGBLOB so it should not be a data type mismatch. Any 
 ideas?

I'm almost sure this is an escaping issue. Do you use
mysql_real_escape_string() on the stuff you store in the db?

greets
Zoltán Németh

 
 R. 
 

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



Re: [PHP] tinymce, php and mysql problem

2007-05-29 Thread Darren Whitlen

Zoltán Németh wrote:

2007. 05. 29, kedd keltezéssel 10.29-kor blueboy ezt írta:

Hi,

I am using tinymce to save news articles with very basic html styling in a 
database. This works well upto a point but when I get over a certain number 
of characters and then the  'you have an error in your SQL syntax' error. I 
am saving in as a LONGBLOB so it should not be a data type mismatch. Any 
ideas?


I'm almost sure this is an escaping issue. Do you use
mysql_real_escape_string() on the stuff you store in the db?

greets
Zoltán Németh

R. 



If the mysql_real_escape_string doesn't solve it (which I think it most 
likely will), echo out the SQL query its sending and post it here so we 
can take a look.


Darren

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



Re: [PHP] Installing php and mysql on linux

2007-03-12 Thread Brad Bonkoski

I think up2date is *not* up2date ;-)
Google for 'yum' and all its flags for usage...

-B

Jonathan Kahan wrote:

Hi all,

I am attempting to start the mysql rpm in Red hat as a first step 
prior to downloading and activating the php-mysql rpm. I was 
attempting to follow steps based on the link below. the php rpm is 
loaded and activated as I have been able to execute php scripts. When 
I attempt to follow those directions, I get the below errors. Does 
anyone know why I got the below errors or can help me through this 
process?


Thanks

http://kbase.redhat.com/faq/FAQ_39_3633.shtm


[EMAIL PROTECTED] var]# rpm -q mysql-server
mysql-server-4.1.20-1.FC4.1
[EMAIL PROTECTED] var]# rpm -q mysql
mysql-4.1.20-1.FC4.1
[EMAIL PROTECTED]  var]# up2date mysql
bash: up2date: command not found
[EMAIL PROTECTED]  var]# up2date mysql-server
bash: up2date: command not found
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED] var]# ./up2date mysql-server
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]#


Kind Regards
Jonathan Kahan


Systems Developer
Estrin Technologies, inc.
1375 Broadway, 3rd Floor, New York, NY, 10018

Email: [EMAIL PROTECTED]
Web: http://www.estrintech.com


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



RE: [PHP] Installing php and mysql on linux

2007-03-12 Thread Jim Moseby
 I am attempting to start the mysql rpm in Red hat as a first 
 step prior to 
 downloading and activating the php-mysql rpm. I was 
 attempting to follow 
 steps based on the link below. the php rpm is loaded and 
 activated as I have 
 been able to execute php scripts. When I attempt to follow 
 those directions, 
 I get the below errors. Does anyone know why I got the below 
 errors or can 
 help me through this process?
 
 Thanks
 
 http://kbase.redhat.com/faq/FAQ_39_3633.shtm
 
 
 [EMAIL PROTECTED] var]# rpm -q mysql-server
 mysql-server-4.1.20-1.FC4.1
 [EMAIL PROTECTED] var]# rpm -q mysql
 mysql-4.1.20-1.FC4.1
 [EMAIL PROTECTED]  var]# up2date mysql
 bash: up2date: command not found
 [EMAIL PROTECTED]  var]# up2date mysql-server
 bash: up2date: command not found
 [EMAIL PROTECTED]  var]# ./up2date mysql
 bash: ./up2date: No such file or directory
 [EMAIL PROTECTED] var]# ./up2date mysql-server
 bash: ./up2date: No such file or directory
 [EMAIL PROTECTED]  var]# ./up2date mysql
 bash: ./up2date: No such file or directory
 [EMAIL PROTECTED]  var]#
 

Unless the up2date binary is in the current directory, leave off the './' at
the beginning.  Type the command exactly as it appears in the directions.

JM

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



Re: [PHP] Installing php and mysql on linux

2007-03-12 Thread Jonathan Kahan

http://www.die.net/doc/linux/man/man8/yum.8.html

I checked the above page on 'Yum and see no up2date command as you point 
out. However when I  tried update in the format suggested in the link, it 
still gives a command not found error.




Brad Bonkoski [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

I think up2date is *not* up2date ;-)
Google for 'yum' and all its flags for usage...

-B

Jonathan Kahan wrote:

Hi all,

I am attempting to start the mysql rpm in Red hat as a first step prior 
to downloading and activating the php-mysql rpm. I was attempting to 
follow steps based on the link below. the php rpm is loaded and activated 
as I have been able to execute php scripts. When I attempt to follow 
those directions, I get the below errors. Does anyone know why I got the 
below errors or can help me through this process?


Thanks

http://kbase.redhat.com/faq/FAQ_39_3633.shtm


[EMAIL PROTECTED] var]# rpm -q mysql-server
mysql-server-4.1.20-1.FC4.1
[EMAIL PROTECTED] var]# rpm -q mysql
mysql-4.1.20-1.FC4.1
[EMAIL PROTECTED]  var]# up2date mysql
bash: up2date: command not found
[EMAIL PROTECTED]  var]# up2date mysql-server
bash: up2date: command not found
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED] var]# ./up2date mysql-server
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]#


Kind Regards
Jonathan Kahan


Systems Developer
Estrin Technologies, inc.
1375 Broadway, 3rd Floor, New York, NY, 10018

Email: [EMAIL PROTECTED]
Web: http://www.estrintech.com
- Original Message - 
From: Brad Bonkoski [EMAIL PROTECTED]

To: Jonathan Kahan [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Monday, March 12, 2007 4:30 PM
Subject: Re: [PHP] Installing php and mysql on linux



I think up2date is *not* up2date ;-)
Google for 'yum' and all its flags for usage...

-B

Jonathan Kahan wrote:

Hi all,

I am attempting to start the mysql rpm in Red hat as a first step prior 
to downloading and activating the php-mysql rpm. I was attempting to 
follow steps based on the link below. the php rpm is loaded and activated 
as I have been able to execute php scripts. When I attempt to follow 
those directions, I get the below errors. Does anyone know why I got the 
below errors or can help me through this process?


Thanks

http://kbase.redhat.com/faq/FAQ_39_3633.shtm


[EMAIL PROTECTED] var]# rpm -q mysql-server
mysql-server-4.1.20-1.FC4.1
[EMAIL PROTECTED] var]# rpm -q mysql
mysql-4.1.20-1.FC4.1
[EMAIL PROTECTED]  var]# up2date mysql
bash: up2date: command not found
[EMAIL PROTECTED]  var]# up2date mysql-server
bash: up2date: command not found
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED] var]# ./up2date mysql-server
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]#


Kind Regards
Jonathan Kahan


Systems Developer
Estrin Technologies, inc.
1375 Broadway, 3rd Floor, New York, NY, 10018

Email: [EMAIL PROTECTED]
Web: http://www.estrintech.com






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



Re: [PHP] Installing php and mysql on linux

2007-03-12 Thread Alberto Ferrer

I gonna suggest something very cool: Apache Friends.

http://www.apachefriends.org/en/xampp-linux.html

Its the best option on lamp packs.

Regards.

2007/3/12, Jonathan Kahan [EMAIL PROTECTED]:

http://www.die.net/doc/linux/man/man8/yum.8.html

I checked the above page on 'Yum and see no up2date command as you point
out. However when I  tried update in the format suggested in the link, it
still gives a command not found error.



Brad Bonkoski [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I think up2date is *not* up2date ;-)
 Google for 'yum' and all its flags for usage...

 -B

 Jonathan Kahan wrote:
 Hi all,

 I am attempting to start the mysql rpm in Red hat as a first step prior
 to downloading and activating the php-mysql rpm. I was attempting to
 follow steps based on the link below. the php rpm is loaded and activated
 as I have been able to execute php scripts. When I attempt to follow
 those directions, I get the below errors. Does anyone know why I got the
 below errors or can help me through this process?

 Thanks

 http://kbase.redhat.com/faq/FAQ_39_3633.shtm


 [EMAIL PROTECTED] var]# rpm -q mysql-server
 mysql-server-4.1.20-1.FC4.1
 [EMAIL PROTECTED] var]# rpm -q mysql
 mysql-4.1.20-1.FC4.1
 [EMAIL PROTECTED]  var]# up2date mysql
 bash: up2date: command not found
 [EMAIL PROTECTED]  var]# up2date mysql-server
 bash: up2date: command not found
 [EMAIL PROTECTED]  var]# ./up2date mysql
 bash: ./up2date: No such file or directory
 [EMAIL PROTECTED] var]# ./up2date mysql-server
 bash: ./up2date: No such file or directory
 [EMAIL PROTECTED]  var]# ./up2date mysql
 bash: ./up2date: No such file or directory
 [EMAIL PROTECTED]  var]#


 Kind Regards
 Jonathan Kahan

 
 Systems Developer
 Estrin Technologies, inc.
 1375 Broadway, 3rd Floor, New York, NY, 10018
 
 Email: [EMAIL PROTECTED]
 Web: http://www.estrintech.com
- Original Message -
From: Brad Bonkoski [EMAIL PROTECTED]
To: Jonathan Kahan [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Monday, March 12, 2007 4:30 PM
Subject: Re: [PHP] Installing php and mysql on linux


I think up2date is *not* up2date ;-)
 Google for 'yum' and all its flags for usage...

 -B

 Jonathan Kahan wrote:
 Hi all,

 I am attempting to start the mysql rpm in Red hat as a first step prior
 to downloading and activating the php-mysql rpm. I was attempting to
 follow steps based on the link below. the php rpm is loaded and activated
 as I have been able to execute php scripts. When I attempt to follow
 those directions, I get the below errors. Does anyone know why I got the
 below errors or can help me through this process?

 Thanks

 http://kbase.redhat.com/faq/FAQ_39_3633.shtm


 [EMAIL PROTECTED] var]# rpm -q mysql-server
 mysql-server-4.1.20-1.FC4.1
 [EMAIL PROTECTED] var]# rpm -q mysql
 mysql-4.1.20-1.FC4.1
 [EMAIL PROTECTED]  var]# up2date mysql
 bash: up2date: command not found
 [EMAIL PROTECTED]  var]# up2date mysql-server
 bash: up2date: command not found
 [EMAIL PROTECTED]  var]# ./up2date mysql
 bash: ./up2date: No such file or directory
 [EMAIL PROTECTED] var]# ./up2date mysql-server
 bash: ./up2date: No such file or directory
 [EMAIL PROTECTED]  var]# ./up2date mysql
 bash: ./up2date: No such file or directory
 [EMAIL PROTECTED]  var]#


 Kind Regards
 Jonathan Kahan

 
 Systems Developer
 Estrin Technologies, inc.
 1375 Broadway, 3rd Floor, New York, NY, 10018
 
 Email: [EMAIL PROTECTED]
 Web: http://www.estrintech.com




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





--
bet0x - Barrahome
http://www.barrahome.com.ar

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



Re: [PHP] Installing php and mysql on linux

2007-03-12 Thread Edward Vermillion
You've either got path problems or up2date is not installed. That's  
what 'command not found' means, it can't find the 'up2date' command.


Do you just want to start the MySQL server? Or are you trying to  
update the MySQL rpm?


You should be able to start the server with a '/etc/init.d/mysql  
start', as root. If that doesn't work try 'mysqld' in place of  
'mysql'. I don't remember which one Fedora uses.


If you're trying to update the rpm then make sure you have up2date  
installed. 'rmp -qa | grep up2date' should get you something. If it  
is installed then try to ad the complete path to up2date, I can't  
remember where it is off the top of my head but '/usr/bin/up2date' or  
'/usr/sbin/up2date' should get it.


I would also suggest you either look online or get a good book on  
linux administration, especially if this system is doing anything  
important. As root you can really mess it up if you don't know what  
you're doing. And you could probably find a good used book fairly  
cheap. You shouldn't need to get the latest and greatest as the basic  
administration stuff has been relatively standard for quite a few  
years now.


Good Luck!

Ed

On Mar 12, 2007, at 3:56 PM, Jonathan Kahan wrote:


http://www.die.net/doc/linux/man/man8/yum.8.html

I checked the above page on 'Yum and see no up2date command as you  
point out. However when I  tried update in the format suggested in  
the link, it still gives a command not found error.




Brad Bonkoski [EMAIL PROTECTED] wrote in message news: 
[EMAIL PROTECTED]

I think up2date is *not* up2date ;-)
Google for 'yum' and all its flags for usage...

-B

Jonathan Kahan wrote:

Hi all,

I am attempting to start the mysql rpm in Red hat as a first step  
prior to downloading and activating the php-mysql rpm. I was  
attempting to follow steps based on the link below. the php rpm  
is loaded and activated as I have been able to execute php  
scripts. When I attempt to follow those directions, I get the  
below errors. Does anyone know why I got the below errors or can  
help me through this process?


Thanks

http://kbase.redhat.com/faq/FAQ_39_3633.shtm


[EMAIL PROTECTED] var]# rpm -q mysql-server
mysql-server-4.1.20-1.FC4.1
[EMAIL PROTECTED] var]# rpm -q mysql
mysql-4.1.20-1.FC4.1
[EMAIL PROTECTED]  var]# up2date mysql
bash: up2date: command not found
[EMAIL PROTECTED]  var]# up2date mysql-server
bash: up2date: command not found
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED] var]# ./up2date mysql-server
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]#


Kind Regards
Jonathan Kahan


Systems Developer
Estrin Technologies, inc.
1375 Broadway, 3rd Floor, New York, NY, 10018

Email: [EMAIL PROTECTED]
Web: http://www.estrintech.com
- Original Message - From: Brad Bonkoski  
[EMAIL PROTECTED]

To: Jonathan Kahan [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Monday, March 12, 2007 4:30 PM
Subject: Re: [PHP] Installing php and mysql on linux



I think up2date is *not* up2date ;-)
Google for 'yum' and all its flags for usage...

-B

Jonathan Kahan wrote:

Hi all,

I am attempting to start the mysql rpm in Red hat as a first step  
prior to downloading and activating the php-mysql rpm. I was  
attempting to follow steps based on the link below. the php rpm  
is loaded and activated as I have been able to execute php  
scripts. When I attempt to follow those directions, I get the  
below errors. Does anyone know why I got the below errors or can  
help me through this process?


Thanks

http://kbase.redhat.com/faq/FAQ_39_3633.shtm


[EMAIL PROTECTED] var]# rpm -q mysql-server
mysql-server-4.1.20-1.FC4.1
[EMAIL PROTECTED] var]# rpm -q mysql
mysql-4.1.20-1.FC4.1
[EMAIL PROTECTED]  var]# up2date mysql
bash: up2date: command not found
[EMAIL PROTECTED]  var]# up2date mysql-server
bash: up2date: command not found
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED] var]# ./up2date mysql-server
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]#


Kind Regards
Jonathan Kahan


Systems Developer
Estrin Technologies, inc.
1375 Broadway, 3rd Floor, New York, NY, 10018

Email: [EMAIL PROTECTED]
Web: http://www.estrintech.com





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



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



Re: [PHP] Installing php and mysql on linux

2007-03-12 Thread Jonathan Kahan
Your point are well taken. I was ale to follow directions from the mysql 
website to start getting mysql to work instead of the linux site which was 
the basis for my original post. Does anyone know where I can go to download 
(aside from the red hat site where i would need to gather license info) a 
php-mysql rpm?
- Original Message - 
From: Edward Vermillion [EMAIL PROTECTED]

To: Jonathan Kahan [EMAIL PROTECTED]
Cc: php Lists php-general@lists.php.net
Sent: Monday, March 12, 2007 6:27 PM
Subject: Re: [PHP] Installing php and mysql on linux


You've either got path problems or up2date is not installed. That's  what 
'command not found' means, it can't find the 'up2date' command.


Do you just want to start the MySQL server? Or are you trying to  update 
the MySQL rpm?


You should be able to start the server with a '/etc/init.d/mysql  start', 
as root. If that doesn't work try 'mysqld' in place of  'mysql'. I don't 
remember which one Fedora uses.


If you're trying to update the rpm then make sure you have up2date 
installed. 'rmp -qa | grep up2date' should get you something. If it  is 
installed then try to ad the complete path to up2date, I can't  remember 
where it is off the top of my head but '/usr/bin/up2date' or 
'/usr/sbin/up2date' should get it.


I would also suggest you either look online or get a good book on  linux 
administration, especially if this system is doing anything  important. As 
root you can really mess it up if you don't know what  you're doing. And 
you could probably find a good used book fairly  cheap. You shouldn't need 
to get the latest and greatest as the basic  administration stuff has been 
relatively standard for quite a few  years now.


Good Luck!

Ed

On Mar 12, 2007, at 3:56 PM, Jonathan Kahan wrote:


http://www.die.net/doc/linux/man/man8/yum.8.html

I checked the above page on 'Yum and see no up2date command as you 
point out. However when I  tried update in the format suggested in  the 
link, it still gives a command not found error.




Brad Bonkoski [EMAIL PROTECTED] wrote in message news: 
[EMAIL PROTECTED]

I think up2date is *not* up2date ;-)
Google for 'yum' and all its flags for usage...

-B

Jonathan Kahan wrote:

Hi all,

I am attempting to start the mysql rpm in Red hat as a first step 
prior to downloading and activating the php-mysql rpm. I was 
attempting to follow steps based on the link below. the php rpm  is 
loaded and activated as I have been able to execute php  scripts. When 
I attempt to follow those directions, I get the  below errors. Does 
anyone know why I got the below errors or can  help me through this 
process?


Thanks

http://kbase.redhat.com/faq/FAQ_39_3633.shtm


[EMAIL PROTECTED] var]# rpm -q mysql-server
mysql-server-4.1.20-1.FC4.1
[EMAIL PROTECTED] var]# rpm -q mysql
mysql-4.1.20-1.FC4.1
[EMAIL PROTECTED]  var]# up2date mysql
bash: up2date: command not found
[EMAIL PROTECTED]  var]# up2date mysql-server
bash: up2date: command not found
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED] var]# ./up2date mysql-server
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]#


Kind Regards
Jonathan Kahan


Systems Developer
Estrin Technologies, inc.
1375 Broadway, 3rd Floor, New York, NY, 10018

Email: [EMAIL PROTECTED]
Web: http://www.estrintech.com
- Original Message - From: Brad Bonkoski 
[EMAIL PROTECTED]

To: Jonathan Kahan [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Monday, March 12, 2007 4:30 PM
Subject: Re: [PHP] Installing php and mysql on linux



I think up2date is *not* up2date ;-)
Google for 'yum' and all its flags for usage...

-B

Jonathan Kahan wrote:

Hi all,

I am attempting to start the mysql rpm in Red hat as a first step 
prior to downloading and activating the php-mysql rpm. I was 
attempting to follow steps based on the link below. the php rpm  is 
loaded and activated as I have been able to execute php  scripts. When 
I attempt to follow those directions, I get the  below errors. Does 
anyone know why I got the below errors or can  help me through this 
process?


Thanks

http://kbase.redhat.com/faq/FAQ_39_3633.shtm


[EMAIL PROTECTED] var]# rpm -q mysql-server
mysql-server-4.1.20-1.FC4.1
[EMAIL PROTECTED] var]# rpm -q mysql
mysql-4.1.20-1.FC4.1
[EMAIL PROTECTED]  var]# up2date mysql
bash: up2date: command not found
[EMAIL PROTECTED]  var]# up2date mysql-server
bash: up2date: command not found
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED] var]# ./up2date mysql-server
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]#


Kind Regards
Jonathan Kahan

Re: [PHP] Installing php and mysql on linux

2007-03-12 Thread Edward Vermillion

http://rpmfind.net/linux/RPM/

Has all the rpm's for all the distros. How did you get FC4 on the  
computer? The disks should have the base rpm's for all of this, or  
you can download the ISO's from the fedora site. I *think* there's a  
gnome program in there somewhere that's kinda like the Windows Add/ 
Remove Programs thing, but I don't remember the name of it. But it  
used to let you pick something to install and then it would pull all  
the necessary bits off of the disks. 'yum' will do that for you over  
the internet also, I think. You can do a 'man yum' in a terminal and  
get some of the details of how that works, if you have it installed.


Ed


On Mar 12, 2007, at 5:40 PM, Jonathan Kahan wrote:

Your point are well taken. I was ale to follow directions from the  
mysql website to start getting mysql to work instead of the linux  
site which was the basis for my original post. Does anyone know  
where I can go to download (aside from the red hat site where i  
would need to gather license info) a php-mysql rpm?
- Original Message - From: Edward Vermillion  
[EMAIL PROTECTED]

To: Jonathan Kahan [EMAIL PROTECTED]
Cc: php Lists php-general@lists.php.net
Sent: Monday, March 12, 2007 6:27 PM
Subject: Re: [PHP] Installing php and mysql on linux


You've either got path problems or up2date is not installed.  
That's  what 'command not found' means, it can't find the  
'up2date' command.


Do you just want to start the MySQL server? Or are you trying to   
update the MySQL rpm?


You should be able to start the server with a '/etc/init.d/mysql   
start', as root. If that doesn't work try 'mysqld' in place of   
'mysql'. I don't remember which one Fedora uses.


If you're trying to update the rpm then make sure you have up2date  
installed. 'rmp -qa | grep up2date' should get you something. If  
it  is installed then try to ad the complete path to up2date, I  
can't  remember where it is off the top of my head but '/usr/bin/ 
up2date' or '/usr/sbin/up2date' should get it.


I would also suggest you either look online or get a good book on   
linux administration, especially if this system is doing anything   
important. As root you can really mess it up if you don't know  
what  you're doing. And you could probably find a good used book  
fairly  cheap. You shouldn't need to get the latest and greatest  
as the basic  administration stuff has been relatively standard  
for quite a few  years now.


Good Luck!

Ed

On Mar 12, 2007, at 3:56 PM, Jonathan Kahan wrote:


http://www.die.net/doc/linux/man/man8/yum.8.html

I checked the above page on 'Yum and see no up2date command as  
you point out. However when I  tried update in the format  
suggested in  the link, it still gives a command not found error.




Brad Bonkoski [EMAIL PROTECTED] wrote in message news:  
[EMAIL PROTECTED]

I think up2date is *not* up2date ;-)
Google for 'yum' and all its flags for usage...

-B

Jonathan Kahan wrote:

Hi all,

I am attempting to start the mysql rpm in Red hat as a first  
step prior to downloading and activating the php-mysql rpm. I  
was attempting to follow steps based on the link below. the php  
rpm  is loaded and activated as I have been able to execute  
php  scripts. When I attempt to follow those directions, I get  
the  below errors. Does anyone know why I got the below errors  
or can  help me through this process?


Thanks

http://kbase.redhat.com/faq/FAQ_39_3633.shtm


[EMAIL PROTECTED] var]# rpm -q mysql-server
mysql-server-4.1.20-1.FC4.1
[EMAIL PROTECTED] var]# rpm -q mysql
mysql-4.1.20-1.FC4.1
[EMAIL PROTECTED]  var]# up2date mysql
bash: up2date: command not found
[EMAIL PROTECTED]  var]# up2date mysql-server
bash: up2date: command not found
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED] var]# ./up2date mysql-server
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]# ./up2date mysql
bash: ./up2date: No such file or directory
[EMAIL PROTECTED]  var]#


Kind Regards
Jonathan Kahan

-- 
--

Systems Developer
Estrin Technologies, inc.
1375 Broadway, 3rd Floor, New York, NY, 10018
-- 
--

Email: [EMAIL PROTECTED]
Web: http://www.estrintech.com
- Original Message - From: Brad Bonkoski  
[EMAIL PROTECTED]

To: Jonathan Kahan [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Monday, March 12, 2007 4:30 PM
Subject: Re: [PHP] Installing php and mysql on linux



I think up2date is *not* up2date ;-)
Google for 'yum' and all its flags for usage...

-B

Jonathan Kahan wrote:

Hi all,

I am attempting to start the mysql rpm in Red hat as a first  
step prior to downloading and activating the php-mysql rpm. I  
was attempting to follow steps based on the link below. the php  
rpm  is loaded and activated as I have been able to execute  
php  scripts. When I attempt to follow those directions, I

[PHP] Re: PHP and mySQL dates

2006-09-13 Thread Colin Guthrie

 SELECT id FROM dates WHERE FROM_UNIXTIME($date_string) = date
 
 then
 
 SELECT id FROM dates WHERE UNIX_TIMESTAMP(date) = $date_string
 
 neither is working. Am I making some fundamental error here or missing
 something? Any help appreciated!

I know yui've alreayd solved this, but for what it's worth, the first
form of statement is preferred to the second.

In the second you are applying a MYSQL function to a field which will
have to be repeated many times, in the first, you are applying a MYSQL
function to a constant which only has to be computed once.

Even now you have the solution, it may be worth considering the order of
your check and if possible use the MYSQL function ont he constant not
the field to get the additional performance gain.

Col.

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



[PHP] Re: PHP and mySQL getting smashed...

2006-05-18 Thread Robert Samuel White
Upgrade your MySQL distribution to the latest version (5+).

 

Upgrade any shared MySQL libraries to the latest distribute.

 

Recompile MySQL with mysqli support.

 

http://php.net/mysqli

 

And use that instead of the regular MySQL functions.

 

That's what I did and it has made a huge difference.

 

Not to mention, the mysqli library has so many more functions available to
you.

 

~Samuel

 

 



[PHP] submission PHP code : MYSQL command lines translation

2005-07-19 Thread Alessandro Rosa
Dear All subscribers,
 
my intention, through this e-mail, is to submit to your attentions one PHP class
devoted to translate input native language commands for database into MYSQL
commands lines.

Download the code from:
http://freeweb.supereva.com/malilla/Mirror/Download/Code/Php/php_mysql_translator.zip

or ask it to me.

The goal of this class is to provide a comfortable code interface to let 
programmers
implement forms within their programs so that customers/users can input
self-defined command lines and reach their own queries.

Programmers can freely implement as they want. For example, one suggested way
is evidently prompt-like, so that customers can use the program to get their 
queries.

Purposes of this class and everything related is contained in the file 
readme.html

I do not know lots of forums, but if you like this code you might also post it
to other national PHP forums.

I hope the forums I sent provide attachments sending too, otherwise feel free
to ask me to send you the related PHP code.

I look forward to your feedbacks.

Alessandro Rosa


[PHP] submission PHP code : MYSQL command lines translation

2005-07-19 Thread Alessandro Rosa
Dear All subscribers,
 
my intention, through this e-mail, is to submit to your attentions one PHP class
devoted to translate input native language commands for database into MYSQL
commands lines.

The goal of this class is to provide a comfortable code interface to let 
programmers
implement forms within their programs so that customers/users can input
self-defined command lines and reach their own queries.

Programmers can freely implement as they want. For example, one suggested way
is evidently prompt-like, so that customers can use the program to get their 
queries.

Purposes of this class and everything related is contained in the file 
readme.html

I do not know lots of forums, but if you like this code you might also post it
to other national PHP forums.

I hope the forums I sent provide attachments sending too, otherwise feel free
to ask me to send you the related PHP code.

I look forward to your feedbacks.

Alessandro Rosa


[PHP] building php, using mysql for apache2

2005-06-01 Thread bruce
hi...

trying to build php4 with mysql4.1-12, for use in apache2. i have the
following ./compile that works for php5. however, when i try to use it for
php4, i get a msg, stating that it can't find the MySQL Headers...

can anybody provide any pointers as far as what the Headers are for mysql,
and where they'd be located? if i knew the files, i could do a search to
find where they're located.

--
./configure --with-apxs2=/usr/sbin/apxs --with-mysql=/usr/bin/mysql_config
--

thanks

-bruce
[EMAIL PROTECTED]

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



Re: [PHP] building php, using mysql for apache2

2005-06-01 Thread Steve Brown
 trying to build php4 with mysql4.1-12, for use in apache2. i have the
 following ./compile that works for php5. however, when i try to use it for
 php4, i get a msg, stating that it can't find the MySQL Headers...

From http://us3.php.net/manual/en/ref.mysql.php:

===
 For compiling, simply use the --with-mysql[=DIR]  configuration
option where the optional [DIR] points to the MySQL installation
directory.

This MySQL extension doesn't support full functionality of MySQL
versions greater than 4.1.0. For that, use MySQLi.

If you would like to install the mysql extension along with the mysqli
extension you have to use the same client library to avoid any
conflicts.
===

PHP4 doesn't support the mysqli extension, so you must compile PHP w/
--with-mysql=/your/mysql/prefix/dir

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



Re: [PHP] building php, using mysql for apache2

2005-06-01 Thread Richard Lynch
--with-mysql is supposed to be the directory in which configure can find
the mysql header (.h) files and the mysql library (mysql.so) underneath
that directory.

/usr/bin/mysql_config is a program -- a binary if you will

It's incredibly unlikely that your MySQL header files and the mysql.so
library are in files underneath this binary, which isn't even a directory,
much less the directory where your header and library files are living...

Try --with-mysql=/usr  or --with-mysql=/usr/local or...

Do this:
locate mysql.h
locate mysql.so

Then find the common portion of the directories where those files live.

Silly Example:
/elephant/snake/tiger/mysql.h
/elephant/gorilla/pume/mysql.so

You should use --with-mysql=/elephant because that's the common portion.

In theory, configure will dig around in there and find the files it needs.

In reality, it expects them to be in directories like 'include' and 'lib'
with maybe an intervening directory like 'local' somewhere in the mess...

On Wed, June 1, 2005 5:13 am, bruce said:
 hi...

 trying to build php4 with mysql4.1-12, for use in apache2. i have the
 following ./compile that works for php5. however, when i try to use it
 for
 php4, i get a msg, stating that it can't find the MySQL Headers...

 can anybody provide any pointers as far as what the Headers are for mysql,
 and where they'd be located? if i knew the files, i could do a search to
 find where they're located.

 --
 ./configure --with-apxs2=/usr/sbin/apxs --with-mysql=/usr/bin/mysql_config
 --

 thanks

 -bruce
 [EMAIL PROTECTED]

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




-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Re: PHP any Mysql connection- new b

2005-01-09 Thread Sagar C Nannapaneni
You didnt mentioned where your problem is and what the error that you are
getting.
check in the line

mysql_select_db (userpass);

That you have the grant and other administrative privilages to the user and
the database
you have to operate on is mysql

mysql_select_db (mysql);

Anyhow note that PHP5 has released...i dont see any good reason why u r
still using php 3.

/sagar
- Original Message -
From: M. Sokolewicz [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Saturday, January 08, 2005 9:55 PM
Subject: [PHP] Re: PHP any Mysql connection- new b


 php 3.0???!

 man, you seriously need to think about upgrading :| PHP 3 is seriously
 outdated

 - tul
 Babu wrote:

  Hi all,
 
  I am using php 3.0 and mysql and win xp.
  i want to add users to database through php page.
 
  adduser.php
  html
  FORM METHOD=post ACTION=add.php
  Real Name: INPUT TYPE=text MAXLENGTH=70 NAME=real_name SIZE=20Br
  Username: INPUT TYPE=text MAXLENGTH=70 NAME=username SIZE=20Br
  Password: Input Type=text Maxlength=70 Name=userpass Size=10Br
 
  INPUT TYPE=submit VALUE=Add INPUT type=reset VALUE=Reset
Form/form
  /tr/td/table/tr/td/table
  /body
  /html
 
  when i enter the fileds and submit ,the action is not performed, instead
add.php file is opened.
 
  add.php
  ?
 
  $ID = uniqid(userID);
 
  $db = mysql_connect(localhost,root,halfdinner);
 
  mysql_select_db (userpass);
 
  $result = mysql_query (INSERT INTO users (id, real_name, username,
password )
  VALUES ('$ID', '$real_name', '$username', '$userpass') );
  if(!$result)
 

  echo bUser not added:/b , mysql_error();
  exit;
  }
  if($result)
 

  mysql_close($db);
  print User b$username/b added sucessfully!;
  }
  else
 

  print (Wrong Password);
  }
  ?
 
  is the problem due to mysql and php connection.i am using windows xp
with apache2.
 
  i followed the steps said by someone in the previous thread.that is
adding libmysql.dll to system32 and so on. I cannot find php_mysql.dll in
php.ini.
  can some one help
 
  Thanks
  babu
 
 
 
  -
   ALL-NEW Yahoo! Messenger - all new features - even more fun!

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




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



[PHP] Re: PHP any Mysql connection- new b

2005-01-08 Thread M. Sokolewicz
php 3.0???!
man, you seriously need to think about upgrading :| PHP 3 is seriously 
outdated

- tul
Babu wrote:
Hi all,
I am using php 3.0 and mysql and win xp.
i want to add users to database through php page.
adduser.php 
html 
FORM METHOD=post ACTION=add.php 
Real Name: INPUT TYPE=text MAXLENGTH=70 NAME=real_name SIZE=20Br 
Username: INPUT TYPE=text MAXLENGTH=70 NAME=username SIZE=20Br 
Password: Input Type=text Maxlength=70 Name=userpass Size=10Br 

INPUT TYPE=submit VALUE=Add INPUT type=reset VALUE=Reset Form/form 
/tr/td/table/tr/td/table 
/body 
/html 

when i enter the fileds and submit ,the action is not performed, instead 
add.php file is opened.
add.php
? 

$ID = uniqid(userID); 

$db = mysql_connect(localhost,root,halfdinner); 

mysql_select_db (userpass); 

$result = mysql_query (INSERT INTO users (id, real_name, username, password ) 
VALUES ('$ID', '$real_name', '$username', '$userpass') ); 
if(!$result) 
{ 
echo bUser not added:/b , mysql_error(); 
exit; 
} 
if($result) 
{ 
mysql_close($db); 
print User b$username/b added sucessfully!; 
} 
else 
{ 
print (Wrong Password); 
} 
? 

is the problem due to mysql and php connection.i am using windows xp with 
apache2.
i followed the steps said by someone in the previous thread.that is adding libmysql.dll to system32 and so on. I cannot find php_mysql.dll in php.ini.
can some one help
 
Thanks
babu
   

		
-
 ALL-NEW Yahoo! Messenger - all new features - even more fun!  
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: PHP 5 MySql 4.1 issue - can't connect to mysql.sock

2004-12-20 Thread Barley
Bingo. Many thanks.


 Barley wrote:

  If I run the script from a shell prompt as root, it outputs Yes. If I
run
  as any other user, it outputs No. It also gives this error:
  Warning: mysqli_connect(): Can't connect to local MySQL server through
  socket '/var/lib/mysql/mysql.sock' (13)

 Check permissions on /var/lib/mysql. From the sockets manpage:

 NOTES
 In the Linux implementation, sockets which are visible in the filesystem
 honour the permissions of the directory they are in. Their owner, group
 and their permissions can be changed. Creation of a new socket will fail
 if the process does not have write and search (execute) permission on
 the directory the socket is created in. Connecting to the socket object
 requires read/write permission. This behavior differs from many
 BSD-derived systems which ignore permissions for Unix sockets. Portable
 programs should not rely on this feature for security.

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



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



[PHP] Re: PHP 5 MySql 4.1 issue - can't connect to mysql.sock

2004-12-19 Thread user
Barley wrote:
If I run the script from a shell prompt as root, it outputs Yes. If I run
as any other user, it outputs No. It also gives this error:
Warning: mysqli_connect(): Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (13)
Check permissions on /var/lib/mysql. From the sockets manpage:
NOTES
In the Linux implementation, sockets which are visible in the filesystem 
honour the permissions of the directory they are in. Their owner, group 
and their permissions can be changed. Creation of a new socket will fail 
if the process does not have write and search (execute) permission on 
the directory the socket is created in. Connecting to the socket object 
requires read/write permission. This behavior differs from many 
BSD-derived systems which ignore permissions for Unix sockets. Portable 
programs should not rely on this feature for security.

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


[PHP] Re: PHP 5 MySql 4.1 issue - can't connect to mysql.sock

2004-12-18 Thread Jed Smith
Try mysqli_connect(127.0.0.1, user, pass);
Then MySQLI will try to use TCP/IP as opposed to a local socket.
Jed
Barley wrote:
I am familiar with MySql, Linux and database programming in general, but I
have not used PHP very much.
On my server, I had an application running just fine under PHP 4.1 and MySql
3.23. For various reasons, I needed to move to MySql 4.1. When I did so, the
PHP application was broken. I poked around and found that I needed to
upgrade to PHP 5 to get mysqli support. I did so with no problems. I built
PHP from source on a RedHat 7.3 box.
Here's the problem: I can only connect to MySql via a PHP script if I run
that script as root. Here is the example script I have been using:
?php
$DB = mysqli_connect(localhost,user,pass);
if (! $DB) {
echo No.;
} else {
echo Yes.;
}
?
If I run the script from a shell prompt as root, it outputs Yes. If I run
as any other user, it outputs No. It also gives this error:
Warning: mysqli_connect(): Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (13)
This means I can't run PHP scripts via apache.
I can log in to mysql via the command line with user/pass without any
problems.
Apache is connecting to PHP no problem, as I have a Hello world type PHP
script running and can access it via the web.
But no PHP script can connect to MySql unless it is run as root...
Can anyone point me in the right direction? I have a feeling this is
something very simple. Thanks!
Gregg


--
 _
(_)___Jed Smith, Code Monkey
| / __|   [EMAIL PROTECTED] | [EMAIL PROTECTED]
| \__ \   +1 541 606-4145
   _/ |___/   Signed mail preferred (PGP 0x703F9124)
  |__/http://personal.jed.bz/keys/jedsmith.asc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Which PHP for MySQL 4.1

2004-11-11 Thread C.F. Scheidecker Antunes
Hello,
I would like to migrate my MySQL servers from 4.0 to 4.1.
As I use PHP as well as Java with these servers I wonder what PHP 4 
version would be compatible with MySQL 4.1.

Has anyone used MySQL 4.1 with PHP yet?
I appreciate your thoughts.
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Which PHP for MySQL 4.1

2004-11-11 Thread Jay Blanchard
[snip]
I would like to migrate my MySQL servers from 4.0 to 4.1.

As I use PHP as well as Java with these servers I wonder what PHP 4 
version would be compatible with MySQL 4.1.

Has anyone used MySQL 4.1 with PHP yet?
[/snip]

PHP 4 is compatible with MySQL 4.1. My caution to you would be using
Apache 2 as it has some quirks that haven't been worked out yet.

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



Re: [PHP] Which PHP for MySQL 4.1

2004-11-11 Thread Brent Baisley
I migrated to MySQL 4.1 about a month ago. I had some issues with PHP 
(running 4.3.6) communicating with MySQL because 4.1 implements a new 
form of communication. As I recall, I had to do something with the 
passwords in the grants table, but I forget what now. It's been working 
fine since.

On Nov 11, 2004, at 3:05 PM, C.F. Scheidecker Antunes wrote:
Hello,
I would like to migrate my MySQL servers from 4.0 to 4.1.
As I use PHP as well as Java with these servers I wonder what PHP 4 
version would be compatible with MySQL 4.1.

Has anyone used MySQL 4.1 with PHP yet?
I appreciate your thoughts.
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Which PHP for MySQL 4.1

2004-11-11 Thread Jim Wharton
You will need to use the old_password() function in MySQL 4.1 and above.
You can find out more at mysql.com

Jim


On Thu, 2004-11-11 at 15:58 -0500, Brent Baisley wrote:
 I migrated to MySQL 4.1 about a month ago. I had some issues with PHP 
 (running 4.3.6) communicating with MySQL because 4.1 implements a new 
 form of communication. As I recall, I had to do something with the 
 passwords in the grants table, but I forget what now. It's been working 
 fine since.
 
 On Nov 11, 2004, at 3:05 PM, C.F. Scheidecker Antunes wrote:
 
  Hello,
 
  I would like to migrate my MySQL servers from 4.0 to 4.1.
 
  As I use PHP as well as Java with these servers I wonder what PHP 4 
  version would be compatible with MySQL 4.1.
 
  Has anyone used MySQL 4.1 with PHP yet?
 
  I appreciate your thoughts.
 
  Thanks.
 
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 -- 
 Brent Baisley
 Systems Architect
 Landover Associates, Inc.
 Search  Advisory Services for Advanced Technology Environments
 p: 212.759.6400/800.759.0577
 

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



Re: [PHP] Which PHP for MySQL 4.1

2004-11-11 Thread Chris
The MySQL library for 4.1.x is mysqli_* ( http://www.php.net/mysqli ) , 
that's only works with PHP 5 as far as I know. The old MySQL library ( 
http://www.php.net/mysql ) Can be used with PHP 4 (any version), but it 
won't be able to connect to MySQL with a user using the new password 
system introduced in MySQL 4.1.3 . You can set a password for a MySQL 
user using the OLDPASSWORD() function, which would allow you to connect 
with the old library in PHP 4.

Chris
C.F. Scheidecker Antunes wrote:
Hello,
I would like to migrate my MySQL servers from 4.0 to 4.1.
As I use PHP as well as Java with these servers I wonder what PHP 4 
version would be compatible with MySQL 4.1.

Has anyone used MySQL 4.1 with PHP yet?
I appreciate your thoughts.
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Which PHP for MySQL 4.1

2004-11-11 Thread Chris
In my previous email OLDPASSWORD() should have been OLD_PASSWORD()
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP and MySQL Installation on Apache for Windows

2004-07-16 Thread Ciprian Constantinescu
PHP doesn't detect anything. You need to have your mysql server running and
you try with mysql_connect() or mysql_pconnect() to see if you can connect
to the server

Sean Vasey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Does anyone know how to get PHP to detect MySQL after it has been
installed and is running on an Apache 1.3.1 server for Windows? Any help
would be greatly appreciated.


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



[PHP] compiling php with mysql ver3 or 4

2004-05-31 Thread Richard Kurth
Hello ,

  How can I compile PHP so that it does not mater what version of
  mysql is installed.
  If I compile it for mysql 3.X and then upgrade mysql to ver 4
  PHP will not install.
  I get error while loading shared libraries: libmysqlclient.so.12: cannot open shared 
object file

  this is how I am compiling php  It is being compiled into Apache not
  as a DSO

./configure --prefix=/usr/php --with-mysql=/usr/
--with-config-file-path=/usr/conf
 --with-exec-dir=/usr/apache/bin --disable-debug --enable-safe-mode
 --enable-magic-quotes --enable-debugger --enable-track-vars --with-ftp 
--enable-sockets
 --enable-ftp --with-apache=../apache
make
make install  

-- 
Best regards,
 Richard  mailto:[EMAIL PROTECTED]

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



Re: [PHP] compiling php with mysql ver3 or 4

2004-05-31 Thread Rachel Rodriguez

--- Richard Kurth [EMAIL PROTECTED] wrote:
 Hello ,
 
   How can I compile PHP so that it does not mater
 what version of
   mysql is installed.
   If I compile it for mysql 3.X and then upgrade
 mysql to ver 4
   PHP will not install.
   I get error while loading shared libraries:
 libmysqlclient.so.12: cannot open shared object file
 
   this is how I am compiling php  It is being
 compiled into Apache not
   as a DSO
 
 ./configure --prefix=/usr/php --with-mysql=/usr/
 --with-config-file-path=/usr/conf
  --with-exec-dir=/usr/apache/bin --disable-debug
 --enable-safe-mode
  --enable-magic-quotes --enable-debugger
 --enable-track-vars --with-ftp --enable-sockets
  --enable-ftp --with-apache=../apache
 make
 make install  
 

I don't have a Linux box where I can test out my
suggestion to you, but here is what you can try:

1. from your php directory:  rm config.cache
2. after that command, run: make clean

That should take care of the previous PHP
installation.

Now try running your ./configure, make, and make
install as you have listed above.  

By the way, your --with-mysql=/usr/ does not look
like a complete path to your MySQL installation.  Of
course, I cannot say for sure... you know better than
I do where it is installed and what the directory is
called.



=
~Rachel




__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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



[PHP] Re: php and mysql help

2004-04-14 Thread Eric Bolikowski

Webmaster [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello i need help with mysql_create_db i found the solution once but cant
remember what it was if someone could tell me the proper way to create a
database with php and mysql i would be greatly thankfull.
Thank you.

?php

mysql_connect('user', 'pass', 'host');

$dbCreateQuery = CREATE DATABASE 'name_of_database';

mysql_query($dbCreateQuery);

?

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



[PHP] About php and mysql

2004-02-24 Thread edwardspl
Hello,

I want to know how to control php program connect to MySQL Database
System ( another computer machine ) ?

Thank a lots.

Ed.



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



Re: [PHP] About php and mysql

2004-02-24 Thread Matt Matijevich
snip
I want to know how to control php program connect to MySQL Database
System ( another computer machine ) ?
/snip

http://www.php.net/manual/en/function.mysql-connect.php 
http://www.php.net/manual/en/function.mysql-pconnect.php 

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



Re: [PHP] About php and mysql

2004-02-24 Thread edwardspl
Does older than php 4.2.2 support with this function ?

Matt Matijevich wrote:

 snip
 I want to know how to control php program connect to MySQL Database
 System ( another computer machine ) ?
 /snip

 http://www.php.net/manual/en/function.mysql-connect.php
 http://www.php.net/manual/en/function.mysql-pconnect.php

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

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



Re: [PHP] About php and mysql

2004-02-24 Thread Jason Wong
On Tuesday 24 February 2004 22:47, [EMAIL PROTECTED] wrote:
 Does older than php 4.2.2 support with this function ?

As has already been suggested, could you try reading the manual? Please?

-- 
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-general
--
/*
A great empire, like a great cake, is most easily diminished at the edges.
-- B. Franklin
*/

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



[PHP] Compiling php for MySQL and Apache 2 Newbie

2004-01-14 Thread James Marcinek
Hello Everyone,

I'm still having problems compiling the latest version of PHP. I have
several issues

- The apache 2 that was installed was from a Red Hat package. From what I
can tell it is configured in a manner that is similar to the
with-apxs2filter. The configuration file that point to this kind of
installation is already configured in apache. However there is no perl
script apxs of any kind.

My question is can somebody tell me how to set up the configure to include
apache 2 and MySQL without the apxs?

When I do a whereis mysql I get the following:

mysql: /usr/bin/mysql /usr/lib/mysql /usr/include/mysql /usr/share/mysql
/usr/share/man/man1/mysql.1.gz

When I do a whereis httpd (The RH distro uses httpd instead of apachectl
BUT it is still there as well):

httpd: /usr/sbin/httpd /etc/httpd /usr/lib/httpd
/usr/share/man/man8/httpd.8.gz

Before I was getting function not defined when I called the mysql_connect
function, now the page is blank. I can still run php scripts that do not
interact with a database with no problems.

Any help is appreciated,

Thanks

James

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



Re: [PHP] Compiling php for MySQL and Apache 2 Newbie

2004-01-14 Thread R'twick Niceorgaw
Hi James,

James Marcinek wrote:

Hello Everyone,

I'm still having problems compiling the latest version of PHP. I have
several issues

- The apache 2 that was installed was from a Red Hat package. From what I
can tell it is configured in a manner that is similar to the
with-apxs2filter. The configuration file that point to this kind of
installation is already configured in apache. However there is no perl
script apxs of any kind.

  

install httpd-devel package. I believe it contains the apxs module.

HTH
R'twick Niceorgaw

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



[PHP] Re: PHP and MySQL date

2003-12-15 Thread Justin Patrin
Cesar Aracena wrote:

Hi all,

I'm making a site and need some tables from wich I can extract date, time
and/or date/time later with PHP and I neved had very clear the way the
possible formats work with each other so my question is what is the best (or
recommended) method to store dates and/or times in a MySQL DB for PHP to
work later?
Thanks in advanced,
___
Cesar L. Aracena
Commercial Manager / Developer
ICAAM Web Solutions
2K GROUP
Neuquen, Argentina
Tel: +54.299.4774532
Cel: +54.299.6356688
E-mail: [EMAIL PROTECTED]
The best way is to use a datetime or timestamp type in MySql, depending 
on your use of it. Using MySql's types allows you to use MySql's date 
comparison and functions for queries. You can get a UNIX timestamp using 
the UNIX_TIMESTAMP() function in mysql or by using strtotime() in PHP on 
the value.

--
paperCrane Justin Patrin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP and MySQL date

2003-12-15 Thread Cesar Aracena
Thanks both of you for the answer.

I tried what both of you told me and I found very easy to use the datetime
value under MySQL and then fetch it using strtotime() as fireball at
sizzling dot com recommended at the User Contributed Notes of php.net's
function.date.php page rather than using mktime() which can output incorrect
dates.

Thankis to both and everyone.

Cesar Aracena [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
 Hi all,

 I'm making a site and need some tables from wich I can extract date, time
 and/or date/time later with PHP and I neved had very clear the way the
 possible formats work with each other so my question is what is the best
(or
 recommended) method to store dates and/or times in a MySQL DB for PHP to
 work later?

 Thanks in advanced,
 ___
 Cesar L. Aracena
 Commercial Manager / Developer
 ICAAM Web Solutions
 2K GROUP
 Neuquen, Argentina
 Tel: +54.299.4774532
 Cel: +54.299.6356688
 E-mail: [EMAIL PROTECTED]

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



Re: [PHP] Re: PHP and MySQL date

2003-12-15 Thread John W. Holmes
Cesar Aracena wrote:

I tried what both of you told me and I found very easy to use the datetime
value under MySQL and then fetch it using strtotime() as fireball at
sizzling dot com recommended at the User Contributed Notes of php.net's
function.date.php page rather than using mktime() which can output incorrect
dates.
You can also use the MySQL function DATE_FORMAT() to format the MySQL 
timestamp to your liking. It is very similar to the PHP date() function.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

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


[PHP] embedding PHP in MySQL

2003-09-18 Thread Michael Winston
I've been working on this for a few days and can't get it.

I would like to stick some php code into a sql databases and be able to 
evaluate it when it's called up.

Foe example, let's say there's some text in a table in MySql that says 
blah blah blah ? $mysql_query(SELECT * FROM X WHERE 1); 
$someothercode; ? blah blah blah blah blah.  I wan the end, 
displaying result to be: blah blah blah {executed php code} blah blah 
blah  blah.

Now, I know that eval() is involved, but I don't want it accidentally 
executing code outside the ?  ? so I need a way to pluck out bits 
of code, evaluate them, and put them back in.

Any ideas?

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


RE: [PHP] embedding PHP in MySQL

2003-09-18 Thread Javier Tacon

Instead to eval the code, try to save the query result into a new file, then execute 
this file (require_once, include).

Something like:

function executeFromQuery($query) {
  global $DB;
  $file = /tmp/temp.php;
  $code = $DB-getOne($query);
  $fh = fopen($file,w);
  fwrite($fh,$code);
  fclose($fh);
  include($file);
}

It should work.

Javier Tacón Iglesias.


-Mensaje original-
De: Michael Winston [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 18 de septiembre de 2003 17:20
Para: [EMAIL PROTECTED]
Asunto: [PHP] embedding PHP in MySQL
Importancia: Baja


I've been working on this for a few days and can't get it.

I would like to stick some php code into a sql databases and be able to 
evaluate it when it's called up.

Foe example, let's say there's some text in a table in MySql that says 
blah blah blah ? $mysql_query(SELECT * FROM X WHERE 1); 
$someothercode; ? blah blah blah blah blah.  I wan the end, 
displaying result to be: blah blah blah {executed php code} blah blah 
blah  blah.

Now, I know that eval() is involved, but I don't want it accidentally 
executing code outside the ?  ? so I need a way to pluck out bits 
of code, evaluate them, and put them back in.

Any ideas?

Thanks,
Michael

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

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



Re: [PHP] embedding PHP in MySQL

2003-09-18 Thread Marek Kilimajer
By default the evaled code is php, so you need to escape first:
eval('?'.$your_code_pulled_from_db.'?php');
Michael Winston wrote:

I've been working on this for a few days and can't get it.

I would like to stick some php code into a sql databases and be able to 
evaluate it when it's called up.

Foe example, let's say there's some text in a table in MySql that says 
blah blah blah ? $mysql_query(SELECT * FROM X WHERE 1); 
$someothercode; ? blah blah blah blah blah.  I wan the end, displaying 
result to be: blah blah blah {executed php code} blah blah blah  blah.

Now, I know that eval() is involved, but I don't want it accidentally 
executing code outside the ?  ? so I need a way to pluck out bits of 
code, evaluate them, and put them back in.

Any ideas?

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


Re: [PHP] Installing PHP with MySQL RPM version

2003-09-10 Thread Marek Kilimajer
As mysql is from an rpm, I bet it is in /usr, so use --with-mysql=/usr
Also make sure mysql-devel rpm is installed.
Mark McCulligh wrote:
I am trying to ./configure PHP 4.3.3 on a system that already has MySQL
4.0.14 on it.
In the configure line --with-mysql=/path/to/mysql were is the path for RPM
versions of MySQL. I have search the computer but it looks like the mysql
files are all over the place.  Database files are in /var/lib/mysql   BIN
files are in /usr/bin/, etc...
If you install MySQL from a RPM what path do you put in the PHP configure
line
Thanks,
Mark.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Installing PHP with MySQL RPM version

2003-09-09 Thread Mark McCulligh
I am trying to ./configure PHP 4.3.3 on a system that already has MySQL
4.0.14 on it.

In the configure line --with-mysql=/path/to/mysql were is the path for RPM
versions of MySQL. I have search the computer but it looks like the mysql
files are all over the place.  Database files are in /var/lib/mysql   BIN
files are in /usr/bin/, etc...

If you install MySQL from a RPM what path do you put in the PHP configure
line

Thanks,
Mark.

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



Re: [PHP] Installing PHP with MySQL RPM version

2003-09-09 Thread Ray Hunter
 In the configure line --with-mysql=/path/to/mysql were is the path for RPM
 versions of MySQL. I have search the computer but it looks like the mysql
 files are all over the place.  Database files are in /var/lib/mysql   BIN
 files are in /usr/bin/, etc...

use --with-mysql or --with-mysql-sock

example:

./configure --with-mysql
./configure --with-mysql-sock=/var/lib/mysql/mysql.sock

hth

--
BigDog

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



Re: [PHP] Installing PHP with MySQL RPM version

2003-09-09 Thread Mark McCulligh
Thanks,

If you just use --with-mysql it will use PHP's built-in mysql client lib
3.23.49, but I have MySQL 4.0.14 installed. Won't this make a difference.  I
want to make sure PHP is compiled this the right libraries for MySQL.

Mark.


Ray Hunter [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
  In the configure line --with-mysql=/path/to/mysql were is the path for
RPM
  versions of MySQL. I have search the computer but it looks like the
mysql
  files are all over the place.  Database files are in /var/lib/mysql
BIN
  files are in /usr/bin/, etc...

 use --with-mysql or --with-mysql-sock

 example:

 ./configure --with-mysql
 ./configure --with-mysql-sock=/var/lib/mysql/mysql.sock

 hth

 --
 BigDog

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



Re: [PHP] Installing PHP with MySQL RPM version

2003-09-09 Thread Ray Hunter
mark,

from what i understand of the configuration script it will go out and
look in various locations for the mysql libraries. If you want to
specify something then I would suggest using the --with-mysql-sock and
pass the socket file. I like to use the socket file and have always had
great success with it even for mysql 4.0

--
BigDog


On Tue, 2003-09-09 at 12:59, Mark McCulligh wrote:
 Thanks,
 
 If you just use --with-mysql it will use PHP's built-in mysql client lib
 3.23.49, but I have MySQL 4.0.14 installed. Won't this make a difference.  I
 want to make sure PHP is compiled this the right libraries for MySQL.
 
 Mark.
 
 
 Ray Hunter [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
   In the configure line --with-mysql=/path/to/mysql were is the path for
 RPM
   versions of MySQL. I have search the computer but it looks like the
 mysql
   files are all over the place.  Database files are in /var/lib/mysql
 BIN
   files are in /usr/bin/, etc...
 
  use --with-mysql or --with-mysql-sock
 
  example:
 
  ./configure --with-mysql
  ./configure --with-mysql-sock=/var/lib/mysql/mysql.sock
 
  hth
 
  --
  BigDog

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



Re: [PHP] Installing PHP with MySQL RPM version

2003-09-09 Thread Mark McCulligh
Ok,

when I compiled with --with-mysql only, phpinfo() said:
Client API version: 3.23.49

I will recompile PHP with --with-mysql-sock instead.

I want to make sure PHP is using the right MySQL Client version.

Thanks,
Mark.

Ray Hunter [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 mark,

 from what i understand of the configuration script it will go out and
 look in various locations for the mysql libraries. If you want to
 specify something then I would suggest using the --with-mysql-sock and
 pass the socket file. I like to use the socket file and have always had
 great success with it even for mysql 4.0

 --
 BigDog


 On Tue, 2003-09-09 at 12:59, Mark McCulligh wrote:
  Thanks,
 
  If you just use --with-mysql it will use PHP's built-in mysql client lib
  3.23.49, but I have MySQL 4.0.14 installed. Won't this make a
difference.  I
  want to make sure PHP is compiled this the right libraries for MySQL.
 
  Mark.
 
 
  Ray Hunter [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
In the configure line --with-mysql=/path/to/mysql were is the path
for
  RPM
versions of MySQL. I have search the computer but it looks like the
  mysql
files are all over the place.  Database files are in /var/lib/mysql
  BIN
files are in /usr/bin/, etc...
  
   use --with-mysql or --with-mysql-sock
  
   example:
  
   ./configure --with-mysql
   ./configure --with-mysql-sock=/var/lib/mysql/mysql.sock
  
   hth
  
   --
   BigDog

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



Re: [PHP] Installing PHP with MySQL RPM version

2003-09-09 Thread Brad Pauly
Mark McCulligh wrote:
when I compiled with --with-mysql only, phpinfo() said:
Client API version: 3.23.49
I will recompile PHP with --with-mysql-sock instead.
I don't think this will change the client version. It is my 
understanding that this will just tell the client to look in a specific 
place for the socket file.

I want to make sure PHP is using the right MySQL Client version.
I think you will need to specify the location using --with-mysql=[dir]. 
It is just a guess, but try --with-mysql=/usr

If you can't find where it is, one thing that might be worth considering 
is whether or not you need the 4.0 client lib. Take a look at this link:

http://www.mysql.com/doc/en/Upgrading-from-3.23.html

- Brad

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


RE: [PHP] Use PHP or MySQL for MD5 function

2003-08-26 Thread Daevid Vincent
Well, IMHO it's better to use PHP. My reasoning is this: you want to hit the
db and get out of there as quick as possible since you have limited threads.
Plus, I try to keep my code as db agnostic as possible, so that it's
portable. Having said that, if it's a quick project or something simple, I'd
probably use the mysql version just for the ease of use factor. 

If you really care, just make a program like this and do some MD5() calls in
both mysql and php to see which is faster. I'd be curious to know as well...
You'll have to modify appropriately, and only do a single MD5 check because
I think looping 1 mysql MD5 calls will be slower automatically since
there is the connection to the db and stuff to contend with, so keep that in
mind.


Daevid Vincent
http://daevid.com

--- test ---

?php
function getmicrotime(){ 
list($usec, $sec) = explode( ,microtime()); 
return ((float)$usec + (float)$sec); 
} 

$ITERATIONS = 1;

$time_start = getmicrotime();
for ($i = 1; $i  $ITERATIONS; $i++)
{
?
blah ?=$i?
?php
}
$time_end = getmicrotime();
$time1 = $time_end - $time_start;

$time_start = getmicrotime();
$tf = TRUE;
for ($i = 1; $i  $ITERATIONS; $i++)
{
echo blah .$i.\n;
}
$time_end = getmicrotime();
$time2 = $time_end - $time_start;

echo Pversion one: \t$time1 secondsP\n;
echo version two: \t$time2 secondsP\n;
?

 

 -Original Message-
 From: Sid [mailto:[EMAIL PROTECTED] 
 Sent: Monday, August 25, 2003 1:25 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Use PHP or MySQL
 
 
 Hello,
 
 This question has been lingering in my mind for some time -
 Say we have a function such as MD5, which is available on 
 both PHP and MySQL? Which is faster - the PHP version or the 
 MySQL one. Have any benchmarks been made on this? We can use 
 the same question for say... arithmetic operations, string 
 contentation...
 
 Thanks in advance.
 
 - Sid 
 

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



Re: [PHP] Use PHP or MySQL for MD5 function

2003-08-26 Thread Curt Zirzow
* Thus wrote Daevid Vincent ([EMAIL PROTECTED]):
 
 If you really care, just make a program like this and do some MD5() calls in
 both mysql and php to see which is faster. I'd be curious to know as well...
 You'll have to modify appropriately, and only do a single MD5 check because
 I think looping 1 mysql MD5 calls will be slower automatically since
 there is the connection to the db and stuff to contend with, so keep that in
 mind.
 
Another factor with this is the length of the data is for md5(). If
the data is really long there will be communication overhead, with
md5'ing with php.

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



[PHP] Use PHP or MySQL

2003-08-25 Thread Sid
Hello,

This question has been lingering in my mind for some time -
Say we have a function such as MD5, which is available on both PHP and MySQL? Which is 
faster - the PHP version or the MySQL one. Have any benchmarks been made on this? We 
can use the same question for say... arithmetic operations, string contentation...

Thanks in advance.

- Sid 


Re: [PHP] How to Authenitcate using PHP (RH9, PHP 4.3.2, MySQL 4)

2003-08-14 Thread Mukul Sabharwal
Hello,

I have a class that just does that ::

http://www.devhome.org/php/scripts/authlib.html

- Original Message - 
From: Matt Babineau [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 12, 2003 8:30 AM
Subject: [PHP] How to Authenitcate using PHP (RH9, PHP
4.3.2, MySQL 4)


 Hi All-
 
 I was wondering if anyone had any suggestions on how
to properly
 authenticate users using redhat php and mysql.
Currently we are using
 .htaccess files, but I was thinking it may be easier
to manage this via
 a php/mysql admin interface... I imagine plenty of
authentication
 schemes have been put in place but which one might
be the best?
 Opinions?
 
 Thanks,
 Matt
 
 


=
Mukul Sabharwal ([EMAIL PROTECTED])

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] How to Authenitcate using PHP (RH9, PHP 4.3.2, MySQL 4)

2003-08-14 Thread Justin French
best is a subjective word, but I believe the best one for my needs 
was one I wrote myself.  the best one for you will probably be the same 
scenario, but i can tell you I started with a script written by kevin 
yank on sitepoint, and built it up and around from there:

http://www.sitepoint.com/article/319

Justin

On Tuesday, August 12, 2003, at 11:30  PM, Matt Babineau wrote:

I was wondering if anyone had any suggestions on how to properly
authenticate users using redhat php and mysql. Currently we are using
.htaccess files, but I was thinking it may be easier to manage this via
a php/mysql admin interface... I imagine plenty of authentication
schemes have been put in place but which one might be the best?
Opinions?


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


[PHP] How to Authenitcate using PHP (RH9, PHP 4.3.2, MySQL 4)

2003-08-14 Thread Matt Babineau
Hi All-

I was wondering if anyone had any suggestions on how to properly
authenticate users using redhat php and mysql. Currently we are using
.htaccess files, but I was thinking it may be easier to manage this via
a php/mysql admin interface... I imagine plenty of authentication
schemes have been put in place but which one might be the best?
Opinions?

Thanks,
Matt


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



[PHP] Re: PHP and MYSQL

2003-07-07 Thread Cybot
Here is the script for what it's worth.
...
body bgcolor=#FF text=#00
h2IS IT WORKING?/h2
plt;?php
 phpinfo();
?gt; /p
/body
/html
and the result is
IS IT WORKING?
?php phpinfo(); ?

are your trying to fool the list?

whate else do you expect than  when you write gt; ??

would ASP work if your write lt;% [ASP-CODE] %gt; ??

i think not,

in short just write  and  rather then lt; and gt;

html
body bgcolor=#FF text=#00
h2IS IT WORKING?/h2
p?php
 phpinfo();
? /p
/body
/html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP and MYSQL

2003-07-07 Thread jsWalter

Bob G [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Please help I am going quite mad.

 ... The PHP.INI file is in the PHP directory.

the php.ini in your PHP directory is useless

It needs to be in 1 of 3 places...
 1) the IIS root directory, meaning where IIS EXE is at,
*not* the web root
 2) C:\WINNT (or where ever your system directory is called)
 3) C:\php4 (this is HARD CODED as a last resort)

I have mine in my web server directory *and* in my PHP directory.

That way I can run it via web server or command line.

Walter





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



[PHP] Re: php caches mysql connections to same host

2003-06-24 Thread dorgon
for better understanding:

phpCode
  $conn1 = mysql_connect(localhost, user, pwd);
  mysql_select_db(database1, $conn1);
  $conn2 = mysql_connect(localhost, user, pwd);
  mysql_select_db(database2, $conn2); // select two diff. DBs
  echo $conn1.br;
  echo $conn2.br;
/phpCode
returns:
  Resource id #2
  Resource id #2
BUT:
  $conn1 = mysql_connect(127.0.0.1, user, pwd);
  mysql_select_db(database1, $conn1);
  $conn2 = mysql_connect(localhost, user, pwd);
  mysql_select_db(database2, $conn2); // select two diff. DBs
...returns two different resource IDs (which I'd like to have).

When using mysql_pconnect I'm always getting correctly different
resource ids.
/dorgon

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


Re: [PHP] Re: php caches mysql connections to same host

2003-06-24 Thread Robert Cummings

See the new_link parameter option for mysql_connect. It should solve
your problem. On the other hand, what you are doing is fine, I did it
for my pool since I can't use the new_link option because I'm retaining
compatibility back to PHP 4.1.2

Cheers,
Rob.


dorgon wrote:
 
 for better understanding:
 
 phpCode
$conn1 = mysql_connect(localhost, user, pwd);
mysql_select_db(database1, $conn1);
 
$conn2 = mysql_connect(localhost, user, pwd);
mysql_select_db(database2, $conn2); // select two diff. DBs
 
echo $conn1.br;
echo $conn2.br;
 /phpCode
 
 returns:
Resource id #2
Resource id #2
 
 BUT:
$conn1 = mysql_connect(127.0.0.1, user, pwd);
mysql_select_db(database1, $conn1);
$conn2 = mysql_connect(localhost, user, pwd);
mysql_select_db(database2, $conn2); // select two diff. DBs
 
 ...returns two different resource IDs (which I'd like to have).
 
 When using mysql_pconnect I'm always getting correctly different
 resource ids.
 
 /dorgon
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

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



[PHP] Win95 - PHP - Apache - MySQL

2003-04-04 Thread Orlando Pozo
Hello people, greet for all

I tried to install these:

Win95 as operating system
PHP as parser
Apache as Web server
Mysql as DB server

I tried to configure these platforms, and when I write http://localhost
, it doesn't work, I think the problem is the web server, but I don't
understand because I install all the applications mentioned as a package
that bring nusphere. Does Win95 have problem with this tecnologies?



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



[PHP] Win95 - PHP - Apache - MySQL

2003-04-04 Thread Orlando Pozo
Hello people, greet for all

 I tried to install these:

Win95 as operating system
 PHP as parser
 Apache as Web server
 Mysql as DB server

I tried to configure these platforms, and when I write
http://localhost
 , it doesn't work, I think the problem is the web server, but I don't
 understand because I install all the applications mentioned as a package
 that bring nusphere. Does Win95 have problem with this tecnologies?




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



Re: [PHP] Win95 - PHP - Apache - MySQL

2003-04-04 Thread Chris Hayes
At 00:56 5-4-2003, you wrote:
Hello people, greet for all

 I tried to install these:

Win95 as operating system
 PHP as parser
 Apache as Web server
 Mysql as DB server
I tried to configure these platforms, and when I write
http://localhost
 , it doesn't work, I think the problem is the web server, but I don't
 understand because I install all the applications mentioned as a package
 that bring nusphere. Does Win95 have problem with this tecnologies?
well at least win98 could handle it. have a close look at the installation 
instructions of Apache, maybe it needs something extra, but then again, 
maybe you forgot to edit your hostfile, or maybe you forgot to start 
apache? Give is some more to chew on!



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


Re: [PHP] Win95 - PHP - Apache - MySQL

2003-04-04 Thread Burhan Khalid
Chris Hayes wrote:
At 00:56 5-4-2003, you wrote:

Hello people, greet for all

 I tried to install these:

Win95 as operating system
 PHP as parser
 Apache as Web server
 Mysql as DB server
I tried to configure these platforms, and when I write
http://localhost
 , it doesn't work, I think the problem is the web server, but I don't
 understand because I install all the applications mentioned as a package
 that bring nusphere. Does Win95 have problem with this tecnologies?
well at least win98 could handle it. have a close look at the 
installation instructions of Apache, maybe it needs something extra, but 
then again, maybe you forgot to edit your hostfile, or maybe you forgot 
to start apache? Give is some more to chew on!
fwiw, I have a tutorial that shows you how to setup Apache and PHP on 
Windows, and how to setup mySQL for windows.

http://www.meidomus.com

--
Burhan Khalid
phplist[at]meidomus[dot]com


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


[PHP] Re: php and mysql

2003-03-31 Thread Tim Burden
Assuming Month_Start is stored in MySQL date format (-mm-dd) you could
Select blah blah From blah Order By DATE_FORMAT(Month_Start,%m) ASC
The %m will pad on the zeroes.

http://www.mysql.com/doc/en/Date_and_time_functions.html

- Original Message -
From: Tyler Durdin [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Monday, March 31, 2003 1:53 PM
Subject: php and mysql



 I have a db with events in it. i would like to pull the events out via
php,
 but i would like them to be ordered by month number (1-12). When I do this
 (Select blah blah From blah Order By Month_Start ASC) it orders the months
 by number, but it starts with october (month 10) I am pretty sure it is
 doing this because I have no events until april (month 4). So how can i
get
 it to order the months by their numbers starting with january (1) and
going
 to december (12) even if I do not have events until april (4)?




 _
 The new MSN 8: advanced junk mail protection and 2 months FREE*
 http://join.msn.com/?page=features/junkmail



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



[PHP] Part PHP part MySQL question

2003-03-08 Thread Beauford.2002
Hi,

I have a hockey database with players names in it and I want to be able to
update their stats one after the other. To be more clear - when the page is
first entered I want the first players name to automatically appear showing
his current stats (this will be in a form). Then you can update the record
and write it back to the database, then the next player will show up with
his stats showing, and the process continues until all the players have been
done. Setting up the database and forms is no problem, but I'm not sure how
I would keep count of what player has been done so the next one
automatically appears (and if there should be a power failure orWindows
crashes, or whatever else - I want the process to start at the last player
being updated - I don't want to have to start again from player one).  I'm
not sure if this is more a PHP or MySQL question - or both - so I have sent
it to both lists.

Thanks

Beauford




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



RE: [PHP] Part PHP part MySQL question

2003-03-08 Thread John W. Holmes
 I have a hockey database with players names in it and I want to be
able to
 update their stats one after the other. To be more clear - when the
page
 is
 first entered I want the first players name to automatically appear
 showing
 his current stats (this will be in a form). Then you can update the
record
 and write it back to the database, then the next player will show up
with
 his stats showing, and the process continues until all the players
have
 been
 done. Setting up the database and forms is no problem, but I'm not
sure
 how
 I would keep count of what player has been done so the next one
 automatically appears (and if there should be a power failure
orWindows
 crashes, or whatever else - I want the process to start at the last
player
 being updated - I don't want to have to start again from player one).
I'm
 not sure if this is more a PHP or MySQL question - or both - so I have
 sent
 it to both lists.

Each player has a unique number, right? Probably an auto_increment
column? Use that to your advantage. 

SELECT * FROM your_table WHERE id  {$_COOKIE['id']} ORDER BY id ASC
LIMIT 1

When you load the first player, $_COOKIE['id'] isn't set, so you'll get
the player with the lowest ID number. Now you submit the form, process
the data, and save the ID of the player you just edited into a cookie
named 'id'. Now when you run the above query, you'll get the next
highest ID number based on the last ID number you saved in a cookie.  

Keep track of the ID number in a cookie so that you'll always get the
next ID whenever you come to the site. Have a method where you can
reset the ID if you need to, also. Once the above query returns no
rows then there is no one left to edit and you'll want to reset it also.


---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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



[PHP] Installing PHP and MySQL on Linux machine

2003-03-05 Thread John Almberg
I've got both MySQL and PHP working independantly on my Linux web 
server. That is, I can view PHP web pages via Apache and I can access 
MySQL from the command line, set up databases, tables, etc.

What I can't do is get them working together.

When trying to make a connection in the usual way:

$dbh = mysql_connect( $HOSTNAME, $USER, $PASSWORD ) or die (couldn't 
connect to database\n);

I get the following error:

Fatal error: Call to undefined function: mysql_connect() in 
/var/www/html/bt/index.php on line 13

I have poured over the documents, but it looks like mysql support has 
been compiled in, so I'm not sure what's going on.

You can view my configuration (via phpinfo printout) at:

http://www.beyondtranslations.com/

Any help/advice much appreciated.

Brgds: John

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


Re: [PHP] Installing PHP and MySQL on Linux machine

2003-03-05 Thread Jason Wong
On Thursday 06 March 2003 13:32, John Almberg wrote:

You have started a new thread by taking an existing posting and replying to
it while you changed the subject.

That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a References: header that tells all recipients
which posting(s) your posting refers to. A mail client uses this information
to build a threaded view (tree view) of the postings.

With your posting style you successfully torpedoed this useful feature; your
posting shows up within an existing thread it has nothing to do with.

Always do a fresh post when you want to start a new thread. To achieve this,
click on New message instead of Reply within your mail client, and enter
the list address as the recipient. You can save the list address in your
address book for convenience.

[snip]

 I get the following error:

 Fatal error: Call to undefined function: mysql_connect() in
 /var/www/html/bt/index.php on line 13

Search the archives on the above error message for the various ways in which 
this problem can be resolved.

-- 
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-general
--
/*
Unfair animal names:

-- tsetse fly   -- bullhead
-- booby-- duck-billed platypus
-- sapsucker-- Clarence
-- Gary Larson
*/


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



Re: [PHP] Re: PHP and MySQL bug

2003-01-08 Thread Nuno Lopes
@mysql_select_db(be); // this doesn't fail, because only the second
(UPDATE) query fails. The first query (SELECT) is done!


- Original Message -
From: Marek Kilimajer [EMAIL PROTECTED]
To: Nuno Lopes [EMAIL PROTECTED]
Cc: MySQL List [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, January 07, 2003 5:06 PM
Subject: Re: [PHP] Re: PHP and MySQL bug


 @mysql_select_db(be); -- this failed
 do echo mysql_error(); to see what went wrong



 Nuno Lopes wrote:

 I done a echo of Mysql_error and it returned:
 'Nenhum banco de dados foi selecionado'
 
 (I have the mysql server in portuguese, but the translation is something
 like 'no db was selected')
 
 
 - Original Message -
 From: David Freeman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, January 05, 2003 10:29 PM
 Subject: RE: [PHP] Re: PHP and MySQL bug
 
 
 
 
   @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this
   query doesn't work
 
 Personally, I'd call it bad programming practice to do a database update
 and not check to see if it worked or not.  In this case, how are you
 determining that the query did not work?  Are you manually checking the
 database?  You don't have anything in your code to check the status of
 this query.
 
 Perhaps this might get you somewhere:
 
 $qid = @mysql_query(UPDATE d SET h = '$h' WHERE id = '$id');
 
 if (isset($qid)  mysql_affected_rows() == 1)
 {
   echo query executed;
 } else {
   echo query failed:  . mysql_error();
 }
 
 At least this way you might get some indication of where the problem is.
 
 CYA, Dave



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




Re: [PHP] Re: PHP and MySQL bug

2003-01-08 Thread Nuno Lopes
Doesn't you have any simpler answer??


Maybe installing the new version of mysql server - I have version 3.23.49 -
should do the trick



- Original Message -
From: Larry Brown [EMAIL PROTECTED]
To: Nuno Lopes [EMAIL PROTECTED]; MySQL List [EMAIL PROTECTED]
Sent: Tuesday, January 07, 2003 4:12 PM
Subject: RE: [PHP] Re: PHP and MySQL bug


 Since nobody is jumping in to say it is some simple configuration/setting
 personally my next step would be to shut down all services on the box that
 aren't absolutely necessary and stop everything in the registry under run
 and stop anything in the start folder of the start menu and run the same
 tests.  If no positive results I would uninstall php completely and clean
 any reference in the registry of it and then install with everything still
 shut down.  Retest, if no progress do the same with mysql.  These are
 radical and time-consuming methods, but it seems as though it is broken.
If
 you absolutely need this fixed fast you might resort to paying the
 developers to give you a solution, although it may end up being what I
just
 listed, or it could be some simple fix that we aren't aware of.

 Larry S. Brown
 Dimension Networks, Inc.
 (727) 723-8388

 -Original Message-
 From: Nuno Lopes [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 07, 2003 4:31 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: PHP and MySQL bug

 I have the latest version of PHP (4.3.0) as module in apache 2.0.43 and
 mysql 3.23.49.
 Everything is working fine, except this.
 With pconnect the error is the same!


 - Original Message -
 From: Larry Brown [EMAIL PROTECTED]
 To: MySQL List [EMAIL PROTECTED]
 Sent: Monday, January 06, 2003 6:28 PM
 Subject: RE: [PHP] Re: PHP and MySQL bug


  This definitely sounds like a buggy installation or there may be some
  problem with the communication between the web server and the mysqld.
Is
  the db on a different machine?  Try using mysql_pconnect instead of
 connect
  just to see what result you get.  I have read some unfavorable
statements
  about using pconnect with a large number of hits so if it works you
should
  read the comments about it on php.net.  Do a search for mysql_pconnect.
 
  Larry S. Brown
  Dimension Networks, Inc.
  (727) 723-8388
 
  -Original Message-
  From: Nuno Lopes [mailto:[EMAIL PROTECTED]]
  Sent: Monday, January 06, 2003 1:09 PM
  To: MySQL List; [EMAIL PROTECTED]
  Subject: [PHP] Re: PHP and MySQL bug
 
  The problem is if I close the connection and reopen it the query is
done,
  but if I remain with the same connection has the previous query, mysql
  returns an error.
 
 
  - Original Message -
  From: Larry Brown [EMAIL PROTECTED]
  To: MySQL List [EMAIL PROTECTED]
  Sent: Sunday, January 05, 2003 4:16 PM
  Subject: Re:PHP and MySQL bug
 
 
   Try replacing the following line...
  
   @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this query
 doesn't
   work
  
   With...
  
   $query = UPDATE d SET h='$h' WERE id='$id';
   $queryr = mysql_query($query) or die(The sql statement does not
  execute);
  
   if(mysql_affected_rows() !== 1)
   {
  die(The sql statement is successfully run however either h did not
   change or there is an internal error.  Try executing the sql from the
   command line to make sure it otherwise works.);
   }
  
   and see which is coming back.
  
  
   Larry S. Brown
   Dimension Networks, Inc.
   (727) 723-8388




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




Re: [PHP] Re: PHP and MySQL bug

2003-01-07 Thread Nuno Lopes
I have the latest version of PHP (4.3.0) as module in apache 2.0.43 and
mysql 3.23.49.
Everything is working fine, except this.
With pconnect the error is the same!


- Original Message -
From: Larry Brown [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Monday, January 06, 2003 6:28 PM
Subject: RE: [PHP] Re: PHP and MySQL bug


 This definitely sounds like a buggy installation or there may be some
 problem with the communication between the web server and the mysqld.  Is
 the db on a different machine?  Try using mysql_pconnect instead of
connect
 just to see what result you get.  I have read some unfavorable statements
 about using pconnect with a large number of hits so if it works you should
 read the comments about it on php.net.  Do a search for mysql_pconnect.

 Larry S. Brown
 Dimension Networks, Inc.
 (727) 723-8388

 -Original Message-
 From: Nuno Lopes [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 06, 2003 1:09 PM
 To: MySQL List; [EMAIL PROTECTED]
 Subject: [PHP] Re: PHP and MySQL bug

 The problem is if I close the connection and reopen it the query is done,
 but if I remain with the same connection has the previous query, mysql
 returns an error.


 - Original Message -
 From: Larry Brown [EMAIL PROTECTED]
 To: MySQL List [EMAIL PROTECTED]
 Sent: Sunday, January 05, 2003 4:16 PM
 Subject: Re:PHP and MySQL bug


  Try replacing the following line...
 
  @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this query
doesn't
  work
 
  With...
 
  $query = UPDATE d SET h='$h' WERE id='$id';
  $queryr = mysql_query($query) or die(The sql statement does not
 execute);
 
  if(mysql_affected_rows() !== 1)
  {
 die(The sql statement is successfully run however either h did not
  change or there is an internal error.  Try executing the sql from the
  command line to make sure it otherwise works.);
  }
 
  and see which is coming back.
 
 
  Larry S. Brown
  Dimension Networks, Inc.
  (727) 723-8388



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




Re: [PHP] Re: PHP and MySQL bug

2003-01-07 Thread Marek Kilimajer
@mysql_select_db(be); -- this failed
do echo mysql_error(); to see what went wrong



Nuno Lopes wrote:


I done a echo of Mysql_error and it returned:
'Nenhum banco de dados foi selecionado'

(I have the mysql server in portuguese, but the translation is something
like 'no db was selected')


- Original Message -
From: David Freeman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, January 05, 2003 10:29 PM
Subject: RE: [PHP] Re: PHP and MySQL bug


 

 @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this
 query doesn't work

Personally, I'd call it bad programming practice to do a database update
and not check to see if it worked or not.  In this case, how are you
determining that the query did not work?  Are you manually checking the
database?  You don't have anything in your code to check the status of
this query.

Perhaps this might get you somewhere:

$qid = @mysql_query(UPDATE d SET h = '$h' WHERE id = '$id');

if (isset($qid)  mysql_affected_rows() == 1)
{
 echo query executed;
} else {
 echo query failed:  . mysql_error();
}

At least this way you might get some indication of where the problem is.

CYA, Dave
   




 



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




Re: [PHP] Re: PHP and MySQL bug

2003-01-07 Thread Nuno Lopes
I'm using Windows 2000.


- Original Message -
From: Cleber [EMAIL PROTECTED]
To: Nuno Lopes [EMAIL PROTECTED]
Sent: Tuesday, January 07, 2003 10:23 AM
Subject: Re: [PHP] Re: PHP and MySQL bug


 Try add to /etc/hosts the name and ip of DB is located


 - Original Message -
 From: Nuno Lopes [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, January 07, 2003 7:31 AM
 Subject: Re: [PHP] Re: PHP and MySQL bug


  I have the latest version of PHP (4.3.0) as module in apache 2.0.43 and
  mysql 3.23.49.
  Everything is working fine, except this.
  With pconnect the error is the same!
 
 
  - Original Message -
  From: Larry Brown [EMAIL PROTECTED]
  To: MySQL List [EMAIL PROTECTED]
  Sent: Monday, January 06, 2003 6:28 PM
  Subject: RE: [PHP] Re: PHP and MySQL bug
 
 
   This definitely sounds like a buggy installation or there may be some
   problem with the communication between the web server and the mysqld.
 Is
   the db on a different machine?  Try using mysql_pconnect instead of
  connect
   just to see what result you get.  I have read some unfavorable
 statements
   about using pconnect with a large number of hits so if it works you
 should
   read the comments about it on php.net.  Do a search for
mysql_pconnect.
  
   Larry S. Brown
   Dimension Networks, Inc.
   (727) 723-8388
  
   -Original Message-
   From: Nuno Lopes [mailto:[EMAIL PROTECTED]]
   Sent: Monday, January 06, 2003 1:09 PM
   To: MySQL List; [EMAIL PROTECTED]
   Subject: [PHP] Re: PHP and MySQL bug
  
   The problem is if I close the connection and reopen it the query is
 done,
   but if I remain with the same connection has the previous query, mysql
   returns an error.
  
  
   - Original Message -
   From: Larry Brown [EMAIL PROTECTED]
   To: MySQL List [EMAIL PROTECTED]
   Sent: Sunday, January 05, 2003 4:16 PM
   Subject: Re:PHP and MySQL bug
  
  
Try replacing the following line...
   
@MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this query
  doesn't
work
   
With...
   
$query = UPDATE d SET h='$h' WERE id='$id';
$queryr = mysql_query($query) or die(The sql statement does not
   execute);
   
if(mysql_affected_rows() !== 1)
{
   die(The sql statement is successfully run however either h did
not
change or there is an internal error.  Try executing the sql from
the
command line to make sure it otherwise works.);
}
   
and see which is coming back.
   
   
Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388



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




Re: [PHP] Re: PHP and MySQL bug

2003-01-06 Thread Nuno Lopes
I done a echo of Mysql_error and it returned:
'Nenhum banco de dados foi selecionado'

(I have the mysql server in portuguese, but the translation is something
like 'no db was selected')


- Original Message -
From: David Freeman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, January 05, 2003 10:29 PM
Subject: RE: [PHP] Re: PHP and MySQL bug



   @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this
   query doesn't work

 Personally, I'd call it bad programming practice to do a database update
 and not check to see if it worked or not.  In this case, how are you
 determining that the query did not work?  Are you manually checking the
 database?  You don't have anything in your code to check the status of
 this query.

 Perhaps this might get you somewhere:

 $qid = @mysql_query(UPDATE d SET h = '$h' WHERE id = '$id');

 if (isset($qid)  mysql_affected_rows() == 1)
 {
   echo query executed;
 } else {
   echo query failed:  . mysql_error();
 }

 At least this way you might get some indication of where the problem is.

 CYA, Dave



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




[PHP] Re: PHP and MySQL bug

2003-01-06 Thread Nuno Lopes
The problem is if I close the connection and reopen it the query is done,
but if I remain with the same connection has the previous query, mysql
returns an error.


- Original Message -
From: Larry Brown [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Sunday, January 05, 2003 4:16 PM
Subject: Re:PHP and MySQL bug


 Try replacing the following line...

 @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this query doesn't
 work

 With...

 $query = UPDATE d SET h='$h' WERE id='$id';
 $queryr = mysql_query($query) or die(The sql statement does not
execute);

 if(mysql_affected_rows() !== 1)
 {
die(The sql statement is successfully run however either h did not
 change or there is an internal error.  Try executing the sql from the
 command line to make sure it otherwise works.);
 }

 and see which is coming back.


 Larry S. Brown
 Dimension Networks, Inc.
 (727) 723-8388




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




[PHP] Re: PHP and MySQL bug

2003-01-06 Thread Jennifer Goodie
It would be helpful if you posted that error.  You can get it by changing
the die to

$queryr = mysql_query($query) or die(mysql_error());

Without knowing the error, you problem will be harder for everyone to debug.


-Original Message-
From: Nuno Lopes [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 10:09 AM
To: MySQL List; [EMAIL PROTECTED]
Subject: Re: PHP and MySQL bug

The problem is if I close the connection and reopen it the query is done,
but if I remain with the same connection has the previous query, mysql
returns an error.


- Original Message -
From: Larry Brown [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Sunday, January 05, 2003 4:16 PM
Subject: Re:PHP and MySQL bug


 Try replacing the following line...

 @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this query doesn't
 work

 With...

 $query = UPDATE d SET h='$h' WERE id='$id';
 $queryr = mysql_query($query) or die(The sql statement does not
execute);

 if(mysql_affected_rows() !== 1)
 {
die(The sql statement is successfully run however either h did not
 change or there is an internal error.  Try executing the sql from the
 command line to make sure it otherwise works.);
 }

 and see which is coming back.


 Larry S. Brown
 Dimension Networks, Inc.
 (727) 723-8388




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


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




[PHP] Re: PHP and MySQL bug

2003-01-05 Thread Nuno Lopes
Here is the source code:

?
@MYSQL_CONNECT(localhost, nlopes, testing) or die(Erro 1);
@mysql_select_db(be);
$r=MYSQL_QUERY(SELECT n,u,m,h FROM d WHERE id='$id');
if (mysql_num_rows($r)==0) {
die (Erro);
} else {
$re=mysql_fetch_array($r, MYSQL_NUM);
$nome=$re[0];
$url=$re[1];
$mirrors=$re[2];
$h=$re[3];
$h++;
@MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this query doesn't
work
echo h2Seleccione a localização para o download:/h2pa
href=\$url\Localização Principal/a/p;
if ($mirrors) {
echo pnbsp;/ph2Mirrors/h2p;
$m=explode(»,$mirrors);
foreach ($m as $v) {
$m2=explode(!,$v);
echo a href=\$m2[1]\$m2[0]/abr;
}
echo /ppNota: Deve escolher o mirror mais próximo da sua localização,
para acelerar o dowload. No caso de um mirror estar indisponível, utilize
outro./p;
}
}
@MYSQL_CLOSE();
?/body/html



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




RE: [PHP] Re: PHP and MySQL bug

2003-01-05 Thread David Freeman

  @MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id'); // this
  query doesn't work

Personally, I'd call it bad programming practice to do a database update
and not check to see if it worked or not.  In this case, how are you
determining that the query did not work?  Are you manually checking the
database?  You don't have anything in your code to check the status of
this query.

Perhaps this might get you somewhere:

$qid = @mysql_query(UPDATE d SET h = '$h' WHERE id = '$id');

if (isset($qid)  mysql_affected_rows() == 1)
{
  echo query executed;
} else {
  echo query failed:  . mysql_error();
}

At least this way you might get some indication of where the problem is.

CYA, Dave




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




[PHP] Re: PHP and MySQL bug

2003-01-04 Thread OrangeHairedBoy
You really should be using a $link variable...it's good habit:

$link = mysql_connect(...);
mysql_select_db( mydb , $link);
$query = mysql_query( select... , $link );
$result = mysql_fetch_array($query);

Lewis

Nuno Lopes [EMAIL PROTECTED] wrote in message
003a01c2b3de$95004650$0100a8c0@pc07653">news:003a01c2b3de$95004650$0100a8c0@pc07653...
 Dear Sirs,

 I'm using PHP and MySQL to make my programs. But I think I discovered a
bug
 in PHP or in MySQL (I don't know!).

 In one of my files I have the following:

 MYSQL_CONNECT(localhost, **user**, **pass**);
 mysql_select_db(be);
 $r=MYSQL_QUERY(SELECT n,u,m,h FROM d WHERE id='$id');

 /* Some code including mysql_num_rows and mysql_fetch_array($r,
 MYSQL_NUM)
 And the another query:
 */

 MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id');

 /* i don't know why but this doesn't work! But if I close the connection
and
 open another te query is done:*/

 MYSQL_CLOSE();
 MYSQL_CONNECT(localhost, **user**, **pass**);
 mysql_select_db(be);
 MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id');

 ---
 I don't know why is this? Because I'm used to do more than a query per
 connection and this never happened!
 I'm using Win 2k, Apache 2.0.43, MySQL 3.23.49-nt and PHP 4.3.


 I hope you solve this,
 Nuno Lopes





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




Re: [PHP] Re: PHP and MySQL bug

2003-01-04 Thread Michael J. Pawlowsky

Personally I say get yourself a good simple dbconnect class and make life easy.
Also if you ever change users, database name etc, you onlu have one place to replace 
it in your code.

I wrote mine based on http://www.vtwebwizard.com/tutorials/mysql/

Take a look at it.  Nice and simple.


Mike



*** REPLY SEPARATOR  ***

On 04/01/2003 at 1:09 PM OrangeHairedBoy wrote:

You really should be using a $link variable...it's good habit:

$link = mysql_connect(...);
mysql_select_db( mydb , $link);
$query = mysql_query( select... , $link );
$result = mysql_fetch_array($query);




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




Re: [PHP] Re: PHP and MySQL bug

2003-01-04 Thread Michael J. Pawlowsky

Personally I think the problem lies somewhere between the chair and the keyboard

(Sorry, couldn't resist)  :-)



*** REPLY SEPARATOR  ***

On 04/01/2003 at 4:58 PM Stefan Hinz, iConnect (Berlin) wrote:

It doesn't work because of the /* Some code including ... */ part ;-)





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




[PHP] Re: PHP and MySQL bug

2003-01-04 Thread Stefan Hinz, iConnect \(Berlin\)
Nuno,

 $r=MYSQL_QUERY(SELECT n,u,m,h FROM d WHERE id='$id');

 /* Some code including mysql_num_rows and mysql_fetch_array($r,
 MYSQL_NUM)
 And the another query:
 */

 MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id');

 /* i don't know why but this doesn't work!*/

It doesn't work because of the /* Some code including ... */ part ;-)

First thing, I would check if $h and $id really are what you expect them
to be, like:

$sql = UPDATE d SET h='$h' WHERE id='$id';
echo $sql;
MYSQL_QUERY($sql);

If this part is okay, then the problem lies within this myterious /*
Some code */.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  Geschäftsführer / CEO iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

- Original Message -
From: Nuno Lopes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, January 04, 2003 11:46 AM
Subject: PHP and MySQL bug


 Dear Sirs,

 I'm using PHP and MySQL to make my programs. But I think I discovered
a bug
 in PHP or in MySQL (I don't know!).

 In one of my files I have the following:

 MYSQL_CONNECT(localhost, **user**, **pass**);
 mysql_select_db(be);
 $r=MYSQL_QUERY(SELECT n,u,m,h FROM d WHERE id='$id');

 /* Some code including mysql_num_rows and mysql_fetch_array($r,
 MYSQL_NUM)
 And the another query:
 */

 MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id');

 /* i don't know why but this doesn't work! But if I close the
connection and
 open another te query is done:*/

 MYSQL_CLOSE();
 MYSQL_CONNECT(localhost, **user**, **pass**);
 mysql_select_db(be);
 MYSQL_QUERY(UPDATE d SET h='$h' WHERE id='$id');

 ---
 I don't know why is this? Because I'm used to do more than a query per
 connection and this never happened!
 I'm using Win 2k, Apache 2.0.43, MySQL 3.23.49-nt and PHP 4.3.


 I hope you solve this,
 Nuno Lopes



 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



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




[PHP] RE: [PHP-DB] MySQL Insert Select statement

2002-10-19 Thread John W. Holmes
That's how you do it. Hopefully you've figured it out already. 

 

---John Holmes.

 

-Original Message-
From: dwalker [mailto:dwalker;healthyproductsplus.com] 
Sent: Saturday, October 19, 2002 7:51 PM
To: professional php; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Insert Select statement

 

While reading the MySQL manual for INSERT SELECT, I was not able to
determine how to include all 5 fields of one table into another table
(containing 100 fields) into SPECIFIC data fields.  Do I need to
explicitly list all the fields within the table of 5 fields?  If so,
would the statement be:

 

INSERT INTO Products
(ProductName,Size,SuggestedRetailPrice,ProductCategory,ManufacturerName)

SELECT(kalproduct.Product, kalproduct.size, kalproduct.SRP,
kalproduct.Cat, kalproduct.manname)

FROM kalproduct 

;

 

 

 

Thanking you in advance.

 

P.S.  I'd give it a try, but I'm trying to move 500 partial records into
a table containing at least 2000 records -- didn't want to start from
scratch.

 

 

 

 

 

 

 

 

 

 

This email message and all attachments transmitted herewith are trade
secret and/or confidential information intended only for the
 viewing and use of addressee.  If the reader of this message
 is not the intended recipient, you are hereby notified that 
any review, use, communication, dissemination, distribution 
or copying of this communication is prohibited.  If you have 
received this communication is error, please notify the sender 
immediately by telephone or electronic mail, and delete this 
message and all copies and backups thereof.  

 

Thank you for your cooperation.




  1   2   >