Re: MySQL or PHP problem?

2006-01-07 Thread Gleb Paharenko
Hello.



See:

http://dev.mysql.com/doc/refman/5.0/en/error-access-denied.html



im DeBoer [EMAIL PROTECTED] wrote:

Hi everyone,

I've recently tried installing webcalander http://www.k5n.us/webcalendar.php on

my FBSD box.

I'm using version 5.1.1 of PHP, version 5.0.17 of MySQL, and version

1.0.2of Webcalander.



I've posted for help on the webcal list and the few respondents seemed to

think it might be a mysql issue. The error message certainly makes things

appear that way anyhow.

*Warning*: mysql_pconnect()

[function.mysql-pconnecthttp://www.freebsd-geek.com/webcal/function.mysql-pconnect]:

Access denied for user 'me'@'localhost' (using password: YES) in *

/usr/www/docs/freebsd-geek.com/webcal/includes/php-dbi.php* on line *95*



WebCalendar Error



Error connecting to database:



Access denied for user 'me'@'localhost' (using password: YES)



I've checked line 95 in the file the error refers to. It doesn't appear to

be an editable variable or anything like that, it's just code.

I'm not nearly as familiar with mysql as I would like to be, so I have no

idea how to proceed from here. Can some kind soul point/handhold me in the

right direction?



Thanks.  :-)



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-30 Thread mfatene
sorry for trying to help, but if it was my problem, i would have found something
in the second url.

mathias


