Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-11 Thread Shawn McKenzie

Rahul P wrote:

Ok I removed mysql using yum remove mysql. But is there a special way to
tell yum to install that version of mysql?

On Sun, May 11, 2008 at 12:44 AM, Rahul P <[EMAIL PROTECTED]> wrote:



On Sun, May 11, 2008 at 12:42 AM, Nathan Nobbe <[EMAIL PROTECTED]>
wrote:


On Sun, May 11, 2008 at 1:29 AM, Rahul P <[EMAIL PROTECTED]> wrote:


Oh... This is the fourth time I'm doing that except that this time yum
installed mysql6 instead of older versions... I don't see any way out other
than reinstalling the OS itself... There are so many dependency failures
I'm spending more time troubleshooting than actually coding something :)


i dont even think mysql6 is any where near ready for real usage (tho could
be wrong).  can you see if you could put 5 or 5.1 on there instead?  os
reinstall sounds painful =/

-nathan




 --
Rahul
Computer Engineering and Systems Division.
Department of Electrical Engineering and Computer Science
Robert R. McCormick School of Engineering
Northwestern University
2145 Sheridan Road, Evanston,IL60208.

Administrator: The En?gma Project
Website: http://www.enigmaportal.com







yum search mysql

Find the one that looks like mysql5 or similar and use that.

-Shawn

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



Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Nathan Nobbe
On Sun, May 11, 2008 at 1:59 AM, Rahul P <[EMAIL PROTECTED]> wrote:

> Ok. I apologize for the mix. When I'm mailing someone, I simply don't get
> Google into mind. :)
>

no problem, if it were emerge id be much more capable of helping ;)

-nathan


Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
Ok. I apologize for the mix. When I'm mailing someone, I simply don't get
Google into mind. :)

Thanks,
Rahul

On Sun, May 11, 2008 at 12:53 AM, Nathan Nobbe <[EMAIL PROTECTED]>
wrote:

> On Sun, May 11, 2008 at 1:46 AM, Rahul P <[EMAIL PROTECTED]> wrote:
>
>> Ok I removed mysql using yum remove mysql. But is there a special way to
>> tell yum to install that version of mysql?
>
>
> ahh, this is where google comes in for sure.  it looks like you could
> download an older rpm, like from mysql and use 'yum localinstall' or there
> is a way to search for older versions that are still in the yum repos.
> heres a quick link i found
>
> http://www.fedoraforum.org/forum/showthread.php?t=96684
>
> -nathan
>
>


-- 
Rahul
Computer Engineering and Systems Division.
Department of Electrical Engineering and Computer Science
Robert R. McCormick School of Engineering
Northwestern University
2145 Sheridan Road, Evanston,IL60208.

Administrator: The En?gma Project
Website: http://www.enigmaportal.com


Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Nathan Nobbe
On Sun, May 11, 2008 at 1:46 AM, Rahul P <[EMAIL PROTECTED]> wrote:

> Ok I removed mysql using yum remove mysql. But is there a special way to
> tell yum to install that version of mysql?


ahh, this is where google comes in for sure.  it looks like you could
download an older rpm, like from mysql and use 'yum localinstall' or there
is a way to search for older versions that are still in the yum repos.
heres a quick link i found

http://www.fedoraforum.org/forum/showthread.php?t=96684

-nathan


Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
Ok I removed mysql using yum remove mysql. But is there a special way to
tell yum to install that version of mysql?

On Sun, May 11, 2008 at 12:44 AM, Rahul P <[EMAIL PROTECTED]> wrote:

>
>
> On Sun, May 11, 2008 at 12:42 AM, Nathan Nobbe <[EMAIL PROTECTED]>
> wrote:
>
>> On Sun, May 11, 2008 at 1:29 AM, Rahul P <[EMAIL PROTECTED]> wrote:
>>
>>> Oh... This is the fourth time I'm doing that except that this time yum
>>> installed mysql6 instead of older versions... I don't see any way out other
>>> than reinstalling the OS itself... There are so many dependency failures
>>> I'm spending more time troubleshooting than actually coding something :)
>>
>>
>> i dont even think mysql6 is any where near ready for real usage (tho could
>> be wrong).  can you see if you could put 5 or 5.1 on there instead?  os
>> reinstall sounds painful =/
>>
>> -nathan
>>
>>
>
>
>  --
> Rahul
> Computer Engineering and Systems Division.
> Department of Electrical Engineering and Computer Science
> Robert R. McCormick School of Engineering
> Northwestern University
> 2145 Sheridan Road, Evanston,IL60208.
>
> Administrator: The En?gma Project
> Website: http://www.enigmaportal.com
>



-- 
Rahul
Computer Engineering and Systems Division.
Department of Electrical Engineering and Computer Science
Robert R. McCormick School of Engineering
Northwestern University
2145 Sheridan Road, Evanston,IL60208.

Administrator: The En?gma Project
Website: http://www.enigmaportal.com


Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
On Sun, May 11, 2008 at 12:42 AM, Nathan Nobbe <[EMAIL PROTECTED]>
wrote:

> On Sun, May 11, 2008 at 1:29 AM, Rahul P <[EMAIL PROTECTED]> wrote:
>
>> Oh... This is the fourth time I'm doing that except that this time yum
>> installed mysql6 instead of older versions... I don't see any way out other
>> than reinstalling the OS itself... There are so many dependency failures
>> I'm spending more time troubleshooting than actually coding something :)
>
>
> i dont even think mysql6 is any where near ready for real usage (tho could
> be wrong).  can you see if you could put 5 or 5.1 on there instead?  os
> reinstall sounds painful =/
>
> -nathan
>
>


-- 
Rahul
Computer Engineering and Systems Division.
Department of Electrical Engineering and Computer Science
Robert R. McCormick School of Engineering
Northwestern University
2145 Sheridan Road, Evanston,IL60208.

Administrator: The En?gma Project
Website: http://www.enigmaportal.com


Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Nathan Nobbe
On Sun, May 11, 2008 at 1:29 AM, Rahul P <[EMAIL PROTECTED]> wrote:

> Oh... This is the fourth time I'm doing that except that this time yum
> installed mysql6 instead of older versions... I don't see any way out other
> than reinstalling the OS itself... There are so many dependency failures
> I'm spending more time troubleshooting than actually coding something :)


i dont even think mysql6 is any where near ready for real usage (tho could
be wrong).  can you see if you could put 5 or 5.1 on there instead?  os
reinstall sounds painful =/

-nathan


Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
Oh... This is the fourth time I'm doing that except that this time yum
installed mysql6 instead of older versions... I don't see any way out other
than reinstalling the OS itself... There are so many dependency failures
I'm spending more time troubleshooting than actually coding something :)

On Sun, May 11, 2008 at 12:27 AM, Nathan Nobbe <[EMAIL PROTECTED]>
wrote:

> On Sun, May 11, 2008 at 1:22 AM, Rahul P <[EMAIL PROTECTED]> wrote:
>
>> Thanks. I just stopped mysql and when I try to start it again it throws
>> another set of errors:
>>
>> chown: changing ownership of `/home-public/mysql6': Operation not
>> permitted
>>
>> So I guess something is messed up completely. I wish I installed it
>> better. Now the installing is messed up I guess with all sorts of bad files.
>> I will try Google now...
>>
>> Thanks for the help... :)
>>
>
> one benefit of package managers is that they let you uninstall and
> reinstall easily.  are you using yum or apt-get ?  in your first post you
> included both the commands..  anyway, id just uninstall and reinstall it;
> should take 10 minutes or so.
>
> -nathan
>
>


-- 
Rahul
Computer Engineering and Systems Division.
Department of Electrical Engineering and Computer Science
Robert R. McCormick School of Engineering
Northwestern University
2145 Sheridan Road, Evanston,IL60208.

Administrator: The En?gma Project
Website: http://www.enigmaportal.com


Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Nathan Nobbe
On Sun, May 11, 2008 at 1:22 AM, Rahul P <[EMAIL PROTECTED]> wrote:

> Thanks. I just stopped mysql and when I try to start it again it throws
> another set of errors:
>
> chown: changing ownership of `/home-public/mysql6': Operation not permitted
>
> So I guess something is messed up completely. I wish I installed it better.
> Now the installing is messed up I guess with all sorts of bad files. I will
> try Google now...
>
> Thanks for the help... :)
>