Selon [EMAIL PROTECTED]:

 This is very old, several years, info you've been passing along.
 Mysql switches are on by default now.  Mac OSX (Server for me) is not
 10.4 Tiger, you've posted 10.2 Jaguar info, one version prior to 10.3
 Panther which was itself released over a 18 months ago.

 Thanks anyway.  :)
 Gil


 On May 29, 2005, at 5:34 AM, [EMAIL PROTECTED] wrote:

  hi,
  php has to be configured with mysql support. see
  http://www.whoopis.com/howtos/php-mysql-osx.html
 
  and a general google search :
  http://www.google.fr/search?q=mysql+php+mac+oshl=frlr=start=30sa=N
 
  Mathias
 
 
  Selon Michael Stassen [EMAIL PROTECTED]:
 
 
  You haven't given us much to go on, other than it doesn't work,
  which
  isn't really helpful.  We can't give you specific ideas where to
  look
  until you give us specific details of what's wrong.  Please describe
  what happens.  Do you get an error message?  What is it?  While
  you're
  at it, show us the relevant lines of code (hide the password, of
  course).
 
  You say mysql, php, and apache are working separately.  I take it
  that
  php scripts are running via web access (apache)?  I ask because some
  previous Mac OS upgrades replaced the apache config with a newer one
  with php turned off.
 
  Meanwhile, the Apache user is irrelevant.  The php script just
  needs a
  valid *mysql* user and password to authenticate.
 
  bounce = restart
 
  Michael
 
  [EMAIL PROTECTED] wrote:
 
 
   From your first message below, are you suggesting a setting in
  Apache
  needs to be ticked?
  I can do it if I know where to look.  I am no expert, just one
  who  uses
  tis setup, i.e., it just works.  I have used the previous
  version for
  years and it just worked.  That's why I have no idea  what could
  possibly be different.
 
  Not to say I haven't built these before, but this should be
  working!  :(
  What's led me to this problem is that I have phpmyadmin installed
  and
  it can't access mysql as  it could just fine before.
 
  I have had help from the guys at phpmyadmin who have no sent me
  here.
  No one gets it.
 
  So, any specific ideas where to look???
 
  Thanks,
  Gil
 
  p.s. I don't know what you mean by bounce the MYSQL DB.
 
  On May 28, 2005, at 9:47 PM, sol beach wrote:
 
 
 
  I don't do MACs, but here is a shot in the dark.
  In some/many cases Apache gets invoke as user nobody;
  which would be the the OS user that needs to be granted access to
  MYSQL.
 
  I'm willing to bet that the failure to connect into MYSQL via
  PHP from
  Apache is due
  to a permissions/login/authorization issue.
 
 
 
  You also wrote:
  If you enable LOGGING  bounce the MYSQL DB, some clue about what
  is  or
  is not
  happening to MYSQL will be written to the logfile.
 
  Discern what the clues are reporting and fix the problem.
 
 
  HTH  YMMV
 
  On 5/28/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
 
  I'm on Mac OSX and Mysql is built-in, so is php.
 
  My php has built-in support for mysql.
 
  Both php and mysql are up and running.  I have tested both.
  All this
  is running on this machine, so is Apache.
 
  I can log into mysql at the CLI with my superuser and access the
  'mysql' db -the only one I currently have.
 
  I have a good php test connect script but cannot connect to mysql.
  I have checked the mysql variables and entered the socket location
  into the script, no help.
 
  What else can possibly be wrong?  Is there something in a mysql
  config file or something that is off?
 
  This is an upgrade install of Mac OSX 10.4 Server over 10.3 Server
  (I'm not a wiz) but have used it long enough.  I have changed
  nothing
  and it worked fine before.
 
  Any suggestions?  Again, I did not build this it's all built-in
  and
  working fine.  I simply can't connect with php.  Separately, mysql
  and php both work.
 
  Thanks,
  Gil
 
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 
 
 
 





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-30 Thread mfatene
re-send :

 hi,
 php has to be configured with mysql support. see
 http://www.whoopis.com/howtos/php-mysql-osx.html

 and a general google search :
 http://www.google.fr/search?q=mysql+php+mac+oshl=frlr=start=30sa=N

 Mathias


 Selon Michael Stassen [EMAIL PROTECTED]:

  You haven't given us much to go on, other than it doesn't work, which
  isn't really helpful.  We can't give you specific ideas where to look
  until you give us specific details of what's wrong.  Please describe
  what happens.  Do you get an error message?  What is it?  While you're
  at it, show us the relevant lines of code (hide the password, of course).
 
  You say mysql, php, and apache are working separately.  I take it that
  php scripts are running via web access (apache)?  I ask because some
  previous Mac OS upgrades replaced the apache config with a newer one
  with php turned off.
 
  Meanwhile, the Apache user is irrelevant.  The php script just needs a
  valid *mysql* user and password to authenticate.
 
  bounce = restart
 
  Michael
 
  [EMAIL PROTECTED] wrote:
 
From your first message below, are you suggesting a setting in  Apache
   needs to be ticked?
   I can do it if I know where to look.  I am no expert, just one who  uses
   tis setup, i.e., it just works.  I have used the previous  version for
   years and it just worked.  That's why I have no idea  what could
   possibly be different.
  
   Not to say I haven't built these before, but this should be working!  :(
   What's led me to this problem is that I have phpmyadmin installed and
   it can't access mysql as  it could just fine before.
  
   I have had help from the guys at phpmyadmin who have no sent me  here.
   No one gets it.
  
   So, any specific ideas where to look???
  
   Thanks,
   Gil
  
   p.s. I don't know what you mean by bounce the MYSQL DB.
  
   On May 28, 2005, at 9:47 PM, sol beach wrote:
  
  
   I don't do MACs, but here is a shot in the dark.
   In some/many cases Apache gets invoke as user nobody;
   which would be the the OS user that needs to be granted access to
   MYSQL.
  
   I'm willing to bet that the failure to connect into MYSQL via PHP from
   Apache is due
   to a permissions/login/authorization issue.
  
  
   You also wrote:
   If you enable LOGGING  bounce the MYSQL DB, some clue about what is  or
   is not
   happening to MYSQL will be written to the logfile.
  
   Discern what the clues are reporting and fix the problem.
  
   HTH  YMMV
  
   On 5/28/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  
   I'm on Mac OSX and Mysql is built-in, so is php.
  
   My php has built-in support for mysql.
  
   Both php and mysql are up and running.  I have tested both.  All this
   is running on this machine, so is Apache.
  
   I can log into mysql at the CLI with my superuser and access the
   'mysql' db -the only one I currently have.
  
   I have a good php test connect script but cannot connect to mysql.
   I have checked the mysql variables and entered the socket location
   into the script, no help.
  
   What else can possibly be wrong?  Is there something in a mysql
   config file or something that is off?
  
   This is an upgrade install of Mac OSX 10.4 Server over 10.3 Server
   (I'm not a wiz) but have used it long enough.  I have changed nothing
   and it worked fine before.
  
   Any suggestions?  Again, I did not build this it's all built-in and
   working fine.  I simply can't connect with php.  Separately, mysql
   and php both work.
  
   Thanks,
   Gil
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 






-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread Michael Stassen
You haven't given us much to go on, other than it doesn't work, which 
isn't really helpful.  We can't give you specific ideas where to look 
until you give us specific details of what's wrong.  Please describe 
what happens.  Do you get an error message?  What is it?  While you're 
at it, show us the relevant lines of code (hide the password, of course).


You say mysql, php, and apache are working separately.  I take it that 
php scripts are running via web access (apache)?  I ask because some 
previous Mac OS upgrades replaced the apache config with a newer one 
with php turned off.


Meanwhile, the Apache user is irrelevant.  The php script just needs a 
valid *mysql* user and password to authenticate.


bounce = restart

Michael

[EMAIL PROTECTED] wrote:

 From your first message below, are you suggesting a setting in  Apache 
needs to be ticked?
I can do it if I know where to look.  I am no expert, just one who  uses 
tis setup, i.e., it just works.  I have used the previous  version for 
years and it just worked.  That's why I have no idea  what could 
possibly be different.


Not to say I haven't built these before, but this should be working!  :(
What's led me to this problem is that I have phpmyadmin installed and  
it can't access mysql as  it could just fine before.


I have had help from the guys at phpmyadmin who have no sent me  here.  
No one gets it.


So, any specific ideas where to look???

Thanks,
Gil

p.s. I don't know what you mean by bounce the MYSQL DB.

On May 28, 2005, at 9:47 PM, sol beach wrote:



I don't do MACs, but here is a shot in the dark.
In some/many cases Apache gets invoke as user nobody;
which would be the the OS user that needs to be granted access to  
MYSQL.


I'm willing to bet that the failure to connect into MYSQL via PHP from
Apache is due
to a permissions/login/authorization issue.



You also wrote:
If you enable LOGGING  bounce the MYSQL DB, some clue about what is  or 
is not

happening to MYSQL will be written to the logfile.

Discern what the clues are reporting and fix the problem.


HTH  YMMV

On 5/28/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


I'm on Mac OSX and Mysql is built-in, so is php.

My php has built-in support for mysql.

Both php and mysql are up and running.  I have tested both.  All this
is running on this machine, so is Apache.

I can log into mysql at the CLI with my superuser and access the
'mysql' db -the only one I currently have.

I have a good php test connect script but cannot connect to mysql.
I have checked the mysql variables and entered the socket location
into the script, no help.

What else can possibly be wrong?  Is there something in a mysql
config file or something that is off?

This is an upgrade install of Mac OSX 10.4 Server over 10.3 Server
(I'm not a wiz) but have used it long enough.  I have changed nothing
and it worked fine before.

Any suggestions?  Again, I did not build this it's all built-in and
working fine.  I simply can't connect with php.  Separately, mysql
and php both work.

Thanks,
Gil



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread cma7b5
I have the php app Gallery, a php web based based photo gallery  
running and that works fine.
mysqld is running and I can login through the CLI and use the db  
'mysql' with root or with my superuser, so that's OK.  All that seems  
to have transfered over from upgrading the OS without a hitch.  All I  
did was restart Mysql.  Php was already turned on in httpd this time  
around, iirc.  Test php info script work as well.


But when I try to connect to mysql with this script I can't connect:
?php

$server = localhost:/var/mysql/mysql.sock;
$user=mysuperuser;
$password=mypassword;
$db = mysql;

mysql_connect($server, $user, $password);
mysql_select_db($db);
echo mysql_error();
phpinfo();
?

I get these:
Warning: mysql_connect(): Can't connect to local MySQL server through  
socket '/var/mysql/mysql.sock' (13) in /Library/WebServer/testpad/ 
test.php on line 3


Warning: mysql_select_db(): Can't connect to local MySQL server  
through socket '/tmp/mysql.sock' (2) in /Library/WebServer/testpad/ 
test.php on line 3


Warning: mysql_select_db(): A link to the server could not be  
established in /Library/WebServer/testpad/test.php on line 3

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Checking mysqladmin shows this var/mysql/mysql.sock.

All this is running on the same machine I'm sitting at.

Thanks for any and all tips, remember I'm an amateur.  :)

Gil


On May 29, 2005, at 2:27 AM, Michael Stassen wrote:

You haven't given us much to go on, other than it doesn't work,  
which isn't really helpful.  We can't give you specific ideas  
where to look until you give us specific details of what's wrong.   
Please describe what happens.  Do you get an error message?  What  
is it?  While you're at it, show us the relevant lines of code  
(hide the password, of course).


You say mysql, php, and apache are working separately.  I take it  
that php scripts are running via web access (apache)?  I ask  
because some previous Mac OS upgrades replaced the apache config  
with a newer one with php turned off.


Meanwhile, the Apache user is irrelevant.  The php script just  
needs a valid *mysql* user and password to authenticate.


bounce = restart

Michael

[EMAIL PROTECTED] wrote:


 From your first message below, are you suggesting a setting in   
Apache needs to be ticked?
I can do it if I know where to look.  I am no expert, just one  
who  uses tis setup, i.e., it just works.  I have used the  
previous  version for years and it just worked.  That's why I  
have no idea  what could possibly be different.
Not to say I haven't built these before, but this should be  
working!  :(
What's led me to this problem is that I have phpmyadmin installed  
and  it can't access mysql as  it could just fine before.
I have had help from the guys at phpmyadmin who have no sent me   
here.  No one gets it.

So, any specific ideas where to look???
Thanks,
Gil
p.s. I don't know what you mean by bounce the MYSQL DB.
On May 28, 2005, at 9:47 PM, sol beach wrote:


I don't do MACs, but here is a shot in the dark.
In some/many cases Apache gets invoke as user nobody;
which would be the the OS user that needs to be granted access  
to  MYSQL.


I'm willing to bet that the failure to connect into MYSQL via PHP  
from

Apache is due
to a permissions/login/authorization issue.



You also wrote:
If you enable LOGGING  bounce the MYSQL DB, some clue about what  
is  or is not

happening to MYSQL will be written to the logfile.
Discern what the clues are reporting and fix the problem.


HTH  YMMV

On 5/28/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:



I'm on Mac OSX and Mysql is built-in, so is php.

My php has built-in support for mysql.

Both php and mysql are up and running.  I have tested both.  All  
this

is running on this machine, so is Apache.

I can log into mysql at the CLI with my superuser and access the
'mysql' db -the only one I currently have.

I have a good php test connect script but cannot connect to mysql.
I have checked the mysql variables and entered the socket location
into the script, no help.

What else can possibly be wrong?  Is there something in a mysql
config file or something that is off?

This is an upgrade install of Mac OSX 10.4 Server over 10.3 Server
(I'm not a wiz) but have used it long enough.  I have changed  
nothing

and it worked fine before.

Any suggestions?  Again, I did not build this it's all built-in and
working fine.  I simply can't connect with php.  Separately, mysql
and php both work.

Thanks,
Gil




Re: mysql and php

2005-05-29 Thread Philip George

try looking at these two pages:

http://dev.mysql.com/doc/mysql/en/access-denied.html
http://dev.mysql.com/doc/mysql/en/connecting-disconnecting.html

search them both for '2002' (multiple instances on one of the pages).

there a couple suggestions for things to try.

hth.

- philip


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread Philip George
one of the posts at the bottom of one of those pages mentions that the 
permissions on the sock file might not be right.


mine is:

srwxrwxrwx  1 mysqlwheel0 29 May 06:41 mysql.sock

you probably already know all this, but just in case... to get those 
permissions set up:


stop mysqld

chown mysql:wheel /tmp/mysql.sock
chmod 4777 /tmp/mysql.sock

restart mysqld

- philip





On May 29, 2005, at 12:33 PM, Philip George wrote:


try looking at these two pages:

http://dev.mysql.com/doc/mysql/en/access-denied.html
http://dev.mysql.com/doc/mysql/en/connecting-disconnecting.html

search them both for '2002' (multiple instances on one of the pages).

there a couple suggestions for things to try.

hth.

- philip


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread cma7b5
I don't see anything I haven't tried there, i.e., defining the sock  
in the connection.


Thanks.


On May 29, 2005, at 1:33 PM, Philip George wrote:


try looking at these two pages:

http://dev.mysql.com/doc/mysql/en/access-denied.html
http://dev.mysql.com/doc/mysql/en/connecting-disconnecting.html

search them both for '2002' (multiple instances on one of the pages).

there a couple suggestions for things to try.

hth.

- philip


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread cma7b5

Ok, thanks all.

I believe I need a fresh installation.
What I do get is why running 'mysqladmin -variables' reports the  
location of mysql.sock and there seems to be no mysql.sock anywhere  
on this machine!  Not in /tmp not /var/mysql (where it says it is).


Gil


On May 29, 2005, at 1:59 PM, Philip George wrote:

one of the posts at the bottom of one of those pages mentions that  
the permissions on the sock file might not be right.


mine is:

srwxrwxrwx  1 mysqlwheel0 29 May 06:41 mysql.sock

you probably already know all this, but just in case... to get  
those permissions set up:


stop mysqld

chown mysql:wheel /tmp/mysql.sock
chmod 4777 /tmp/mysql.sock

restart mysqld

- philip





On May 29, 2005, at 12:33 PM, Philip George wrote:



try looking at these two pages:

http://dev.mysql.com/doc/mysql/en/access-denied.html
http://dev.mysql.com/doc/mysql/en/connecting-disconnecting.html

search them both for '2002' (multiple instances on one of the pages).

there a couple suggestions for things to try.

hth.

- philip


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread Philip George

On May 29, 2005, at 11:13 AM, [EMAIL PROTECTED] wrote:


?php

$server = localhost:/var/mysql/mysql.sock;
$user=mysuperuser;
$password=mypassword;
$db = mysql;

mysql_connect($server, $user, $password);
mysql_select_db($db);
echo mysql_error();
phpinfo();
?

I get these:
Warning: mysql_connect(): Can't connect to local MySQL server through 
socket '/var/mysql/mysql.sock' (13) in 
/Library/WebServer/testpad/test.php on line 3


Warning: mysql_select_db(): Can't connect to local MySQL server 
through socket '/tmp/mysql.sock' (2) in 
/Library/WebServer/testpad/test.php on line 3


Warning: mysql_select_db(): A link to the server could not be 
established in /Library/WebServer/testpad/test.php on line 3
Can't connect to local MySQL server through socket '/tmp/mysql.sock' 
(2)


Checking mysqladmin shows this var/mysql/mysql.sock.



also, i think it's possible that you'll need a leading slash in front 
of var/mysql/mysql.sock in mysqladmin.


/var/mysql/mysql.sock

so that it definitely matches what you've got in your mysql_connect() 
call.


speaking of which, there are several interesting notes on this subject 
on the mysql_connect() page on the php site:


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

but, my guess is that the missing leading slash in the socket path in 
mysqladmin is placing the sock file in some weird place that php won't 
find.  also, make sure there's a mysql directory in /var of course.



- philip









--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread Michael Stassen
mysqld won't start if it can't create the socket, so if mysqld is 
running, you've got a socket somewhere.  Once you find out where, you 
can fix your connection problem by setting the appropriate path in your 
php script.


I don't think you need a fresh install.

Michael

[EMAIL PROTECTED] wrote:


Ok, thanks all.

I believe I need a fresh installation.
What I do get is why running 'mysqladmin -variables' reports the  
location of mysql.sock and there seems to be no mysql.sock anywhere  on 
this machine!  Not in /tmp not /var/mysql (where it says it is).


Gil


On May 29, 2005, at 1:59 PM, Philip George wrote:

one of the posts at the bottom of one of those pages mentions that  
the permissions on the sock file might not be right.


mine is:

srwxrwxrwx  1 mysqlwheel0 29 May 06:41 mysql.sock

you probably already know all this, but just in case... to get  those 
permissions set up:


stop mysqld

chown mysql:wheel /tmp/mysql.sock
chmod 4777 /tmp/mysql.sock

restart mysqld

- philip





On May 29, 2005, at 12:33 PM, Philip George wrote:



try looking at these two pages:

http://dev.mysql.com/doc/mysql/en/access-denied.html
http://dev.mysql.com/doc/mysql/en/connecting-disconnecting.html

search them both for '2002' (multiple instances on one of the pages).

there a couple suggestions for things to try.

hth.

- philip



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread Michael Stassen

Philip George wrote:

one of the posts at the bottom of one of those pages mentions that the 
permissions on the sock file might not be right.


mine is:

srwxrwxrwx  1 mysqlwheel0 29 May 06:41 mysql.sock

you probably already know all this, but just in case... to get those 
permissions set up:


stop mysqld

chown mysql:wheel /tmp/mysql.sock
chmod 4777 /tmp/mysql.sock

restart mysqld

- philip


Sorry, but this is nonsense.  mysql.sock is created by mysqld when it 
starts, and destroyed when it stops.  Once you stop mysqld, there won't 
be any file to chown or chmod.

Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread mfatene
re-submitted

 re-send :

  hi,
  php has to be configured with mysql support. see
  http://www.whoopis.com/howtos/php-mysql-osx.html

  and a general google search :
  http://www.google.fr/search?q=mysql+php+mac+oshl=frlr=start=30sa=N

  Mathias
 
 
  Selon Michael Stassen [EMAIL PROTECTED]:
 
   You haven't given us much to go on, other than it doesn't work, which
   isn't really helpful.  We can't give you specific ideas where to look
   until you give us specific details of what's wrong.  Please describe
   what happens.  Do you get an error message?  What is it?  While you're
   at it, show us the relevant lines of code (hide the password, of course).
  
   You say mysql, php, and apache are working separately.  I take it that
   php scripts are running via web access (apache)?  I ask because some
   previous Mac OS upgrades replaced the apache config with a newer one
   with php turned off.
  
   Meanwhile, the Apache user is irrelevant.  The php script just needs a
   valid *mysql* user and password to authenticate.
  
   bounce = restart
  
   Michael
  
   [EMAIL PROTECTED] wrote:
  
 From your first message below, are you suggesting a setting in  Apache
needs to be ticked?
I can do it if I know where to look.  I am no expert, just one who
 uses
tis setup, i.e., it just works.  I have used the previous  version
 for
years and it just worked.  That's why I have no idea  what could
possibly be different.
   
Not to say I haven't built these before, but this should be working!
 :(
What's led me to this problem is that I have phpmyadmin installed and
it can't access mysql as  it could just fine before.
   
I have had help from the guys at phpmyadmin who have no sent me  here.
No one gets it.
   
So, any specific ideas where to look???
   
Thanks,
Gil
   
p.s. I don't know what you mean by bounce the MYSQL DB.
   
On May 28, 2005, at 9:47 PM, sol beach wrote:
   
   
I don't do MACs, but here is a shot in the dark.
In some/many cases Apache gets invoke as user nobody;
which would be the the OS user that needs to be granted access to
MYSQL.
   
I'm willing to bet that the failure to connect into MYSQL via PHP from
Apache is due
to a permissions/login/authorization issue.
   
   
You also wrote:
If you enable LOGGING  bounce the MYSQL DB, some clue about what is
 or
is not
happening to MYSQL will be written to the logfile.
   
Discern what the clues are reporting and fix the problem.
   
HTH  YMMV
   
On 5/28/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
   
I'm on Mac OSX and Mysql is built-in, so is php.
   
My php has built-in support for mysql.
   
Both php and mysql are up and running.  I have tested both.  All this
is running on this machine, so is Apache.
   
I can log into mysql at the CLI with my superuser and access the
'mysql' db -the only one I currently have.
   
I have a good php test connect script but cannot connect to mysql.
I have checked the mysql variables and entered the socket location
into the script, no help.
   
What else can possibly be wrong?  Is there something in a mysql
config file or something that is off?
   
This is an upgrade install of Mac OSX 10.4 Server over 10.3 Server
(I'm not a wiz) but have used it long enough.  I have changed nothing
and it worked fine before.
   
Any suggestions?  Again, I did not build this it's all built-in and
working fine.  I simply can't connect with php.  Separately, mysql
and php both work.
   
Thanks,
Gil
  
  
   --
   MySQL General Mailing List
   For list archives: http://lists.mysql.com/mysql
   To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
  
  
 
 
 






-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread Philip George
mysql.sock is created by mysqld when it starts, and destroyed when it 
stops.


haha.  you're absolutely right.  that doesn't make any sense.  i wasn't 
thinking about the nature of socket files when i wrote that.


now that i go back and read the post i was referring to, i think the 
poster was actually talking about the privileges of the enclosing 
folder, not the socket itself.  my bad.


but, regardless, i think it's a path problem anyway, as i mentioned 
earlier.


pardon the misfire.  running on zero sleep.

- philip


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread cma7b5
Yes, now-a-days php is enabled by default... well on OSX Server it is  
and Mysql support is built-in and turned on.


You do have to start Mysql on OSX Server.

Gil

On May 29, 2005, at 3:35 PM, [EMAIL PROTECTED] wrote:


re-submitted

 re-send :

  hi,
  php has to be configured with mysql support. see
  http://www.whoopis.com/howtos/php-mysql-osx.html

  and a general google search :
  http://www.google.fr/search?q=mysql+php+mac 
+oshl=frlr=start=30sa=N


  Mathias




Selon Michael Stassen [EMAIL PROTECTED]:


You haven't given us much to go on, other than it doesn't  
work, which
isn't really helpful.  We can't give you specific ideas where  
to look
until you give us specific details of what's wrong.  Please  
describe
what happens.  Do you get an error message?  What is it?  While  
you're
at it, show us the relevant lines of code (hide the password, of  
course).


You say mysql, php, and apache are working separately.  I take  
it that
php scripts are running via web access (apache)?  I ask because  
some
previous Mac OS upgrades replaced the apache config with a newer  
one

with php turned off.

Meanwhile, the Apache user is irrelevant.  The php script just  
needs a

valid *mysql* user and password to authenticate.

bounce = restart

Michael

[EMAIL PROTECTED] wrote:


 From your first message below, are you suggesting a setting  
in  Apache

needs to be ticked?
I can do it if I know where to look.  I am no expert, just one who


uses

tis setup, i.e., it just works.  I have used the previous   
version



for


years and it just worked.  That's why I have no idea  what could
possibly be different.

Not to say I haven't built these before, but this should be  
working!



:(

What's led me to this problem is that I have phpmyadmin  
installed and

it can't access mysql as  it could just fine before.

I have had help from the guys at phpmyadmin who have no sent  
me  here.

No one gets it.

So, any specific ideas where to look???

Thanks,
Gil

p.s. I don't know what you mean by bounce the MYSQL DB.

On May 28, 2005, at 9:47 PM, sol beach wrote:




I don't do MACs, but here is a shot in the dark.
In some/many cases Apache gets invoke as user nobody;
which would be the the OS user that needs to be granted  
access to

MYSQL.

I'm willing to bet that the failure to connect into MYSQL via  
PHP from

Apache is due
to a permissions/login/authorization issue.




You also wrote:
If you enable LOGGING  bounce the MYSQL DB, some clue about  
what is



or


is not
happening to MYSQL will be written to the logfile.

Discern what the clues are reporting and fix the problem.



HTH  YMMV

On 5/28/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:



I'm on Mac OSX and Mysql is built-in, so is php.

My php has built-in support for mysql.

Both php and mysql are up and running.  I have tested both.   
All this

is running on this machine, so is Apache.

I can log into mysql at the CLI with my superuser and access the
'mysql' db -the only one I currently have.

I have a good php test connect script but cannot connect to  
mysql.
I have checked the mysql variables and entered the socket  
location

into the script, no help.

What else can possibly be wrong?  Is there something in a mysql
config file or something that is off?

This is an upgrade install of Mac OSX 10.4 Server over 10.3  
Server
(I'm not a wiz) but have used it long enough.  I have changed  
nothing

and it worked fine before.

Any suggestions?  Again, I did not build this it's all built- 
in and
working fine.  I simply can't connect with php.  Separately,  
mysql

and php both work.

Thanks,
Gil




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql? 
[EMAIL PROTECTED]





















--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread cma7b5
Remember guys, I went through this on the phpmyadmin list before  
turning here.


I was told to run the command 'mysqladmin variables' to find out  
where the the socket was; I did that successfully and it showed up  
at /var/mysql/mysql.sock.


And viola, now with mysqld running, it does show up there, at /var/ 
mysql/mysql.sock.

When I shutdown mysqld it is gone, from /var/mysql.

(Btw, once in a recent post of mine, Philip referred to my leaving  
out the leading / at 'var', that was simply a typo and it was in the  
script post.)


So, running 'mysql variables' is giving me the socket path and I'm  
still lost as to what's going why I cannot connect with a simple php  
script.


Help?!  I'll look for the mysql error log.

Gil


On May 29, 2005, at 3:59 PM, Philip George wrote:

mysql.sock is created by mysqld when it starts, and destroyed when  
it stops.




haha.  you're absolutely right.  that doesn't make any sense.  i  
wasn't thinking about the nature of socket files when i wrote that.


now that i go back and read the post i was referring to, i think  
the poster was actually talking about the privileges of the  
enclosing folder, not the socket itself.  my bad.


but, regardless, i think it's a path problem anyway, as i mentioned  
earlier.


pardon the misfire.  running on zero sleep.

- philip


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread Peter

Hi,

here is a workaround that might help you.

I guess you have a Network card. So instead of using 'localhost' as host 
use your ip e.g '192.168.0.1;. That will force MySQl use TCP/IP instead 
of socket.


Just have in mind that:

1. In /etc/my.cnf You should comment skip-networking if presenet

2. Make sure your user is allowed to make connections from YOUR_IP

3. Make sure you do not have Iptables rule that may block your access.


Peter

[EMAIL PROTECTED] wrote:
Remember guys, I went through this on the phpmyadmin list before  
turning here.


I was told to run the command 'mysqladmin variables' to find out  where 
the the socket was; I did that successfully and it showed up  at 
/var/mysql/mysql.sock.


And viola, now with mysqld running, it does show up there, at /var/ 
mysql/mysql.sock.

When I shutdown mysqld it is gone, from /var/mysql.

(Btw, once in a recent post of mine, Philip referred to my leaving  out 
the leading / at 'var', that was simply a typo and it was in the  script 
post.)


So, running 'mysql variables' is giving me the socket path and I'm  
still lost as to what's going why I cannot connect with a simple php  
script.


Help?!  I'll look for the mysql error log.

Gil


On May 29, 2005, at 3:59 PM, Philip George wrote:

mysql.sock is created by mysqld when it starts, and destroyed when  
it stops.




haha.  you're absolutely right.  that doesn't make any sense.  i  
wasn't thinking about the nature of socket files when i wrote that.


now that i go back and read the post i was referring to, i think  the 
poster was actually talking about the privileges of the  enclosing 
folder, not the socket itself.  my bad.


but, regardless, i think it's a path problem anyway, as i mentioned  
earlier.


pardon the misfire.  running on zero sleep.

- philip


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]









--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread sol beach
Gil,

THREE elements need to be match what is stored inside MYSQL DB.
1) username
2) password
3) hostname

You need to enable MYSQL logging, restart the DB,  try to login from PHP.
Then, take a look at what MYSQL shows in its logfile  post the results here!

YMMV

On 5/29/05, Peter [EMAIL PROTECTED] wrote:
 Hi,
 
 here is a workaround that might help you.
 
 I guess you have a Network card. So instead of using 'localhost' as host
 use your ip e.g '192.168.0.1;. That will force MySQl use TCP/IP instead
 of socket.
 
 Just have in mind that:
 
 1. In /etc/my.cnf You should comment skip-networking if presenet
 
 2. Make sure your user is allowed to make connections from YOUR_IP
 
 3. Make sure you do not have Iptables rule that may block your access.
 
 
 Peter
 
 [EMAIL PROTECTED] wrote:
  Remember guys, I went through this on the phpmyadmin list before
  turning here.
 
  I was told to run the command 'mysqladmin variables' to find out  where
  the the socket was; I did that successfully and it showed up  at
  /var/mysql/mysql.sock.
 
  And viola, now with mysqld running, it does show up there, at /var/
  mysql/mysql.sock.
  When I shutdown mysqld it is gone, from /var/mysql.
 
  (Btw, once in a recent post of mine, Philip referred to my leaving  out
  the leading / at 'var', that was simply a typo and it was in the  script
  post.)
 
  So, running 'mysql variables' is giving me the socket path and I'm
  still lost as to what's going why I cannot connect with a simple php
  script.
 
  Help?!  I'll look for the mysql error log.
 
  Gil
 
 
  On May 29, 2005, at 3:59 PM, Philip George wrote:
 
  mysql.sock is created by mysqld when it starts, and destroyed when
  it stops.
 
 
  haha.  you're absolutely right.  that doesn't make any sense.  i
  wasn't thinking about the nature of socket files when i wrote that.
 
  now that i go back and read the post i was referring to, i think  the
  poster was actually talking about the privileges of the  enclosing
  folder, not the socket itself.  my bad.
 
  but, regardless, i think it's a path problem anyway, as i mentioned
  earlier.
 
  pardon the misfire.  running on zero sleep.
 
  - philip
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 
 
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread cma7b5
Ok, afraid I'm having to ask: how do access the mysql log file?  Or,  
how to enable logging... I gather this will cause a verbose mode from  
the CLI?

Not sure what I should be doing here.

Thanks in advance.

As for the 3 elements listed below --wouldn't those be present in the  
mysql db already if I can get in through the CLI, which I can?



On May 29, 2005, at 6:39 PM, sol beach wrote:


Gil,

THREE elements need to be match what is stored inside MYSQL DB.
1) username
2) password
3) hostname

You need to enable MYSQL logging, restart the DB,  try to login  
from PHP.
Then, take a look at what MYSQL shows in its logfile  post the  
results here!


YMMV

On 5/29/05, Peter [EMAIL PROTECTED] wrote:


Hi,

here is a workaround that might help you.

I guess you have a Network card. So instead of using 'localhost'  
as host
use your ip e.g '192.168.0.1;. That will force MySQl use TCP/IP  
instead

of socket.

Just have in mind that:

1. In /etc/my.cnf You should comment skip-networking if presenet

2. Make sure your user is allowed to make connections from YOUR_IP

3. Make sure you do not have Iptables rule that may block your  
access.



Peter

[EMAIL PROTECTED] wrote:


Remember guys, I went through this on the phpmyadmin list before
turning here.

I was told to run the command 'mysqladmin variables' to find out   
where

the the socket was; I did that successfully and it showed up  at
/var/mysql/mysql.sock.

And viola, now with mysqld running, it does show up there, at /var/
mysql/mysql.sock.
When I shutdown mysqld it is gone, from /var/mysql.

(Btw, once in a recent post of mine, Philip referred to my  
leaving  out
the leading / at 'var', that was simply a typo and it was in the   
script

post.)

So, running 'mysql variables' is giving me the socket path and I'm
still lost as to what's going why I cannot connect with a simple php
script.

Help?!  I'll look for the mysql error log.

Gil


On May 29, 2005, at 3:59 PM, Philip George wrote:



mysql.sock is created by mysqld when it starts, and destroyed when
it stops.




haha.  you're absolutely right.  that doesn't make any sense.  i
wasn't thinking about the nature of socket files when i wrote that.

now that i go back and read the post i was referring to, i  
think  the

poster was actually talking about the privileges of the  enclosing
folder, not the socket itself.  my bad.

but, regardless, i think it's a path problem anyway, as i mentioned
earlier.

pardon the misfire.  running on zero sleep.

- philip


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql? 
[EMAIL PROTECTED]












--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql? 
[EMAIL PROTECTED]








--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread mfatene
hi,
php has to be configured with mysql support. see
http://www.whoopis.com/howtos/php-mysql-osx.html

and a general google search :
http://www.google.fr/search?q=mysql+php+mac+oshl=frlr=start=30sa=N

Mathias


Selon Michael Stassen [EMAIL PROTECTED]:

 You haven't given us much to go on, other than it doesn't work, which
 isn't really helpful.  We can't give you specific ideas where to look
 until you give us specific details of what's wrong.  Please describe
 what happens.  Do you get an error message?  What is it?  While you're
 at it, show us the relevant lines of code (hide the password, of course).

 You say mysql, php, and apache are working separately.  I take it that
 php scripts are running via web access (apache)?  I ask because some
 previous Mac OS upgrades replaced the apache config with a newer one
 with php turned off.

 Meanwhile, the Apache user is irrelevant.  The php script just needs a
 valid *mysql* user and password to authenticate.

 bounce = restart

 Michael

 [EMAIL PROTECTED] wrote:

   From your first message below, are you suggesting a setting in  Apache
  needs to be ticked?
  I can do it if I know where to look.  I am no expert, just one who  uses
  tis setup, i.e., it just works.  I have used the previous  version for
  years and it just worked.  That's why I have no idea  what could
  possibly be different.
 
  Not to say I haven't built these before, but this should be working!  :(
  What's led me to this problem is that I have phpmyadmin installed and
  it can't access mysql as  it could just fine before.
 
  I have had help from the guys at phpmyadmin who have no sent me  here.
  No one gets it.
 
  So, any specific ideas where to look???
 
  Thanks,
  Gil
 
  p.s. I don't know what you mean by bounce the MYSQL DB.
 
  On May 28, 2005, at 9:47 PM, sol beach wrote:
 
 
  I don't do MACs, but here is a shot in the dark.
  In some/many cases Apache gets invoke as user nobody;
  which would be the the OS user that needs to be granted access to
  MYSQL.
 
  I'm willing to bet that the failure to connect into MYSQL via PHP from
  Apache is due
  to a permissions/login/authorization issue.
 
 
  You also wrote:
  If you enable LOGGING  bounce the MYSQL DB, some clue about what is  or
  is not
  happening to MYSQL will be written to the logfile.
 
  Discern what the clues are reporting and fix the problem.
 
  HTH  YMMV
 
  On 5/28/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  I'm on Mac OSX and Mysql is built-in, so is php.
 
  My php has built-in support for mysql.
 
  Both php and mysql are up and running.  I have tested both.  All this
  is running on this machine, so is Apache.
 
  I can log into mysql at the CLI with my superuser and access the
  'mysql' db -the only one I currently have.
 
  I have a good php test connect script but cannot connect to mysql.
  I have checked the mysql variables and entered the socket location
  into the script, no help.
 
  What else can possibly be wrong?  Is there something in a mysql
  config file or something that is off?
 
  This is an upgrade install of Mac OSX 10.4 Server over 10.3 Server
  (I'm not a wiz) but have used it long enough.  I have changed nothing
  and it worked fine before.
 
  Any suggestions?  Again, I did not build this it's all built-in and
  working fine.  I simply can't connect with php.  Separately, mysql
  and php both work.
 
  Thanks,
  Gil


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread cma7b5
This is very old, several years, info you've been passing along.   
Mysql switches are on by default now.  Mac OSX (Server for me) is not  
10.4 Tiger, you've posted 10.2 Jaguar info, one version prior to 10.3  
Panther which was itself released over a 18 months ago.


Thanks anyway.  :)
Gil


On May 29, 2005, at 5:34 AM, [EMAIL PROTECTED] wrote:


hi,
php has to be configured with mysql support. see
http://www.whoopis.com/howtos/php-mysql-osx.html

and a general google search :
http://www.google.fr/search?q=mysql+php+mac+oshl=frlr=start=30sa=N

Mathias


Selon Michael Stassen [EMAIL PROTECTED]:


You haven't given us much to go on, other than it doesn't work,  
which
isn't really helpful.  We can't give you specific ideas where to  
look

until you give us specific details of what's wrong.  Please describe
what happens.  Do you get an error message?  What is it?  While  
you're
at it, show us the relevant lines of code (hide the password, of  
course).


You say mysql, php, and apache are working separately.  I take it  
that

php scripts are running via web access (apache)?  I ask because some
previous Mac OS upgrades replaced the apache config with a newer one
with php turned off.

Meanwhile, the Apache user is irrelevant.  The php script just  
needs a

valid *mysql* user and password to authenticate.

bounce = restart

Michael

[EMAIL PROTECTED] wrote:


 From your first message below, are you suggesting a setting in   
Apache

needs to be ticked?
I can do it if I know where to look.  I am no expert, just one  
who  uses
tis setup, i.e., it just works.  I have used the previous   
version for

years and it just worked.  That's why I have no idea  what could
possibly be different.

Not to say I haven't built these before, but this should be  
working!  :(
What's led me to this problem is that I have phpmyadmin installed  
and

it can't access mysql as  it could just fine before.

I have had help from the guys at phpmyadmin who have no sent me   
here.

No one gets it.

So, any specific ideas where to look???

Thanks,
Gil

p.s. I don't know what you mean by bounce the MYSQL DB.

On May 28, 2005, at 9:47 PM, sol beach wrote:




I don't do MACs, but here is a shot in the dark.
In some/many cases Apache gets invoke as user nobody;
which would be the the OS user that needs to be granted access to
MYSQL.

I'm willing to bet that the failure to connect into MYSQL via  
PHP from

Apache is due
to a permissions/login/authorization issue.




You also wrote:
If you enable LOGGING  bounce the MYSQL DB, some clue about what  
is  or

is not
happening to MYSQL will be written to the logfile.

Discern what the clues are reporting and fix the problem.



HTH  YMMV

On 5/28/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:



I'm on Mac OSX and Mysql is built-in, so is php.

My php has built-in support for mysql.

Both php and mysql are up and running.  I have tested both.   
All this

is running on this machine, so is Apache.

I can log into mysql at the CLI with my superuser and access the
'mysql' db -the only one I currently have.

I have a good php test connect script but cannot connect to mysql.
I have checked the mysql variables and entered the socket location
into the script, no help.

What else can possibly be wrong?  Is there something in a mysql
config file or something that is off?

This is an upgrade install of Mac OSX 10.4 Server over 10.3 Server
(I'm not a wiz) but have used it long enough.  I have changed  
nothing

and it worked fine before.

Any suggestions?  Again, I did not build this it's all built-in  
and

working fine.  I simply can't connect with php.  Separately, mysql
and php both work.

Thanks,
Gil




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]










--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-29 Thread Michael Stassen


[EMAIL PROTECTED] wrote:

Remember guys, I went through this on the phpmyadmin list before  
turning here.


That doesn't help us much, as we haven't seen that conversation.

I was told to run the command 'mysqladmin variables' to find out where 
the socket was; I did that successfully and it showed up  at 
/var/mysql/mysql.sock.


And viola, now with mysqld running, it does show up there, at /var/ 
mysql/mysql.sock.  When I shutdown mysqld it is gone, from /var/mysql.


Earlier, you wrote:

 What I do get is why running 'mysqladmin -variables' reports the
 location of mysql.sock and there seems to be no mysql.sock anywhere
 on this machine!  Not in /tmp not /var/mysql (where it says it is).

At that point, then, mysqld was not running, so connecting would have 
been impossible.  Now mysqld is running, so connecting *should* be 
possible.  Indeed, you report success connecting via the mysql client.


Unfortunately, this puts us back at square one.  To diagnose the 
problem, we need the php error message when the connect fails.  I 
suspect the message you showed before was from when mysql wasn't 
running.  I could be wrong, but with just bits and pieces, rather than a 
clear narrative, it's hard to know what's going on.


(Btw, once in a recent post of mine, Philip referred to my leaving  out 
the leading / at 'var', that was simply a typo and it was in the  script 
post.)


So, running 'mysql variables' is giving me the socket path and I'm  
still lost as to what's going why I cannot connect with a simple php  
script.


php can tell you what's wrong, if you let it.  The code you showed us 
doesn't really check for errors.  Try changing it to this:


?php
$server = localhost:/var/mysql/mysql.sock;
$user=mysuperuser;
$password=mypassword;
$db = mysql;

mysql_connect($server, $user, $password)
  or die('Could not connect: ' . mysql_error());
mysql_select_db($db) or die('Could not select db: ' . mysql_error());
?

Make sure mysqld is running (/var/mysql/mysql.sock exists, can connect 
with mysql client) then try this script.  If it fails to connect, post 
the error message.



Help?!  I'll look for the mysql error log.


The default location of the log is the file hostname.err in mysql's data 
directory (where hostname is the name of your machine).  I don't think 
the mysql log will help though, as the error appears to be on the php side.



Gil


Meanwhile, I should point out that while it is true that Mac OS X Server 
10.4 ships with mysql and php, for some reason they've been shipped with 
incompatible defaults, as you are seeing.  Have you read what Apple has 
to say on the matter 
http://docs.info.apple.com/article.html?artnum=301457?  If you 
haven't, then you probably haven't changed permissions on /var/mysql so 
that www, the apache user, can access the socket.  They suggest


  sudo chmod 775 /var/mysql

but

  sudo chmod 711 /var/mysql

should be sufficient (and safer).

They also suggest editing/creating /etc/php.ini to make the correct 
location of mysql's socket file the default for php, though this 
shouldn't be necessary, as you are specifying the location in your 
connection string.


If you're still having problems, inclde the output of

  cd /var/mysql  ls -l

in your next post.

Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql and php

2005-05-28 Thread cma7b5
From your first message below, are you suggesting a setting in  
Apache needs to be ticked?
I can do it if I know where to look.  I am no expert, just one who  
uses tis setup, i.e., it just works.  I have used the previous  
version for years and it just worked.  That's why I have no idea  
what could possibly be different.


Not to say I haven't built these before, but this should be working!  :(
What's led me to this problem is that I have phpmyadmin installed and  
it can't access mysql as  it could just fine before.


I have had help from the guys at phpmyadmin who have no sent me  
here.  No one gets it.


So, any specific ideas where to look???

Thanks,
Gil

p.s. I don't know what you mean by bounce the MYSQL DB.

On May 28, 2005, at 9:47 PM, sol beach wrote:



I don't do MACs, but here is a shot in the dark.
In some/many cases Apache gets invoke as user nobody;
which would be the the OS user that needs to be granted access to  
MYSQL.


I'm willing to bet that the failure to connect into MYSQL via PHP from
Apache is due
to a permissions/login/authorization issue.



You also wrote:
If you enable LOGGING  bounce the MYSQL DB, some clue about what is  
or is not

happening to MYSQL will be written to the logfile.

Discern what the clues are reporting and fix the problem.




HTH  YMMV

On 5/28/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:



I'm on Mac OSX and Mysql is built-in, so is php.

My php has built-in support for mysql.

Both php and mysql are up and running.  I have tested both.  All this
is running on this machine, so is Apache.

I can log into mysql at the CLI with my superuser and access the
'mysql' db -the only one I currently have.

I have a good php test connect script but cannot connect to mysql.
I have checked the mysql variables and entered the socket location
into the script, no help.

What else can possibly be wrong?  Is there something in a mysql
config file or something that is off?

This is an upgrade install of Mac OSX 10.4 Server over 10.3 Server
(I'm not a wiz) but have used it long enough.  I have changed nothing
and it worked fine before.

Any suggestions?  Again, I did not build this it's all built-in and
working fine.  I simply can't connect with php.  Separately, mysql
and php both work.

Thanks,
Gil

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql? 
[EMAIL PROTECTED]











--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: MySQL and PHP

2004-12-29 Thread Jay Blanchard
[snip]
On Windows... Which do i install first? PHP or MySQL?
[/snip]

It should not matter as you will have to tell PHP to load the proper
libraries. Install both (in any order) then configure PHP, then start
MySQL

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL and PHP

2004-12-29 Thread Josh Trutwin
On Wed, 29 Dec 2004 10:42:45 -0500
GH [EMAIL PROTECTED] wrote:

 On Windows... Which do i install first? PHP or MySQL?

Apache.  :)

It doesn't really matter but I'd suggest MySQL first as I think there
is one file you need to copy from the MySQL installation to the
C:\Windows (or whatever systemroot directory you use) before the PhP
MySQL extension will work.

Josh

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL and PHP

2004-12-29 Thread GH
I am using IIS :(



On Wed, 29 Dec 2004 10:03:11 -0600, Josh Trutwin
[EMAIL PROTECTED] wrote:
 On Wed, 29 Dec 2004 10:42:45 -0500
 GH [EMAIL PROTECTED] wrote:
 
  On Windows... Which do i install first? PHP or MySQL?
 
 Apache.  :)
 
 It doesn't really matter but I'd suggest MySQL first as I think there
 is one file you need to copy from the MySQL installation to the
 C:\Windows (or whatever systemroot directory you use) before the PhP
 MySQL extension will work.
 
 Josh
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL and PHP

2004-12-29 Thread Don Stefani
GH wrote:
I am using IIS :(
 

On Windows... Which do i install first? PHP or MySQL?
   

Apache.  :)
   

If your just working on a local dev box, it may not be that big of a deal.
PHP using IIS is a bit easier to install than Apache since PHP5 does not 
have an installer that auto-configs Apache, you will have to use the 
zipped package and configure your http.conf yourself. Windows doesn't 
always like to play nice.
Although if I remember correctly it installs it as CGI, and there are 
big security warnings about it. Again, a local dev box may not be a huge 
risk.

Anyway, Have Fun!
- dstefani
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MySQL and PHP

2004-12-29 Thread SGreen
I thought you were building a local application, not a web-based app??

I believe you can still use PHP through WSH (instead of IIS) but you will 
need to do some research, though. I know that Perl is supported by both 
WSH and IIS (I have seen it working before) so I think that PHP and Python 
and other scripting languages will probably also work (if the correct 
translator widget exists). Go to the MSDN site (http://msdn.microsoft.com) 
and search for PHP. You may find a walkthrough on how to get it setup.

It also makes a difference if your app can function as a mostly-unattended 
batch script or if it needs frequent user interaction. If you need more 
than basic user input, you have crossed over from developing a script into 
the realm of application programming. You will probably need a 
GUI-friendly development package which implies something other than WSH 
(VB, VC, Access (shudder), Delphi, IIS/ASP, whatever you have at your 
disposal).

Of course, the WAMP alternative is always there, Apache is FREE and comes 
with PHP. I have both IIS and Apache set up on my Win2K laptop (I usually 
only run them one at a time to conserve resources), So instead of IIS/ASP, 
you could use Apache/PHP. It's up to you which you pick.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Don Stefani [EMAIL PROTECTED] wrote on 12/29/2004 11:53:36 AM:

 GH wrote:
 
 I am using IIS :(
  
 
 On Windows... Which do i install first? PHP or MySQL?
  
 
 Apache.  :)
 
 
  
 
 If your just working on a local dev box, it may not be that big of a 
deal.
 PHP using IIS is a bit easier to install than Apache since PHP5 does not 

 have an installer that auto-configs Apache, you will have to use the 
 zipped package and configure your http.conf yourself. Windows doesn't 
 always like to play nice.
 Although if I remember correctly it installs it as CGI, and there are 
 big security warnings about it. Again, a local dev box may not be a huge 

 risk.
 
 Anyway, Have Fun!
 
 - dstefani
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 


Re: MySQL and PHP

2004-12-29 Thread Joerg Bruehe
Hi!


Am Mit, 2004-12-29 um 18.09 schrieb [EMAIL PROTECTED]:
 [[...]]
 Of course, the WAMP alternative is always there, Apache is FREE and comes 
 with PHP. I have both IIS and Apache set up on my Win2K laptop (I usually 
 only run them one at a time to conserve resources), So instead of IIS/ASP, 
 you could use Apache/PHP. It's up to you which you pick.

I have recently taken a PHP class where we starteb by installing a WAMP
suite packaged under the product name 'TSW' = The Saint WAMP, the
result worked immediately.

That set included MySQL 4.0.20a.
We got a CD from the instructor, but I can look up the download address
if you want.

Regards,
Jörg

-- 
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com

Are you MySQL certified?  www.mysql.com/certification


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL and PHP

2004-12-29 Thread Curtis Maurand
If you follow the instructions properly, you can get the ISAPI version 
of PHP to run and it it runs pretty well once installed.

Curtis
Don Stefani wrote:
GH wrote:
I am using IIS :(
 

On Windows... Which do i install first? PHP or MySQL?
  
Apache.  :)

  

If your just working on a local dev box, it may not be that big of a 
deal.
PHP using IIS is a bit easier to install than Apache since PHP5 does 
not have an installer that auto-configs Apache, you will have to use 
the zipped package and configure your http.conf yourself. Windows 
doesn't always like to play nice.
Although if I remember correctly it installs it as CGI, and there are 
big security warnings about it. Again, a local dev box may not be a 
huge risk.

Anyway, Have Fun!
- dstefani

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MySQL and PHP

2004-11-24 Thread Steve Buehler
You didn't say which Linux you were using and I am not sure about the rest, 
but if you are using RedHat, you probably need to install php-mysql which 
is A module for PHP applications that use MySQL databases.  If you can 
use up2date, you can type in up2date php-mysql and that will let you run 
php with the mysql module.  That is if you are using RedHat and have php 
installed by RPM from the up2date site or from the install CD.  Possibility 
that the php-mysql module is on the install CD too, but I don't know.

Steve
At 09:59 AM 11/24/2004, you wrote:
Hi all,
I have problem by using PHP and MySQL. I have installed MySQL Server 4.1.7 
on a Linux  machine with Apache. PHP interpreter has been installed on it 
by default but I am not sure if PHP modules for MySQL has been installed 
too or not. On MySQL download section there is only some extensions which 
has links to PHP site. I couldn't use them really. Can anybody help ? How 
can I install PHP modules for MySQL so I would work with mysql database 
through PHP ?

Regards,
Danesh

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: MySQL and PHP

2004-11-24 Thread Jay Blanchard
[snip]
I have problem by using PHP and MySQL. I have installed MySQL Server 
4.1.7 on a Linux  machine with Apache. PHP interpreter has been 
installed on it by default but I am not sure if PHP modules for MySQL 
has been installed too or not. On MySQL download section there is only 
some extensions which has links to PHP site. I couldn't use them really.

Can anybody help ? How can I install PHP modules for MySQL so I would 
work with mysql database through PHP ?
[/snip]

This is probably a better question for a PHP list. Is PHP runinng? Make
a test page

?php

phpinfo();

?

and run it from your web browser. Have you checked basic PHP  MySQL
tutorials?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL and PHP

2004-11-24 Thread John Nichel
Jay Blanchard wrote:
snip
This is probably a better question for a PHP list.
Do you know of one? ;)
If you're running a rpm based distro (RedHat, Fedora, etc.), and you 
have php installed by rpm, you should just need to install the php-mysql 
rpm, and restart Apache.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Mysql and PHP

2004-09-16 Thread John Nichel
nestor(earth) wrote:
People,
This more of a php mysql question.   I have installed PHP ( 5.01) with 
Apache(1.31) and it runs.
I have install Mysql (the latest as of last night)  and it runs.  My 
problem is that PHP does not see
Mysql.  Now I have done this installation 4 or 5 times but th elast time 
was over a year ago.

Any ideas?
MySQL support is no longer enabled by default in php5.  Under *nix, you 
have to configure --with-mysql=[DIR] or --with-mysqli=[mysql_config] if 
you're planning on using MySQL = 4.1.3.  Under Windows you probably 
have to uncomment an included dll in the php.ini.  Look here...

http://us4.php.net/manual/en/ref.mysql.php
http://us4.php.net/manual/en/ref.mysqli.php
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Mysql and PHP

2004-09-16 Thread leegold

On Thu, 16 Sep 2004 09:27:08 -0400, John Nichel [EMAIL PROTECTED]
said:
 nestor(earth) wrote:
  People,
  
  This more of a php mysql question.   I have installed PHP ( 5.01) with 
  Apache(1.31) and it runs.
  I have install Mysql (the latest as of last night)  and it runs.  My 
  problem is that PHP does not see
  Mysql.  Now I have done this installation 4 or 5 times but th elast time 
  was over a year ago.
  
  Any ideas?

This might be an issue:
http://dev.mysql.com/doc/mysql/en/Old_client.html


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Mysql and PHP

2004-09-15 Thread Nestor Florez
OS is W2K.

-Original Message-
From: nestor(earth) [EMAIL PROTECTED]
Sent: Sep 15, 2004 8:04 AM
To: 
Cc: [EMAIL PROTECTED]
Subject: Mysql and PHP

People,

This more of a php mysql question.   I have installed PHP ( 5.01) with 
Apache(1.31) and it runs.
I have install Mysql (the latest as of last night)  and it runs.  My 
problem is that PHP does not see
Mysql.  Now I have done this installation 4 or 5 times but th elast time 
was over a year ago.

Any ideas?

Thanks!

Nestor :-)
http://www.IneedWork.org

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Mysql and PHP

2004-09-15 Thread andy thomas
On Wed, 15 Sep 2004, nestor(earth) wrote:

 People,

 This more of a php mysql question.   I have installed PHP ( 5.01) with
 Apache(1.31) and it runs.
 I have install Mysql (the latest as of last night)  and it runs.  My
 problem is that PHP does not see
 Mysql.  Now I have done this installation 4 or 5 times but th elast time
 was over a year ago.

Did you build both php and apache with MySQL support?

Andy



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Mysql and PHP

2004-09-15 Thread Greg Donald
On Wed, 15 Sep 2004 08:04:08 -0700, nestor(earth)
[EMAIL PROTECTED] wrote:
 This more of a php mysql question.   I have installed PHP ( 5.01) with
 Apache(1.31) and it runs.
 I have install Mysql (the latest as of last night)  and it runs.  My
 problem is that PHP does not see
 Mysql.  Now I have done this installation 4 or 5 times but th elast time
 was over a year ago.
 
 Any ideas?

Perhaps this will help:
http://www.wampserver.com/en/faq.php#q5


-- 
Greg Donald
http://gdconsultants.com/
http://destiney.com/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Mysql and PHP

2004-09-15 Thread Greg Donald
On Wed, 15 Sep 2004 16:02:45 +0100 (BST), andy thomas [EMAIL PROTECTED] wrote:
 Did you build both php and apache with MySQL support?

I wasn't aware you could build Apache with MySQL support.  How is that done?


-- 
Greg Donald
http://gdconsultants.com/
http://destiney.com/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Mysql and PHP

2004-09-15 Thread Jim Grill
 People,

 This more of a php mysql question.   I have installed PHP ( 5.01) with
 Apache(1.31) and it runs.
 I have install Mysql (the latest as of last night)  and it runs.  My
 problem is that PHP does not see
 Mysql.  Now I have done this installation 4 or 5 times but th elast time
 was over a year ago.

 Any ideas?

 Thanks!

 Nestor :-)
 http://www.IneedWork.org


How about some more info. Did you install PHP from source or an RPM? Did you
configure PHP --with-mysql or --with-mysqli? Did you install MySQL after you
installed PHP and Apache or before?

Regards

Jim Grill



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Mysql and PHP

2004-09-15 Thread Eve Atley

You will likely want to read this:
http://us4.php.net/mysql

In PHP 5, MySQL is no longer enabled by default, nor is the MySQL library
bundled with PHP. Read this  FAQ for details on why. Because of this,
Windows users will need to enable php_mysql.dll inside of php.ini and either
copy libmysql.dll into the Windows system directory or make it available to
the PATH. For compiling, simply use  --with-mysql=[DIR] where [DIR] points
to your MySQL installation directory.


- Eve



-Original Message-
From: andy thomas [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 15, 2004 11:03 AM
To: nestor(earth)
Cc: [EMAIL PROTECTED]
Subject: Re: Mysql and PHP


On Wed, 15 Sep 2004, nestor(earth) wrote:

 People,

 This more of a php mysql question.   I have installed PHP ( 5.01) with
 Apache(1.31) and it runs.
 I have install Mysql (the latest as of last night)  and it runs.  My
 problem is that PHP does not see
 Mysql.  Now I have done this installation 4 or 5 times but th elast time
 was over a year ago.

Did you build both php and apache with MySQL support?

Andy



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Mysql and PHP

2004-09-15 Thread andy thomas
On Wed, 15 Sep 2004, Greg Donald wrote:

 On Wed, 15 Sep 2004 16:02:45 +0100 (BST), andy thomas [EMAIL PROTECTED] wrote:
  Did you build both php and apache with MySQL support?

 I wasn't aware you could build Apache with MySQL support.  How is that done?

Apologies - I should have said just php.

Andy



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Mysql and PHP

2004-09-15 Thread Curtis Maurand

You have to rebuild PHP against the new MySQL libraries.

Curtis

Greg Donald said:
 On Wed, 15 Sep 2004 08:04:08 -0700, nestor(earth)
 [EMAIL PROTECTED] wrote:
 This more of a php mysql question.   I have installed PHP ( 5.01) with
 Apache(1.31) and it runs.
 I have install Mysql (the latest as of last night)  and it runs.  My
 problem is that PHP does not see
 Mysql.  Now I have done this installation 4 or 5 times but th elast time
 was over a year ago.

 Any ideas?

 Perhaps this will help:
 http://www.wampserver.com/en/faq.php#q5


 --
 Greg Donald
 http://gdconsultants.com/
 http://destiney.com/

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Mysql and PHP

2004-09-15 Thread Chris Blackwell
slightly off topic, but you can sort of build apache with mysql support.

mod_auth_mysql allows you to authenticate users and groups against a DB

http://sourceforge.net/projects/modauthmysql/

chris

-Original Message-
From: andy thomas [mailto:[EMAIL PROTECTED] 
Sent: 15 September 2004 16:22
To: Greg Donald
Cc: [EMAIL PROTECTED]
Subject: Re: Mysql and PHP

On Wed, 15 Sep 2004, Greg Donald wrote:

 On Wed, 15 Sep 2004 16:02:45 +0100 (BST), andy thomas [EMAIL PROTECTED]
wrote:
  Did you build both php and apache with MySQL support?

 I wasn't aware you could build Apache with MySQL support.  How is that
done?

Apologies - I should have said just php.

Andy



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Mysql and PHP

2004-09-15 Thread andy thomas
On Wed, 15 Sep 2004, Chris Blackwell wrote:

 slightly off topic, but you can sort of build apache with mysql support.

 mod_auth_mysql allows you to authenticate users and groups against a DB

 http://sourceforge.net/projects/modauthmysql/

That's actually the reason I originally said I compiled my apache with MySQL
support! I tend to build my apache httpd with modules like php and
mod_auth_mysql statically compiled into the binary (for speed and
performance reasons) rather than loaded at run-time as a dynamic module.

Andy

 -Original Message-
 From: andy thomas [mailto:[EMAIL PROTECTED]
 Sent: 15 September 2004 16:22
 To: Greg Donald
 Cc: [EMAIL PROTECTED]
 Subject: Re: Mysql and PHP

 On Wed, 15 Sep 2004, Greg Donald wrote:

  On Wed, 15 Sep 2004 16:02:45 +0100 (BST), andy thomas [EMAIL PROTECTED]
 wrote:
   Did you build both php and apache with MySQL support?
 
  I wasn't aware you could build Apache with MySQL support.  How is that
 done?

 Apologies - I should have said just php.

 Andy



 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]





 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Mysql and PHP

2004-09-15 Thread Eve Atley

This is also very useful:

Getting PHP 5 to work with MySQL
http://www.phpbuilder.com/board/showthread.php?s=threadid=10246585

- Eve



-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 15, 2004 11:10 AM
To: nestor(earth)
Cc: [EMAIL PROTECTED]
Subject: Re: Mysql and PHP


On Wed, 15 Sep 2004 08:04:08 -0700, nestor(earth)
[EMAIL PROTECTED] wrote:
 This more of a php mysql question.   I have installed PHP ( 5.01) with
 Apache(1.31) and it runs.
 I have install Mysql (the latest as of last night)  and it runs.  My
 problem is that PHP does not see
 Mysql.  Now I have done this installation 4 or 5 times but th elast time
 was over a year ago.
 
 Any ideas?

Perhaps this will help:
http://www.wampserver.com/en/faq.php#q5


-- 
Greg Donald
http://gdconsultants.com/
http://destiney.com/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Mysql and PHP

2004-09-15 Thread nestor(earth)
Thanks to all for your replies!
Installing myodbc fixed the problem.
Thanks again!
Eve Atley wrote:
This is also very useful:
Getting PHP 5 to work with MySQL
http://www.phpbuilder.com/board/showthread.php?s=threadid=10246585
- Eve

-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 15, 2004 11:10 AM
To: nestor(earth)
Cc: [EMAIL PROTECTED]
Subject: Re: Mysql and PHP
On Wed, 15 Sep 2004 08:04:08 -0700, nestor(earth)
[EMAIL PROTECTED] wrote:
 

This more of a php mysql question.   I have installed PHP ( 5.01) with
Apache(1.31) and it runs.
I have install Mysql (the latest as of last night)  and it runs.  My
problem is that PHP does not see
Mysql.  Now I have done this installation 4 or 5 times but th elast time
was over a year ago.
Any ideas?
   

Perhaps this will help:
http://www.wampserver.com/en/faq.php#q5
 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MySql and php

2004-02-24 Thread Ligaya Turmelle
You can do a simple if statement.  Instead of using a foreach I would use a
while with list
Example in pseudocode:
(while(list($col1, $col2, $col3) = @mysql_fetch_row($resultID))

and then
if ($col3 == value1)
echo td stuff with bgcolor = whatever;
else
echo td stuff with bgcolor = something else;
end if
echo $col3;

make sense?

Respectfully,
Ligaya Turmelle
CurlyBraces Technologies ( Pvt ) Ltd [EMAIL PROTECTED] wrote in
message news:[EMAIL PROTECTED]

- Original Message - 
From: CurlyBraces Technologies ( Pvt ) Ltd
To: Eve Atley
Sent: Tuesday, February 24, 2004 2:15 AM
Subject: Re: MySql and php


thanx alot for ur reply , i think better to send my script to u .In third
collom , there is two different status . I want to highlight those with two
different colors.There is to be satisfied some simple condition , plz help


thanx
curlys

?php
/* Connecting, selecting database */
$link = mysql_connect(localhost, root, *)
or die(Could not connect);
/*print Connected successfully;*/
mysql_select_db(smsc) or die(Could not select database);

/* Performing SQL query */
$query = SELECT * FROM ServiceStatus;
$result = mysql_query($query) or die(Query failed);

/* Printing results in HTML */
print table\n;
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
print \ttr\n;
foreach ($line as $col_value) {
print \t\ttd$col_value/td\n;
}
print \t/tr\n;
}
print /table\n;

/* Free resultset */
mysql_free_result($result);

/* Closing connection */
mysql_close($link);
?



- Original Message - 
From: Eve Atley
To: CurlyBraces Technologies ( Pvt ) Ltd
Sent: Tuesday, February 24, 2004 4:52 AM
Subject: RE: MySql and php


You want the rows to alternate colors in the table, you mean? That's easy.

 ?
function alternate_2colors($color_1, $color_2, $cpt)
{
 $colors = ($cpt % 2) ? $color_1 : $color_2;
 return $colors;
}

  while ($row = mysql_fetch_array($result_jobslisting, MYSQL_ASSOC)) {
   $nb += 1;
   $colors = alternate_2colors('#C0C0C0', '#FF', $nb);
 ?

   tr bgcolor=?php echo $colors; ?
  td width=39%

html content here

  /td
  /tr

 ?
  }
 ?

Eve Atley
WOW Corporation LLC.
555 North Bell Ave.
Carnegie, PA 15106
TEL: 412-278-1838
CELL: 412-716-6060

-Original Message-
From: CurlyBraces Technologies ( Pvt ) Ltd [mailto:[EMAIL PROTECTED]
Sent: Monday, February 23, 2004 10:05 AM
To: [EMAIL PROTECTED]
Subject: MySql and php


hi ,
i have a problem with Mysql Vs php .. Can somebody help me to sort out this
problem ?

I wrote a php script to connet mysql data base and get some data from some
table of the database. It works well ..

1data1data2
5cccxcx
3aaa123
2klklopop
4opoppop

I want do the sort for the fields while its showing from the web. and in the
third data field i want to add some colors while its running in the html .

can some body help me to do the scripting plz ?

thanx in advace

curlys



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySql and php

2004-02-23 Thread Ligaya Turmelle
There are some excellent tutorials for PHP at www.codewalkers.com under the
tutorials/basics section.  You can sort the fields with SQL or with PHP (see
Sorting Database Results with PHP) and in the Display section of the
tutorials are Alternating row colors with PHP and MySQL and Multicolumn
output from a database with PHP.  If you have questions on the PHP their
are multiple forums to go to for help.  I personally use www.phphelp.com.

Good luck

Respectfully,
Ligaya Turmelle

CurlyBraces Technologies ( Pvt ) Ltd [EMAIL PROTECTED] wrote in
message news:[EMAIL PROTECTED]
hi ,
i have a problem with Mysql Vs php . Can somebody help me to sort out this
problem ?

I wrote a php script to connet mysql data base and get some data from some
table of the database. It works well ..

1data1data2
5cccxcx
3aaa123
2klklopop
4opoppop

I want do the sort for the fields while its showing from the web. and in the
third data field i want to add some colors while its running in the html .

can some body help me to do the scripting plz ?

thanx in advace

curlys



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL and PHP

2004-02-10 Thread Peter J Milanese


You need to install the client side of mysql on the linux box (libmysql.*)

then compile php with the mysql modules (I think they exist in RPMs)

P
-Eric W. Holzapfel [EMAIL PROTECTED] wrote: -

To: [EMAIL PROTECTED]
From: Eric W. Holzapfel [EMAIL PROTECTED]
Date: 02/10/2004 02:55PM
Subject: MySQL and PHP

Hello Mysql listers,

I have a mysql db running on a Slackware Linux box. I have an Apache
webserver running on a Red Hat Enterprise box. (Mysql 4.0.15a, apached
2.0, php 4.3.2). I think (!!?) I have php on the Red hat box, version
4.3.2.

I have been trying without success to use php on apache to connect to
the db on slackware box. I do not have MySQL installed on the Redhat
box (but do have the mysql client installed). Do I need to install
MySQL on the red hat machine to get commands like: mysql_connect,
mysql_pconnect to work??? My php does not recognize these commands.
Also my php will not connect to the database using a php script like:
mysql://user:[EMAIL PROTECTED] phpdemo where user is the username,
passwrd is the password, etc. I can log on locally to the Slackware
box, and connect to the db using the user and password, etc. And I can
also use ODBC from a windows box to connect.

any ideas on how to set this beginner (me) straight

Thanks,

eric


--
MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL and PHP

2004-02-10 Thread Szymon Machajewski
Yes, you can download the package or install from RH CD:
 
php-mysql
 
http://rpmfind.net/linux/rpm2html/search.php?query=php_mysqlsubmit=Search+...system=arch=
 
This is required so PHP will have support for mysql functions.  You
apache should be ok without changes.
 
Sincerely,
 
Szymon Machajewski MCSD, CNA, MySQL Core
Grand Rapids Community College
 
Open Sourceror


 Peter J Milanese [EMAIL PROTECTED] 2/10/2004 2:54:40 PM 



You need to install the client side of mysql on the linux box
(libmysql.*)

then compile php with the mysql modules (I think they exist in RPMs)

P
-Eric W. Holzapfel [EMAIL PROTECTED] wrote: -

To: [EMAIL PROTECTED]
From: Eric W. Holzapfel [EMAIL PROTECTED]
Date: 02/10/2004 02:55PM
Subject: MySQL and PHP

Hello Mysql listers,

I have a mysql db running on a Slackware Linux box. I have an Apache
webserver running on a Red Hat Enterprise box. (Mysql 4.0.15a, apached
2.0, php 4.3.2). I think (!!?) I have php on the Red hat box, version
4.3.2.

I have been trying without success to use php on apache to connect to
the db on slackware box. I do not have MySQL installed on the Redhat
box (but do have the mysql client installed). Do I need to install
MySQL on the red hat machine to get commands like: mysql_connect,
mysql_pconnect to work??? My php does not recognize these commands.
Also my php will not connect to the database using a php script like:
mysql://user:[EMAIL PROTECTED] phpdemo where user is the username,
passwrd is the password, etc. I can log on locally to the Slackware
box, and connect to the db using the user and password, etc. And I can
also use ODBC from a windows box to connect.

any ideas on how to set this beginner (me) straight

Thanks,

eric


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:   
http://lists.mysql.com/[EMAIL PROTECTED]




Re: MySQL and PHP - At last and Thanks

2004-02-10 Thread Eric W. Holzapfel
Hello Guys (gals?) and the list,

Thank you very much for the tips.  Your help put me on the correct path, 
and I was  able to install the products you suggested,  and it seems 
that my dummy database demo is now working.  Thank you for the help.  
I am a smarter newbie now!

eric

[EMAIL PROTECTED] wrote:

You need to install the client side of mysql on the linux box (libmysql.*)

then compile php with the mysql modules (I think they exist in RPMs)

P
-Eric W. Holzapfel [EMAIL PROTECTED] wrote: -
To: [EMAIL PROTECTED]
From: Eric W. Holzapfel [EMAIL PROTECTED]
Date: 02/10/2004 02:55PM
Subject: MySQL and PHP
Hello Mysql listers,

I have a mysql db running on a Slackware Linux box. I have an Apache
webserver running on a Red Hat Enterprise box. (Mysql 4.0.15a, apached
2.0, php 4.3.2). I think (!!?) I have php on the Red hat box, version
4.3.2.
I have been trying without success to use php on apache to connect to
the db on slackware box. I do not have MySQL installed on the Redhat
box (but do have the mysql client installed). Do I need to install
MySQL on the red hat machine to get commands like: mysql_connect,
mysql_pconnect to work??? My php does not recognize these commands.
Also my php will not connect to the database using a php script like:
mysql://user:[EMAIL PROTECTED] phpdemo where user is the username,
passwrd is the password, etc. I can log on locally to the Slackware
box, and connect to the db using the user and password, etc. And I can
also use ODBC from a windows box to connect.
any ideas on how to set this beginner (me) straight

Thanks,

eric

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MySQL 4.0.17, PHP, and RPMs

2003-12-22 Thread John Nichel
Zsombor Papp wrote:

Hi,

I would like to have MySQL 4.0.17, Apache, and PHP
with access to MySQL, all this on a Linux server. So
far I have RedHat 8.0 and MySQL 4.0.17 installed. I
would like to know if there are any Apache and PHP RPM
packages that I could install on top of this. I did
try 2.0.40 and 2.0.48 on the Apache side and 4.3.x and
4.4.3-1 on the PHP side but it didn't work (for now I
will asume that it is a well known fact that these
don't work together -- if it's not, then I can provide
details of how it didn't work for me).
Emphasis is on RPM packages. I did not try to
compile the sources, and I would like to avoid doing
that if only possible. Nonetheless I would be grateful
for any advice, even if it involves compiling.
Thanks,

Zsombor
You also need to install the php-mysql-4.x rpm

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MySQL 4.0.17, PHP, and RPMs

2003-12-22 Thread Zsombor Papp
I did try to install php-mysql-4.3.4-1 (I just noticed
that I mistyped the PHP version numbers below, I tried
4.2.x and 4.3.4-1), and everything else the RPM
dependency checks were complaining about. I gave up
when it looked like I would have to install two
conflicting versions of openssl to avoid dependency
failures.

However, if you actually have a system with MySQL
4.0.17, Apache, and PHP, would you mind to send me the
output of 'rpm -qa'?

Thanks,

Zsombor

--- John Nichel [EMAIL PROTECTED] wrote:
 Zsombor Papp wrote:
 
  Hi,
  
  I would like to have MySQL 4.0.17, Apache, and PHP
  with access to MySQL, all this on a Linux server.
 So
  far I have RedHat 8.0 and MySQL 4.0.17 installed.
 I
  would like to know if there are any Apache and PHP
 RPM
  packages that I could install on top of this. I
 did
  try 2.0.40 and 2.0.48 on the Apache side and 4.3.x
 and
  4.4.3-1 on the PHP side but it didn't work (for
 now I
  will asume that it is a well known fact that these
  don't work together -- if it's not, then I can
 provide
  details of how it didn't work for me).
  
  Emphasis is on RPM packages. I did not try to
  compile the sources, and I would like to avoid
 doing
  that if only possible. Nonetheless I would be
 grateful
  for any advice, even if it involves compiling.
  
  Thanks,
  
  Zsombor
 
 You also need to install the php-mysql-4.x rpm
 
 -- 
 By-Tor.com
 It's all about the Rush
 http://www.by-tor.com
 


__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL 4.0.17, PHP, and RPMs

2003-12-22 Thread John Nichel
Zsombor Papp wrote:

I did try to install php-mysql-4.3.4-1 (I just noticed
that I mistyped the PHP version numbers below, I tried
4.2.x and 4.3.4-1), and everything else the RPM
dependency checks were complaining about. I gave up
when it looked like I would have to install two
conflicting versions of openssl to avoid dependency
failures.
However, if you actually have a system with MySQL
4.0.17, Apache, and PHP, would you mind to send me the
output of 'rpm -qa'?
Thanks,

Zsombor
I don't use RPM's for anything but what the system installs.  I've 
installed Apache (1.3.29), MySQL (4.0.16), php (4.3.4), etc. from source.

http://www.by-tor.com/phpinfo.php

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MySQL 4.0.17, PHP, and RPMs

2003-12-22 Thread Zsombor Papp

--- John Nichel [EMAIL PROTECTED] wrote:
 Zsombor Papp wrote:
 
  I did try to install php-mysql-4.3.4-1 (I just
 noticed
  that I mistyped the PHP version numbers below, I
 tried
  4.2.x and 4.3.4-1), and everything else the RPM
  dependency checks were complaining about. I gave
 up
  when it looked like I would have to install two
  conflicting versions of openssl to avoid
 dependency
  failures.
  
  However, if you actually have a system with MySQL
  4.0.17, Apache, and PHP, would you mind to send me
 the
  output of 'rpm -qa'?
  
  Thanks,
  
  Zsombor
 
 I don't use RPM's for anything but what the system
 installs.  I've installed Apache (1.3.29), MySQL
 (4.0.16), php (4.3.4), etc. from source.

Yeah, that's what I feared. :) Nevertheless, thanks
for the info. I'll do the same unless I find someone
who managed to use the RPMs.

Thanks,

Zsombor

 
 http://www.by-tor.com/phpinfo.php
 


__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL and Php

2003-10-10 Thread Rory McKinley
Hi Caspar

Also try phpbuilder.com, and zend.com. Alternatively, try googling PHP
tutorials.

Regards

Rory McKinley
Nebula Solutions
+27 82 857 2391
[EMAIL PROTECTED]
There are 10 kinds of people in this world,
those who understand binary and those who don't (Unknown)
- Original Message - 
From: Casper Matthee [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 9:33 PM
Subject: MySQL and Php


 Hi all

 I am new to the programming world so please forgive!!!

 Would like to get to get my hands on any info (Tutorials and such) to
 help me on me way whith SQL and Php

 Would appreciate any help... links / text / whatever...

 Thanx
 Casper

 South Africa

 Casper Matthee
 Consultant
 IT3 Educational Systems

 Tel: (021) 970 4005
 Cell: 083 360 5669
 Mail:  [EMAIL PROTECTED]


 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: MySQL and Php

2003-10-09 Thread Dathan Vance Pattishall
Goto www.devshed.com some nice resources there, from introductions to
advance topics.

- Dathan Vance Pattishall
  - Sr. Programmer and mySQL DBA for FriendFinder Inc.
  - http://friendfinder.com/go/p40688


---Original Message-
--From: Casper Matthee [mailto:[EMAIL PROTECTED]
--Sent: Thursday, October 09, 2003 12:34 PM
--To: 
--Subject: MySQL and Php
--
--Hi all
--
--I am new to the programming world so please forgive!!!
--
--Would like to get to get my hands on any info (Tutorials and such) to
--help me on me way whith SQL and Php
--
--Would appreciate any help... links / text / whatever...
--
--Thanx
--Casper
--
--South Africa
--
--Casper Matthee
--Consultant
--IT3 Educational Systems
--
--Tel: (021) 970 4005
--Cell: 083 360 5669
--Mail:  [EMAIL PROTECTED]
--
--

--MySQL General Mailing List
--For list archives: http://lists.mysql.com/mysql
--To unsubscribe:
--http://lists.mysql.com/[EMAIL PROTECTED]




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL and PHP question

2002-12-18 Thread C. Reeve
Thanks for the info. I tried using mysql_free_result()  and mysql_close($db)
and opening the DB again for the second query with the same results. I
haven't tried using a different variable for $result.

- Original Message -
From: Steve Yates [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 1:32 AM
Subject: Re: MySQL and PHP question


 On Wed, 18 Dec 2002 22:54:53 -0500, C. Reeve wrote:
 while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
 $num1 = $line['number'];
 }

 Loop through the result and return the value from the last row?
  Did you want select sum(number) as SubTotal1 from table1 where
 userid=$user1?

 $query select number from table2 where userid=$user2;
 $result = mysql_query($query) or die(Query failed);

 You re-used the same variable $result.  Offhand I would try
 using a second variable, and/or using mysql_free_result() in between.

  - Steve Yates
  - My hard disk is full!  Maybe I'll try this message section thing.

 ~ Taglines by Taglinator - www.srtware.com ~


 -
 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





-
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




Re: MySQL and PHP question

2002-12-17 Thread Chris Boget
 Why is it that I can not use two mysql queries in the same PHP file. 

You can, I assure you.

 Any info is appreciated.

Perhaps if you could provide your code?  W/o it there is no way we can
determine where the problem might be coming from.

Chris


-
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




Re: MySQL and PHP question

2002-12-17 Thread Steve Yates
On Wed, 18 Dec 2002 16:05:35 -0500, C. Reeve wrote:

I can not use two mysql queries in the same PHP file

Please post code snippets, this is possible.

 - Steve Yates
 - Burger Borg:  We do it our way; yours is irrelevant.

~ Taglines by Taglinator - www.srtware.com ~


-
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




RE: MySQL and PHP question

2002-12-17 Thread Fraser Stuart
I can...

Hard to know why without more info but a starting point would be to turn on
the query log in MySQL and see what queries it is receiving.

_

 Fraser Stuart
 Logistics IT

 77-85Phone: +61 2 9335 1235
 Roberts Rd  Mobile: +61 419 233 732
 Greenacre NSW [EMAIL PROTECTED]
 Australia 2190  www.toll.com.au
_

| -Original Message-
| From: C. Reeve [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, 19 December 2002 8:06 AM
| To: MySQL List
| Subject: MySQL and PHP question
|
|
| Hi,
|
| Why is it that I can not use two mysql queries in the same PHP
| file. I have
| tried to do this several times trying to put my site together and have had
| nothing but problems.
|
| The recent one is this:
|
| I use a SELECT statement to get some info from a table, then I modify that
| info and use an UPDATE statement to update another table. The update does
| not work (all variables used by PHP contain the proper values as does the
| info selected from the table).
|
| I get no errors as it appears the update worked, but the table was not
| updated.
|
| I have also found that I can not do two select statements in the same PHP
| file, as the second one will not contain any data . The query
| does not fail,
| there is just no data.
|
| Any info is appreciated.
|
| TIA
|
|
|
|
|
| -
| 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
|
|


-
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




Re: MySQL and PHP question

2002-12-17 Thread C. Reeve
 I've since deleted the code and did it another way. The code however went
something like this. This is just a mock up (there is more being selected
etc and there are some joins, but the syntax is exact).

So what happens is the select statement with $user1 in it gets the proper
values (the first one in the example), the other one doesn't, but if I
change $user1 and $user2 around the second select will get the values.

So on the surface it sounds like a problem with $user2, but I have run
extensive tests and $user2 gets the proper values (they both come from a
form).

In another project I am doing, I tried a similar feat with totally different
values and got the same results. This time I was trying to do one SELECT and
one UPDATE.

If anyone has any ideas it would be appreciated. Also, if there is a better
way to do the following this would also be appreciated.

$query select number from table1 where userid=$user1;
$result = mysql_query($query) or die(Query failed);

while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$num1 = $line['number'];
}

$query select number from table2 where userid=$user2;
$result = mysql_query($query) or die(Query failed);

while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$num2 = $line['number'];
}

$total = $num1 + $num2;

mysql_query(UPDATE table3 SET total = '$total' WHERE userid=$user);

TIA

- Original Message -
From: Steve Yates [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 5:12 PM
Subject: Re: MySQL and PHP question


 On Wed, 18 Dec 2002 16:05:35 -0500, C. Reeve wrote:

 I can not use two mysql queries in the same PHP file

 Please post code snippets, this is possible.

  - Steve Yates
  - Burger Borg:  We do it our way; yours is irrelevant.

 ~ Taglines by Taglinator - www.srtware.com ~


 -
 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





-
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




Re: MySQL and PHP question

2002-12-17 Thread Steve Yates
On Wed, 18 Dec 2002 22:54:53 -0500, C. Reeve wrote:
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$num1 = $line['number'];
}

Loop through the result and return the value from the last row?
 Did you want select sum(number) as SubTotal1 from table1 where
userid=$user1?

$query select number from table2 where userid=$user2;
$result = mysql_query($query) or die(Query failed);

You re-used the same variable $result.  Offhand I would try
using a second variable, and/or using mysql_free_result() in between.

 - Steve Yates
 - My hard disk is full!  Maybe I'll try this message section thing.

~ Taglines by Taglinator - www.srtware.com ~


-
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




RE: mysql and php

2002-12-02 Thread daniel
this is a vague one , would be good to copy and paste the php debug message
= Original Message From Jerry M. Howell II [EMAIL PROTECTED] =
Hello all,

   We are leasing a dedicated server and seem to pe having problems getting 
our
php script working with mysql. The script was working fine with the last 
server
we were on so I'm wondering if you all have any sugestions. We are hosting on 
a
redhat 7.3 server with MySQL-3.23.53a-1.i386.rpm It would seem they have
MySQL-client-3.23.53a-1.i386.rpm
MySQL-devel-3.23.53a-1.i386.rpm
MySQL-shared-3.23.53a-1.i386.rpm

We have talked to the ppl that set the server up and they assure us it's a 
scripting
error with our php file. That script I will save for the php list unless you 
all feal
it's nessisary topost it here. Is there any permision issues I should look 
into or
something they might have overlooked in the install? I apreciate any help I 
can get
on this issue.

thnx
--
Jerry M. Howell II

-
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



-
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




Re: mysql and php

2002-12-02 Thread Jerry M . Howell II
Error in input query

 start of php database code *

$connection = mysql_connect(localhost, hostbyk1_admin,
mypassword) or
die(Invalid
server or user);
mysql_select_db(hostbyk1_order,$connection);

/ ***
Make sure you replace USERS with your table name
***/
$query = insert into client
(  last_name,first_name,address,city,
state,country,zip,phone,email,
refer,ip_address,package,domain,color,due_date)·
values('$last_name','$first_name','$address','$city',
'$state','$country','$zip','$phone','$email',
'$refer','$ip','$package','$domain','$color','$due_date');
/* **
this is what does the work, if you get this error, you know you·
connected to the dbase, but something is wrong with your query
***/
$result = mysql_query($query,$connection)or die(Error in input
query);
 End of php database code *

as you can see the username is hostbyk1_admin

password I actualy changed for obvious reasons

the database I'm trying to acsess is hostbyk1_order

and the table name is client

I also tested it from the command line and can access the
database just fine
it might be a scripting error but I've searched the web for
templates and they
all seem to use this format so I'm stumped

On Mon, 2 Dec 2002 23:59:35 -0500
daniel [EMAIL PROTECTED] wrote:

 this is a vague one , would be good to copy and paste the php debug message
 = Original Message From Jerry M. Howell II [EMAIL PROTECTED] =
 Hello all,
 
We are leasing a dedicated server and seem to pe having problems getting 
 our
 php script working with mysql. The script was working fine with the last 
 server
 we were on so I'm wondering if you all have any sugestions. We are hosting on 
 a
 redhat 7.3 server with MySQL-3.23.53a-1.i386.rpm It would seem they have
 MySQL-client-3.23.53a-1.i386.rpm
 MySQL-devel-3.23.53a-1.i386.rpm
 MySQL-shared-3.23.53a-1.i386.rpm
 
 We have talked to the ppl that set the server up and they assure us it's a 
 scripting
 error with our php file. That script I will save for the php list unless you 
 all feal
 it's nessisary topost it here. Is there any permision issues I should look 
 into or
 something they might have overlooked in the install? I apreciate any help I 
 can get
 on this issue.
 
 thnx
 --
 Jerry M. Howell II
 
 -
 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
 
 
 
 


-- 
Jerry M. Howell II

-
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




Re: mysql and php

2002-12-02 Thread Alex Pukinskis
Why not change your error message display so it's more informative? 
Instead of

	die(Error in input query);

try this:

	or die (Error in input query:  . mysql_error() . ($query)/p);

That way, you can see exactly what MySQL says the error was, and exactly 
how the query came out.  It's really hard to debug this sort of thing 
without seeing the fully formed query.

-Alex

On Monday, December 2, 2002, at 09:34  PM, Jerry M.Howell II wrote:

Error in input query

 start of php database code *

$connection = mysql_connect(localhost, hostbyk1_admin,
mypassword) or
die(Invalid
server or user);
mysql_select_db(hostbyk1_order,$connection);

/ ***
Make sure you replace USERS with your table name
***/
$query = insert into client
(  last_name,first_name,address,city,
state,country,zip,phone,email,
refer,ip_address,package,domain,color,due_date)·
values('$last_name','$first_name','$address','$city',
'$state','$country','$zip','$phone','$email',
'$refer','$ip','$package','$domain','$color','$due_date');
/* **
this is what does the work, if you get this error, you know you·
connected to the dbase, but something is wrong with your query
***/
$result = mysql_query($query,$connection)or die(Error in input
query);
 End of php database code *

as you can see the username is hostbyk1_admin

password I actualy changed for obvious reasons

the database I'm trying to acsess is hostbyk1_order

and the table name is client

I also tested it from the command line and can access the
database just fine
it might be a scripting error but I've searched the web for
templates and they
all seem to use this format so I'm stumped

On Mon, 2 Dec 2002 23:59:35 -0500
daniel [EMAIL PROTECTED] wrote:


this is a vague one , would be good to copy and paste the php debug 
message
= Original Message From Jerry M. Howell II 
[EMAIL PROTECTED] =
Hello all,

  We are leasing a dedicated server and seem to pe having problems 
getting
our

php script working with mysql. The script was working fine with the 
last
server

we were on so I'm wondering if you all have any sugestions. We are 
hosting on
a

redhat 7.3 server with MySQL-3.23.53a-1.i386.rpm It would seem they 
have
MySQL-client-3.23.53a-1.i386.rpm
MySQL-devel-3.23.53a-1.i386.rpm
MySQL-shared-3.23.53a-1.i386.rpm

We have talked to the ppl that set the server up and they assure us 
it's a
scripting

error with our php file. That script I will save for the php list 
unless you
all feal

it's nessisary topost it here. Is there any permision issues I should 
look
into or

something they might have overlooked in the install? I apreciate any 
help I
can get

on this issue.

thnx
--
Jerry M. Howell II

-
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








--
Jerry M. Howell II

-
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 mysql-unsubscribe-
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php





-
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




Re: mysql and php

2002-12-02 Thread Jerry M . Howell II
Thank you Daniel,

   You remided me that I once had a page with the following instead mysql_error()
and that gave me the verbosity that I needed to get things working. Looks like my
wife changed some fields in the database without thinking how they might affect the
script. Can't believe I didn't compare the database to the script in the first place.
gr

On Mon, 2 Dec 2002 23:34:45 -0500
Jerry M. Howell II [EMAIL PROTECTED] wrote:

 Error in input query
 
  start of php database code *
 
 $connection = mysql_connect(localhost, hostbyk1_admin,
 mypassword) or
 die(Invalid
 server or user);
 mysql_select_db(hostbyk1_order,$connection);
 
 / ***
 Make sure you replace USERS with your table name
 ***/
 $query = insert into client
 (  last_name,first_name,address,city,
 state,country,zip,phone,email,
 refer,ip_address,package,domain,color,due_date)·
 values('$last_name','$first_name','$address','$city',
 '$state','$country','$zip','$phone','$email',
 '$refer','$ip','$package','$domain','$color','$due_date');
 /* **
 this is what does the work, if you get this error, you know you·
 connected to the dbase, but something is wrong with your query
 ***/
 $result = mysql_query($query,$connection)or die(Error in input
 query);
  End of php database code *
 
 as you can see the username is hostbyk1_admin
 
 password I actualy changed for obvious reasons
 
 the database I'm trying to acsess is hostbyk1_order
 
 and the table name is client
 
 I also tested it from the command line and can access the
 database just fine
 it might be a scripting error but I've searched the web for
 templates and they
 all seem to use this format so I'm stumped
 
 On Mon, 2 Dec 2002 23:59:35 -0500
 daniel [EMAIL PROTECTED] wrote:
 
  this is a vague one , would be good to copy and paste the php debug message
  = Original Message From Jerry M. Howell II [EMAIL PROTECTED] =
  Hello all,
  
 We are leasing a dedicated server and seem to pe having problems getting 
  our
  php script working with mysql. The script was working fine with the last 
  server
  we were on so I'm wondering if you all have any sugestions. We are hosting on 
  a
  redhat 7.3 server with MySQL-3.23.53a-1.i386.rpm It would seem they have
  MySQL-client-3.23.53a-1.i386.rpm
  MySQL-devel-3.23.53a-1.i386.rpm
  MySQL-shared-3.23.53a-1.i386.rpm
  
  We have talked to the ppl that set the server up and they assure us it's a 
  scripting
  error with our php file. That script I will save for the php list unless you 
  all feal
  it's nessisary topost it here. Is there any permision issues I should look 
  into or
  something they might have overlooked in the install? I apreciate any help I 
  can get
  on this issue.
  
  thnx
  --
  Jerry M. Howell II
  
  -
  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
  
  
  
  
 
 
 -- 
 Jerry M. Howell II
 
 -
 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
 
 
 


-- 
Jerry M. Howell II

-
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




Re: Mysql apache php

2001-11-29 Thread Jason Wong

On Thursday 29 November 2001 02:01, Auri Net SAC wrote:
 Hi

 please who knows a package that install apache + php + mysql in linux,
 i know phptriad but its for windows
 Thanks for your answer
 rvj


ApacheToolBox http://www.apachetoolbox.com


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Reappraisal, n.:
An abrupt change of mind after being found out.
*/

-
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




Re: Mysql apache php

2001-11-28 Thread ST Ooi

Foxserv at sourceforge.net

- Original Message -
From: Auri Net SAC [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 29, 2001 2:01 AM
Subject: Mysql apache php


 Hi

 please who knows a package that install apache + php + mysql in linux,
 i know phptriad but its for windows
 Thanks for your answer
 rvj


 -
 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






-
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




Re: Mysql apache php

2001-11-28 Thread EdwardSPL

Auri Net SAC wrote:

 Hi

 please who knows a package that install apache + php + mysql in linux,
 i know phptriad but its for windows
 Thanks for your answer
 rvj

Hello,

If your system is Linux...
You need install Apache , php and MySQL !

Edward.




-
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




RE: MySql and PHP

2001-08-08 Thread Robinson, Mike

I've had no problems at all with this setup.
Locate libmysqlclient.so.10 and make sure the
dir its in is in /etc/ld.so.conf, and run ldconfig.
From a source install, its in /usr/local/mysql/lib/mysql.

 Mike Robinson
 IT / Developer - Toronto Star TV
 Phone: 416.945.8786
 Fax: 416.869.4566
 Email: [EMAIL PROTECTED]


-Original Message-
From: Nicholas Ritter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 3:55 PM
To: MySQL
Subject: Re: MySql and PHP


Speaking of Mysql and PHP, has anyone had a problem compiling PHP 4.0.6 (as
a DSO) with MySQL 3.23.40 in use with Apache 1.3.14 on a redhat 7.0 box?

The error I get occurs when I run apache, during startup it says that it can
load the php module because the libmysqlclient.so.10 file cannot be found,
even though the file is there. Any thoughts?

I figured I would ask here before asking the PHP list because they never
seem to be of much help.

Nicholas



-
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



Re: MySql and PHP

2001-08-07 Thread Tyler Longren

No need to install locally.  You could write everything locally, upload it
to the server, and see if what you wrote works.

Tyler


On Tue, 7 Aug 2001 13:51:01 +0100
Matt Gaskin [EMAIL PROTECTED] wrote:

 Hi All
 
 Currently I have rented space on a Web Server that has MySql installed
 and
 PHP, They have created a database directory for myself. Do I need to
 install
 Mysql and PHP locally to take advantage of this. If so where do I start.
 I
 have had no experience of the above two products, although I have
 written a
 number of websites in HTML and a number of access databases. We have
 just
 started to get a number of enquiries for databases online and would like
 to
 develope in this area.
 
 Thanks
 M
 
 
 -
 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

-
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




Re: MySql and PHP

2001-08-07 Thread Gerald Jensen

Matt:

MySQL and PHP are both 'server-side' components, so there is no need to
instal them locally (unless, of course, you want to do your development and
testing off-line).

If you are doing any significant level of PHP work, I would suggest
installing a local version of both MySQL and PHP. I have local versions
installed on both WinNT and Linux machines on the network ... everything
gets tested on both platforms before it goes live.

Gerald Jensen

- Original Message -
From: Matt Gaskin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 07, 2001 7:51 AM
Subject: MySql and PHP


 Hi All

 Currently I have rented space on a Web Server that has MySql installed and
 PHP, They have created a database directory for myself. Do I need to
install
 Mysql and PHP locally to take advantage of this. If so where do I start. I
 have had no experience of the above two products, although I have written
a
 number of websites in HTML and a number of access databases. We have just
 started to get a number of enquiries for databases online and would like
to
 develope in this area.

 Thanks
 M


 -
 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




-
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




Re: MySql and PHP

2001-08-07 Thread Stefan Hinz

Dear Matt,

 have had no experience of the above two products

just some useful links:

www.phpmyadmin.com

www.php.net/documentation

www.mysql.com/documentation

Regards,

--
  Stefan Hinz
  Geschäftsführer / CEO iConnect e-commerce solutions GmbH
  #  www.js-webShop.com www.iConnect.de
  #  Gustav-Meyer-Allee 25, 13355 Berlin
  #  Tel: +49-30-46307-382  Fax: +49-30-46307-388

- Original Message -
From: Matt Gaskin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 07, 2001 2:51 PM
Subject: MySql and PHP


 Hi All

 Currently I have rented space on a Web Server that has MySql installed
and
 PHP, They have created a database directory for myself. Do I need to
install
 Mysql and PHP locally to take advantage of this. If so where do I
start. I
 have had no experience of the above two products, although I have
written a
 number of websites in HTML and a number of access databases. We have
just
 started to get a number of enquiries for databases online and would
like to
 develope in this area.

 Thanks
 M


 -
 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




-
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




Re: MySql and PHP

2001-08-07 Thread Tonu Samuel

On 07 Aug 2001 13:51:01 +0100, Matt Gaskin wrote:

 Currently I have rented space on a Web Server that has MySql installed and
 PHP, They have created a database directory for myself. Do I need to install
 Mysql and PHP locally to take advantage of this. If so where do I start. I
 have had no experience of the above two products, although I have written a
 number of websites in HTML and a number of access databases. We have just
 started to get a number of enquiries for databases online and would like to
 develope in this area.

I believe your provider should support first step help for you as it
depends on exact details how this site is set up and configured. Also
take a look on simple PHP tutorials on the web.

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Tonu Samuel [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Security Administrator
/_/  /_/\_, /___/\___\_\___/   Hong Kong, China
   ___/   www.mysql.com


-
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




Re: MySql and PHP

2001-08-07 Thread Nicholas Ritter

Speaking of Mysql and PHP, has anyone had a problem compiling PHP 4.0.6 (as
a DSO) with MySQL 3.23.40 in use with Apache 1.3.14 on a redhat 7.0 box?

The error I get occurs when I run apache, during startup it says that it can
load the php module because the libmysqlclient.so.10 file cannot be found,
even though the file is there. Any thoughts?

I figured I would ask here before asking the PHP list because they never
seem to be of much help.

Nicholas



-
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




Re: mysql and PHP problems

2001-07-13 Thread Kevin Smith

I know this sounds bizarre, but I believe that error means the your SQL
statement did not return any rows and you don't have any error checking in
place to cater for this.  I know this, because I did the same thing. ;)

Regards,

Kevin

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 11, 2001 11:31 AM
Subject: mysql and PHP problems


 I have Mysql 3.22 and PHP4 installed with RedHat 7.0 linux distribution.I
created a script connecting my html page with mysql database(function
mysql_pconnect).Everything was working just fine one day but on the next day
I saw a message on my screen "Call to undefined function
mysql_pconnect".Could someone tell me how is it possible?

 ---R--E--K--L--A--M--A---
 Od 9 do 15 lipca na http://hiperpromocja.interia.pl/ niesamowita promocja!
 Odkurzacze i zmywarki renomowanej, niemieckiej firmy o 30% taniej!








 -
 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


-
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




RE: MySql and PHP

2001-07-11 Thread Simon Green

Hi
Well if you are using PHP, what we do is have one user e.g. 'PHPLOGON' that
conects to the DB.
Then when the user logis on thay enter a user name and password, php looks
this up in a table on MySQL (useing user PHPLOGON) and looks in table
faculty (username,password).
This way users do not have direct acsess to the DB!

Simon

-Original Message-
From: Channon Quillen [mailto:[EMAIL PROTECTED]]
Sent: 11 July 2001 13:37
To: mysql
Subject: MySql and PHP


Is it better to let mysql handle logins or to create a table with this 
info?
I'm setting up a db that has faculty and students.  Currently, all access 
to the db is through user root.  I read the General Security issues and 
this seems to be a problem.
The db will be accessable on the web, but I only want users in a certain 
IP address to be able to get it.

Is there a way to relate the user table built-in to MySql with a created 
table? eg. faculty

-Channon

-
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

-
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




Re: MySql and PHP

2001-07-11 Thread Pieter De Temmerman

I wouldn't advise accessing databases using the root user through the web.

Pieter


Channon Quillen wrote:

 Is it better to let mysql handle logins or to create a table with this
 info?
 I'm setting up a db that has faculty and students.  Currently, all access
 to the db is through user root.  I read the General Security issues and
 this seems to be a problem.
 The db will be accessable on the web, but I only want users in a certain
 IP address to be able to get it.

 Is there a way to relate the user table built-in to MySql with a created
 table? eg. faculty

 -Channon

 -
 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



-
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


Re: mysql and PHP problems

2001-07-11 Thread Tonu Samuel

[EMAIL PROTECTED] wrote:

 I have Mysql 3.22 and PHP4 installed with RedHat 7.0 linux distribution.I created a 
script connecting my html page with mysql database(function 
mysql_pconnect).Everything was working just fine one day but on the next day I saw a 
message on my screen "Call to undefined function mysql_pconnect".Could someone tell 
me how is it possible?

---

This is easy to come and this is PHP topic. PHP can be configured to 
have many different modules included or excluded. Many distributions 
have MySQL included but not all of them. Some distribution have separate 
RPM for this. Some distributions require of changing something in 
apache/PHP configuration files. Whatever happened, someone changed 
something ni your setup.


Fix? I do not know. Take a look in PHP configuration file and check, If 
mysql modules gets loaded somewhere there. You can also make small PHP 
script like:


?
PHPINFO()
?

and execute it. This will give you much information when and how PHP is 
compiled and what modules are available to him. Thispage should have 
information about includes MySQL module if it is included at all.
-- 
For technical support contracts, goto https://order.mysql.com/
__  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Tonu Samuel [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Security Administrator
/_/  /_/\_, /___/\___\_\___/   Hong Kong, China
___/   www.mysql.com


-
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




Re: MySql and PHP

2001-07-11 Thread Werner Stuerenburg

You may want to have a look at PHPLIB. They have a really fine
security module with all kinds of grants and privileges for
purposes like you need. Also, those guys know what security
means. They would never use root to operate a system.

Sie schrieben am Mittwoch, 11. Juli 2001, 14:37:23:

 Is it better to let mysql handle logins or to create a table with this 
 info?
 I'm setting up a db that has faculty and students.  Currently, all access 
 to the db is through user root.  I read the General Security issues and 
 this seems to be a problem.
 The db will be accessable on the web, but I only want users in a certain 
 IP address to be able to get it.

 Is there a way to relate the user table built-in to MySql with a created 
 table? eg. faculty

 -Channon

 -
 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



-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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




Re: mysql and php - Can't Connect To MySQL Server warning

2001-06-16 Thread Steve Brazill

Is it 'exactly' once every 10 times ??

You should check to make sure it's not an 'external' issue.
- Do you have a 'series' of DNS servers (like 10) that you use to lookup
system names (and 1 of them isn't working properly ?)

Try some other service (like 'pinging' the MySQL server from the PHP system
10 times) to see if you get the same error.

P.S.  You didn't mention what type of system the PHP machine is...

- Original Message -
From: Larbes, James (GEAE, CDI Corp) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 16, 2001 10:20 AM
Subject: mysql and php - Can't Connect To MySQL Server warning


  I have installed mysql-3.23.38-hp-hpux10.20-hppa1.1 on an hpux10.20 Unix
  machine.  I also have PHP 4.0.5 installed.  When I run mysql through PHP
  on my web server, I get a Can't connect to MySQL server warning error
  once every ten times I try to access a database.  Is there something I
  need to configure to make mysql and php become more stable?
 
 I have mysql on one machine and php on another...could that be that
 cause of my problem?  I am stumped as to why the error occurs once every
ten
 times mysql is accessed through php.  To me, it should either work all the
 time, or not work at all.

 Please help!  (Reply to my email address please, as I am unable to
 subscribe to this mailing list.)

 Sincerely,

 Jay Larbes
 [EMAIL PROTECTED]

 -
 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



-
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




Re: MySQL and PHP issue

2001-04-12 Thread David

I want to be able to change menu items on the fly instead of having to modify
the html code manually. Some of the menu item links change a lot or I need to
add additional menus.  Keeping the menus in a database allows me to edit/change
the menu items easily from the web page

Thanks

Rolf Hopkins wrote:

 This doesn't look easy and I don't have time to sit down and think about it
 but I'll give a couple of suggestions.

 1. An ORDER BY clause may help.  When you go through the list, you will then
 need to detect a change in "menu level".

 2. Why do the menu items need to be in a database anyway?  Just have
 "static" menus in your web pages.  There are a number of ways to bring up
 menu items, as you described, using javascript:

 - Original Message -
 From: "David" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, April 12, 2001 8:59
 Subject: MySQL and PHP issue

  I tried posting this in the PHP newsgroup but received no response so
  thought I would try here since issue involves MySQL
 
  I am trying to make a simple HTML menu system with data stored in a
  MySQL database.. I am having problems displaying menu links under the
  correct submenu from a loop.
 
  I have a database with two tables. One table holds menu and sub menu
  headings and
  the other table holds the contents of each submenu (the actual menu
  links and
  names).  I need to display the menu title and then the sub menu title
  from table 1 and
  then display the submenu contents or links from table 2 and then display
  the next set
  of links under the correct submenu
 
  Example output would look like this:
 
  Say person clicks on Admin menu which is already displayed then the
  networking
  submenu heading will display along with the submenu links:
 
 Example:   Admin(main menu title from db
  table 1)
  Networking(submenu title , from
  db table 1
  ping(Link to ping
  from db table 2)
  traceroute   (Link to ping from
  db table 2)
  nsloopup etc
 
 
  I don't know how to go about outputing the links under the correct
  submenu.  The
  main menu is no problem. I am thinking I would need a loop within a
  loop.
 
  The query I use: $query = "SELECT * FROM menutable, elementstable WHERE
  menutable.menutable_id = elementstable.menuid AND menutable.mainmenu =
  'Admin' ";
 
  $result = mysql_db_query("menus", $query);
 
  This loop simply assigns variables and prints out all output under the
  main menu
  called Admin.  The problem is how do I display
 
while ($r = mysql_fetch_array($result)) {
 
  // start menu table (table holds main menu/sub menu headings
  $menutable_id = $r["menutable_id"];
  $menunumber = $r["menunumber"];
  $mainmenu = $r["mainmenu"];
  $submenu = $r["submenu"];
  // start elements table (table that holds the links and names of each
  link)
  // element_id references menu table
  $element_id  = $r["element_id"];
  $element = $r["element"];
  $url = $r["url"];
  $menuid = $r["menuid"];
 
  // next display data this is wrong cause it displays 1 submenu and 1
  link looping
  ?
  TD?  echo "$submenu"; ?/TD
  TDa href="? echo "$url"; ? " ? echo "$element"; ?/a /TD
  ?
 
  // this doesn't work
  if ($menutable_id == $menuid) {
   ?
   TD?  echo "equal $submenu"; ?/TD
   ?
 // print "both equal";
 //
 // $b = $a;
}
 
  ?
 
  Notes:
  Loop de loop:
  // outer loop   display submenus (when submenu changes display next set
  of elements
  or links from inner loop)   if submenu changes then display next set of
  menu links for
  that submenu
  // inner loop display elements or links for that submenu until sub menu
  changes
 
 
  MySQL and PHP4 latest using Linux OS
 
 
  -
  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


-
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




Re: MySQL and PHP issue

2001-04-12 Thread David Beech

On 11 Apr 2001, at 18:59, David wrote:

 I tried posting this in the PHP newsgroup but received no
 response so thought I would try here since issue involves
 MySQL
 

The easiest solution is to use lists, eg:

ul
 liAdmin/li
 ul
  liNetworking/li
  ul
   liping
   litraceroute
   liecho
  /ul
 /ul
/ul

rather than table data cells and amend your code to o/p 
the list tags, eg.

UL
LI?  echo "$submenu"; ?/LI
UL
LI
a href="? echo "$url"; ? " ? echo "$element";? 
/a /LI

etc

David

-
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




RE: MySQL and PHP Question

2001-02-08 Thread Cal Evans

This is really a JavaScript problem if you don't want to use the submit
button.

Use PHP to load the values of both tables into a JavaScript array.  Then
write JS code that will change the contents of the City control based on
what is selected in the country control.  Not terribly difficult.

Cal
http://www.calevans.com


-Original Message-
From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 06, 2001 12:01 AM
To: [EMAIL PROTECTED]
Subject: MySQL and PHP Question


Hi,

I have two tables city and country
+---+-+--+-+-++
| Field | Type| Null | Key | Default | Extra  |
+---+-+--+-+-++
| id| int(5)  |  | PRI | 0   | auto_increment |
| city  | varchar(35) |  | MUL | ||
| countryid | int(5)  |  | MUL | 0   ||
+---+-+--+-+-++
3 rows in set (0.00 sec)

mysql desc country;
+-+-+--+-+-++
| Field   | Type| Null | Key | Default | Extra  |
+-+-+--+-+-++
| id  | int(5)  |  | PRI | 0   | auto_increment |
| country | varchar(35) |  | MUL | ||
+-+-+--+-+-++
2 rows in set (0.00 sec)

I am trying to write a php script that does the following.
In an html page I have two dropdowns one country which will get the data
from the country table and city which should get the data from the city
table based on the one selected from the country drop down.  I do not want
to use a submit button.  I use a javascript and using onChange pass the
country.id to the javascript but do not know how to pass it back to the
php script.  Any pointers

Adrian

--
===
Adrian D'Costa
[EMAIL PROTECTED]
www.pcsadvt.com
===


-
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



-
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




Re: MySQL and PHP Question

2001-02-08 Thread Ing . Alejandro Vázquez C .

Adrian D'Costa wrote:

 Hi,

 I have two tables city and country
 +---+-+--+-+-++
 | Field | Type| Null | Key | Default | Extra  |
 +---+-+--+-+-++
 | id| int(5)  |  | PRI | 0   | auto_increment |
 | city  | varchar(35) |  | MUL | ||
 | countryid | int(5)  |  | MUL | 0   ||
 +---+-+--+-+-++
 3 rows in set (0.00 sec)

 mysql desc country;
 +-+-+--+-+-++
 | Field   | Type| Null | Key | Default | Extra  |
 +-+-+--+-+-++
 | id  | int(5)  |  | PRI | 0   | auto_increment |
 | country | varchar(35) |  | MUL | ||
 +-+-+--+-+-++
 2 rows in set (0.00 sec)

 I am trying to write a php script that does the following.
 In an html page I have two dropdowns one country which will get the data
 from the country table and city which should get the data from the city
 table based on the one selected from the country drop down.  I do not want
 to use a submit button.  I use a javascript and using onChange pass the
 country.id to the javascript but do not know how to pass it back to the
 php script.  Any pointers


You have to submit via javascript the country id whenever the dropdown selection
changes. You have to be carefull using a hidden field so your php-script
recognices when you pushed your form submition button or you just had changed
your country.




 Adrian

 --
 ===
 Adrian D'Costa
 [EMAIL PROTECTED]
 www.pcsadvt.com
 ===

 -
 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