one benefit of package managers is that they let you uninstall and reinstall
easily.  are you using yum or apt-get ?  in your first post you included
both the commands..  anyway, id just uninstall and reinstall it; should take
10 minutes or so.

-nathan


Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
Thanks. I just stopped mysql and when I try to start it again it throws
another set of errors:

chown: changing ownership of `/home-public/mysql6': Operation not permitted

So I guess something is messed up completely. I wish I installed it better.
Now the installing is messed up I guess with all sorts of bad files. I will
try Google now...

Thanks for the help... :)

On Sun, May 11, 2008 at 12:17 AM, Nathan Nobbe <[EMAIL PROTECTED]>
wrote:

> On Sun, May 11, 2008 at 1:05 AM, Rahul <[EMAIL PROTECTED]> wrote:
>
>> I have recorded both the errors by changing the variable:
>>
>> $host = "mycomputer.webaddress.com"
>>
>> PHP Warning:  mysql_connect(): Lost connection to MySQL server during
>> query in /export/home/rpo219/may/conf_global.php on line 18
>> Lost connection to MySQL server during query
>
>
> i have seen this before, but i cant recall, specifically what the problem
> could be.  i recommend google ;)
>
>
>> $host = "localhost"
>>
>> PHP Warning:  mysql_connect(): Can't connect to local MySQL server through
>> socket '/var/lib/mysql/mysql.sock' (111) in
>> /export/home/rpo219/may/conf_global.php on line 18
>> Can't connect to local MySQL server through socket
>> '/var/lib/mysql/mysql.sock'
>>
>
> i believe this is because the user root, does not have permission to
> connect to the datbase from host 'localhost', especially since you said this
> didnt work from the command line either.  you will have to add a grant
> clause to allow the root user to connect from the localhost.
>
> I found something weird for the first time:
>>
>> I tried looking at the mysql6 data directory and it says the following:
>>
>> total 28
>> drwxr-xr-x   3 nfsnobody nfsnobody 4096 May 10 23:57 .
>> drwxrwxrwx  21 root  root  4096 May  7 14:35 ..
>> -rw-rw   1 nfsnobody nfsnobody 1009 May 10 23:57
>> mycomputer.webaddress.com.err
>> drwxr-xr-x   2 nfsnobody nfsnobody 4096 Jan 24 20:07 mysql
>>
>
> that is likely the way your distribution has designed the permission scheme
> for the mysql server.
>
> And when I try to change the ownership of the directory to mysql by
>>
>> [EMAIL PROTECTED] chown mysql ./mysql6
>> chown: changing ownership of `./mysql6': Operation not permitted
>>
>
> this is probly because you dont have permission to make the change...  you
> could do it via sudo, but i wouldnt recommend it.  your distro has set it up
> this way on purpose.
>
>
>> Just thought it might be related to the problem
>
>
> have you created any databases after installing mysql?  you should create
> at least one, like test db or something, and its good practice to create a
> specific user to access the database through as well.  instead of having php
> connect as root.  thats like a hackers dream right there.
>
> -nathan
>
>


-- 
Rahul
Computer Engineering and Systems Division.
Department of Electrical Engineering and Computer Science
Robert R. McCormick School of Engineering
Northwestern University
2145 Sheridan Road, Evanston,IL60208.

Administrator: The En?gma Project
Website: http://www.enigmaportal.com


Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Nathan Nobbe
On Sun, May 11, 2008 at 1:05 AM, Rahul <[EMAIL PROTECTED]> wrote:

> I have recorded both the errors by changing the variable:
>
> $host = "mycomputer.webaddress.com"
>
> PHP Warning:  mysql_connect(): Lost connection to MySQL server during query
> in /export/home/rpo219/may/conf_global.php on line 18
> Lost connection to MySQL server during query


i have seen this before, but i cant recall, specifically what the problem
could be.  i recommend google ;)


> $host = "localhost"
>
> PHP Warning:  mysql_connect(): Can't connect to local MySQL server through
> socket '/var/lib/mysql/mysql.sock' (111) in
> /export/home/rpo219/may/conf_global.php on line 18
> Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock'
>

i believe this is because the user root, does not have permission to connect
to the datbase from host 'localhost', especially since you said this didnt
work from the command line either.  you will have to add a grant clause to
allow the root user to connect from the localhost.

I found something weird for the first time:
>
> I tried looking at the mysql6 data directory and it says the following:
>
> total 28
> drwxr-xr-x   3 nfsnobody nfsnobody 4096 May 10 23:57 .
> drwxrwxrwx  21 root  root  4096 May  7 14:35 ..
> -rw-rw   1 nfsnobody nfsnobody 1009 May 10 23:57
> mycomputer.webaddress.com.err
> drwxr-xr-x   2 nfsnobody nfsnobody 4096 Jan 24 20:07 mysql
>

that is likely the way your distribution has designed the permission scheme
for the mysql server.

And when I try to change the ownership of the directory to mysql by
>
> [EMAIL PROTECTED] chown mysql ./mysql6
> chown: changing ownership of `./mysql6': Operation not permitted
>

this is probly because you dont have permission to make the change...  you
could do it via sudo, but i wouldnt recommend it.  your distro has set it up
this way on purpose.


> Just thought it might be related to the problem


have you created any databases after installing mysql?  you should create at
least one, like test db or something, and its good practice to create a
specific user to access the database through as well.  instead of having php
connect as root.  thats like a hackers dream right there.

-nathan


Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul

I have recorded both the errors by changing the variable:

$host = "mycomputer.webaddress.com"

PHP Warning:  mysql_connect(): Lost connection to MySQL server during 
query in /export/home/rpo219/may/conf_global.php on line 18

Lost connection to MySQL server during query

$host = "localhost"

PHP Warning:  mysql_connect(): Can't connect to local MySQL server 
through socket '/var/lib/mysql/mysql.sock' (111) in 
/export/home/rpo219/may/conf_global.php on line 18
Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock'


I found something weird for the first time:

I tried looking at the mysql6 data directory and it says the following:

total 28
drwxr-xr-x   3 nfsnobody nfsnobody 4096 May 10 23:57 .
drwxrwxrwx  21 root  root  4096 May  7 14:35 ..
-rw-rw   1 nfsnobody nfsnobody 1009 May 10 23:57 
mycomputer.webaddress.com.err

drwxr-xr-x   2 nfsnobody nfsnobody 4096 Jan 24 20:07 mysql

And when I try to change the ownership of the directory to mysql by

[EMAIL PROTECTED] chown mysql ./mysql6
chown: changing ownership of `./mysql6': Operation not permitted

Just thought it might be related to the problem

Thanks,
Rahul
Rahul wrote:

Thanks a lot for your reply.

I have tried using

$host = "localhost";
$db = "dbname";
$table_main = "tablename";
$dbusername = "root";
$dbpass = "passhere";

mysql_connect($host, $dbusername, $dbpass) or die(mysql_error());

and

$host = "mycomputer.webaddress.com";
$db = "dbname";
$table_main = "tablename";
$dbusername = "root";
$dbpass = "passhere";

mysql_connect($host, $dbusername, $dbpass) or die(mysql_error());

And this mycomputer.webaddress.com works when I use with mysql like this:

mysql -h mycomputer.webaddress.com -u root -p

Thank You

Nathan Nobbe wrote:

On Sun, May 11, 2008 at 12:30 AM, Rahul <[EMAIL PROTECTED]> wrote:

I am using Fedora Core 4. As I was unable to use PHP or MySQL 
together, I
uninstalled both of them and installed again using the following 
commands:


yum install mysql

And then

apt-get install php php-devel php-gd php-imap php-ldap php-mysql 
php-odbc

php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick

And then started the mysql server.

I am able to connect to the server from the console my typing

mysql -h  -u root -p 

However, when I try to connect to mysql through PHP I get the following
errors:

PHP Warning:  mysql_query(): Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (2) in 
/export/home/rahul/may/sample.php

on line 5
PHP Warning:  mysql_query(): A link to the server could not be 
established

in /export/home/rahul/may/sample.php on line 5
Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)

Can someone please help me out?



what is the hostname you are typing at the command line and what is 
the one
you are using when trying to connect from php?  when using mysql, you 
will

have to have a separate entry for localhost connections.

-nathan



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



Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someone help me out please?

2008-05-10 Thread Nathan Nobbe
On Sun, May 11, 2008 at 12:42 AM, Rahul <[EMAIL PROTECTED]> wrote:

> Thanks a lot for your reply.
>
> I have tried using
>
> $host = "localhost";
> $db = "dbname";
> $table_main = "tablename";
> $dbusername = "root";
> $dbpass = "passhere";
>
> mysql_connect($host, $dbusername, $dbpass) or die(mysql_error());
>
> and
>
> $host = "mycomputer.webaddress.com";
> $db = "dbname";
> $table_main = "tablename";
> $dbusername = "root";
> $dbpass = "passhere";
>
> mysql_connect($host, $dbusername, $dbpass) or die(mysql_error());
>
> And this mycomputer.webaddress.com works when I use with mysql like this:
>
> mysql -h mycomputer.webaddress.com -u root -p


so, from above (previous post), it looks like the errors youve shown are
actually coming from mysql_query().  what is the result of this (using
credentials from this post and [mycomputer.webaddress.com])



Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someone help me out please?

2008-05-10 Thread Rahul

Thanks a lot for your reply.

I have tried using

$host = "localhost";
$db = "dbname";
$table_main = "tablename";
$dbusername = "root";
$dbpass = "passhere";

mysql_connect($host, $dbusername, $dbpass) or die(mysql_error());

and

$host = "mycomputer.webaddress.com";
$db = "dbname";
$table_main = "tablename";
$dbusername = "root";
$dbpass = "passhere";

mysql_connect($host, $dbusername, $dbpass) or die(mysql_error());

And this mycomputer.webaddress.com works when I use with mysql like this:

mysql -h mycomputer.webaddress.com -u root -p

Thank You

Nathan Nobbe wrote:

On Sun, May 11, 2008 at 12:30 AM, Rahul <[EMAIL PROTECTED]> wrote:


I am using Fedora Core 4. As I was unable to use PHP or MySQL together, I
uninstalled both of them and installed again using the following commands:

yum install mysql

And then

apt-get install php php-devel php-gd php-imap php-ldap php-mysql php-odbc
php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick

And then started the mysql server.

I am able to connect to the server from the console my typing

mysql -h  -u root -p 

However, when I try to connect to mysql through PHP I get the following
errors:

PHP Warning:  mysql_query(): Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (2) in /export/home/rahul/may/sample.php
on line 5
PHP Warning:  mysql_query(): A link to the server could not be established
in /export/home/rahul/may/sample.php on line 5
Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)

Can someone please help me out?



what is the hostname you are typing at the command line and what is the one
you are using when trying to connect from php?  when using mysql, you will
have to have a separate entry for localhost connections.

-nathan



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



Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someone help me out please?

2008-05-10 Thread Nathan Nobbe
On Sun, May 11, 2008 at 12:30 AM, Rahul <[EMAIL PROTECTED]> wrote:

> I am using Fedora Core 4. As I was unable to use PHP or MySQL together, I
> uninstalled both of them and installed again using the following commands:
>
> yum install mysql
>
> And then
>
> apt-get install php php-devel php-gd php-imap php-ldap php-mysql php-odbc
> php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick
>
> And then started the mysql server.
>
> I am able to connect to the server from the console my typing
>
> mysql -h  -u root -p 
>
> However, when I try to connect to mysql through PHP I get the following
> errors:
>
> PHP Warning:  mysql_query(): Can't connect to local MySQL server through
> socket '/var/lib/mysql/mysql.sock' (2) in /export/home/rahul/may/sample.php
> on line 5
> PHP Warning:  mysql_query(): A link to the server could not be established
> in /export/home/rahul/may/sample.php on line 5
> Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (2)
>
> Can someone please help me out?


what is the hostname you are typing at the command line and what is the one
you are using when trying to connect from php?  when using mysql, you will
have to have a separate entry for localhost connections.

-nathan


[PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someone help me out please?

2008-05-10 Thread Rahul
I am using Fedora Core 4. As I was unable to use PHP or MySQL together, 
I uninstalled both of them and installed again using the following commands:


yum install mysql

And then

apt-get install php php-devel php-gd php-imap php-ldap php-mysql 
php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl 
ImageMagick


And then started the mysql server.

I am able to connect to the server from the console my typing

mysql -h  -u root -p 

However, when I try to connect to mysql through PHP I get the following 
errors:


PHP Warning:  mysql_query(): Can't connect to local MySQL server through 
socket '/var/lib/mysql/mysql.sock' (2) in 
/export/home/rahul/may/sample.php on line 5
PHP Warning:  mysql_query(): A link to the server could not be 
established in /export/home/rahul/may/sample.php on line 5
Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock' (2)


Can someone please help me out?

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



Re: [PHP] Php/mysql error....why?

2003-10-24 Thread Tom Rogers
Hi,

Saturday, October 25, 2003, 2:50:46 AM, you wrote:
RA> Hi,
RA> I am running a very simple query to the database, basically select all the
RA> firms which start with 0-9,
RA> eg.
RA> 1stcompany
RA> 3isgood
RA> etc

RA> using this:
RA> $qry = "select cust_no,firm from companies where firm LIKE `%0123456789%'";

RA> It gives me this error:

RA> Error: Unknown column '0123456789%'' in 'where clause'

RA> any idea why its ignoring the LIKE statement? the funny part is LIKE is
RA> working for another program..

RA> What am i missing?

RA> Thanks,
RA> -Ryan


You have a backtick instead of a quote (`%)

-- 
regards,
Tom

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



RE: [PHP] Php/mysql error....why?

2003-10-24 Thread Dan Joseph
> `%0123456789%'";

You have a ` instead a ' before the %0123.  I believe that is what is
causing your grief.

-Dan Joseph

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



[PHP] Php/mysql error....why?

2003-10-24 Thread Ryan A
Hi,
I am running a very simple query to the database, basically select all the
firms which start with 0-9,
eg.
1stcompany
3isgood
etc

using this:
$qry = "select cust_no,firm from companies where firm LIKE `%0123456789%'";

It gives me this error:

Error: Unknown column '0123456789%'' in 'where clause'

any idea why its ignoring the LIKE statement? the funny part is LIKE is
working for another program..

What am i missing?

Thanks,
-Ryan

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



Re: [PHP] PHP & Mysql Error Code 1062 - Duplicates found

2003-06-24 Thread Jeff Harris
On Jun 25, 2003, "Ow Mun Heng" claimed that:

|Hi PHP'ers,
|
|   I've got a question regarding the input of (multiple) data into
|mysql through PHP.
|
|If there is already an entry in the database, then an mysql will generate an
|error 1062 stating that the entry is a duplicate. (This will happen only if
|I input the data through mySQL using xterm, if I use PHP, then I only get
|the 'duplicate entry found', partly cause I don't know how to get the error
|code as well as the duplicate entry returned to PHP to be output'ed to the
|browser.
|
|Below is my code. $my_query is concatenated from an array.
|
|$my_query = $my_query.
|"\n('".$SN[$i]."','".$DCM[$i]."','".$Supp[$i]."','".$time_now."'),";
|$query = "INSERT INTO pioneer(serial_no,dcm,supplier,fa_timestamp) VALUES
|$my_query;";
|$result = mysql_db_query('tracker',$query);
|
|if ($result)
|echo "".mysql_affected_rows()." Drives & DCM combo inserted into
|database.";
|else
|echo "\nDuplicate entry found. Data not inserted.";
|
|
|Can anyone help me out?
|
|
|Cheers,
|Mun Heng, Ow
|H/M Engineering
|Western Digital M'sia
|DID : 03-7870 5168
|
|--
http://marc.theaimsgroup.com/?l=php-general&m=105606491624771&w=2
-- 
Registered Linux user #304026.
"lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import"
Key fingerprint = 52FC 20BD 025A 8C13 5FC6  68C6 9CF9 46C2 B089 0FED
Responses to this message should conform to RFC 1855.



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



[PHP] PHP & Mysql Error Code 1062 - Duplicates found

2003-06-24 Thread Ow Mun Heng
Hi PHP'ers,

I've got a question regarding the input of (multiple) data into
mysql through PHP. 

If there is already an entry in the database, then an mysql will generate an
error 1062 stating that the entry is a duplicate. (This will happen only if
I input the data through mySQL using xterm, if I use PHP, then I only get
the 'duplicate entry found', partly cause I don't know how to get the error
code as well as the duplicate entry returned to PHP to be output'ed to the
browser.

Below is my code. $my_query is concatenated from an array.

$my_query = $my_query.
"\n('".$SN[$i]."','".$DCM[$i]."','".$Supp[$i]."','".$time_now."'),";
$query = "INSERT INTO pioneer(serial_no,dcm,supplier,fa_timestamp) VALUES
$my_query;"; 
$result = mysql_db_query('tracker',$query);

if ($result)
echo "".mysql_affected_rows()." Drives & DCM combo inserted into
database.";
else
echo "\nDuplicate entry found. Data not inserted.";


Can anyone help me out?


Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia 
DID : 03-7870 5168

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



Re: [PHP] php mysql error

2002-09-04 Thread Marek Kilimajer

Check file and drectory permisions.

ROBERT MCPEAK wrote:

>Our box recently went down and after reconfiguring it we're left with a
>semi-operation mySQL.  One error I'm getting is this:
>
>mysql> select region from clip_art where region is not null and
>released = 'yes' group by region;
>ERROR 1: Can't create/write to file '/tmp/#sqld0e_76_1.MYI' (Errcode:
>13)
>
>Removing the "group by" clause prevents the error.
>
>Can anybody tell me how to fix this?
>
>Thank you.
>
>
>
>  
>


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




RE: [PHP] php mysql error

2002-09-04 Thread Jay Blanchard

[snip]
Our box recently went down and after reconfiguring it we're left with a
semi-operation mySQL.  One error I'm getting is this:

mysql> select region from clip_art where region is not null and
released = 'yes' group by region;
ERROR 1: Can't create/write to file '/tmp/#sqld0e_76_1.MYI' (Errcode:
13)

Removing the "group by" clause prevents the error.
[/snip]

Using perror 13 I get;

root@myserver:/var/www/htdocs# perror 13
Error code  13:  Permission denied

So perhaps /tmp/ or #sqld0e_76_1.MYI has the wrong permissions

HTH!

Jay




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




Re: [PHP] php mysql error

2002-09-04 Thread Adam Williams

whats the permissions on /tmp?  it should be set to 1777

Adam

On Wed, 4 Sep 2002, ROBERT MCPEAK wrote:

> Our box recently went down and after reconfiguring it we're left with a
> semi-operation mySQL.  One error I'm getting is this:
>
> mysql> select region from clip_art where region is not null and
> released = 'yes' group by region;
> ERROR 1: Can't create/write to file '/tmp/#sqld0e_76_1.MYI' (Errcode:
> 13)
>
> Removing the "group by" clause prevents the error.
>
> Can anybody tell me how to fix this?
>
> Thank you.
>
>
>
>


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




[PHP] php mysql error

2002-09-04 Thread ROBERT MCPEAK

Our box recently went down and after reconfiguring it we're left with a
semi-operation mySQL.  One error I'm getting is this:

mysql> select region from clip_art where region is not null and
released = 'yes' group by region;
ERROR 1: Can't create/write to file '/tmp/#sqld0e_76_1.MYI' (Errcode:
13)

Removing the "group by" clause prevents the error.

Can anybody tell me how to fix this?

Thank you.



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




[PHP] PHP/MySQL Error Log Parser

2002-08-04 Thread Paul Maine

How can I set up MySQL error logging? Is there any PHP MySQL error log
parsers?

Thank You


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




[PHP] PHP/Mysql error handling

2001-11-04 Thread George E. Papadakis

Hi,

Is there any way to make php notify me of any errors through email?
I know it may sounds funny, but imagine having this huge site and u just
want it to run smoothly but u juct cant check it all the time . If there was
a way that php would notify u for a an error on a specific page/line that
would make debuggin much easier and without guessing..
So, is it possible?

Thanks.

-- phaistonian


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]