php-db Digest 27 Feb 2001 08:38:46 -0000 Issue 478

Topics (messages 6964 through 6974):

dns script
        6964 by: Liz Bander
        6968 by: php3.developersdesk.com

Re: Can't connect to local MySQL server error
        6965 by: Brunner, Daniel
        6967 by: Rick Emery

Re: onMouseOver & onMouseOut
        6966 by: Ron Brogden
        6969 by: php3.developersdesk.com

Fatal error: Call to undefined function: () in add2.php on line 11
        6970 by: jim and lois flaherty
        6973 by: Joe Brown

array awry
        6971 by: Keith Spiller
        6972 by: Rolf Hopkins
        6974 by: CC Zona

Administrivia:

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

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

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


----------------------------------------------------------------------


I'm not sure that this is entirely on topic, but does anyone have a simple 
DNS script gleaning from MySQL 3.23 that I could take a look at?  Right now 
we're doing the manual entry thing, but it's going to get old fast.  If you 
can even direct me to an appropriate source, that would be great.

Thanks,

Liz





Addressed to: Liz Bander <[EMAIL PROTECTED]>
              [EMAIL PROTECTED]

** Reply to note from Liz Bander <[EMAIL PROTECTED]> Mon, 26 Feb 2001 14:51:07 -0500
>
> I'm not sure that this is entirely on topic, but does anyone have a
> simple DNS script gleaning from MySQL 3.23 that I could take a look
> at?  Right now we're doing the manual entry thing, but it's going to
> get old fast.  If you can even direct me to an appropriate source,
> that would be great.



I don't understand what you want to do.  Please give a few more details
on what you want.


This is probably as good a place as any for the question though.




Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com




Hello...

Try this instead...


Grant ALL ON Database_name.* to user@localhost IDENIFIED BY "password";

You can use Grant whatever ON Database_name.*...As well....

The .* after the Database_name will allow all tables to be accesed by
the users, on that Database...

It worked great for me...

Dan



> ----------
> From:         Rick Emery
> Sent:         Monday, February 26, 2001 1:16 PM
> To:   '[EMAIL PROTECTED]'
> Subject:      RE: [PHP-DB] Can't connect to local MySQL server error
> 
> I'm also having trouble connecting to the MySQL server.
> 
> I can connect as root, but not as a user from the command line.  When
> connect to the mysql server as ROOT, I've granted all privileges to
> the user
> using 'user@localhost' and 'user@"%" '.  Still no luck.  I'm using
> MySQL on
> Redhat Linux.  I'm having same problem connecting via a
> mysql_connect(---) call in PHP.
> 
> What do I need to do to allow user interaction for MySQL?
> thanks
> 
> rick
> 
> Richard L. Emery
> IT Sr. Project Manager
> 
> 
> "There is no 'trying'...
> There is only 'Do' or 'Not Do' "
> 
> 
> -----Original Message-----
> From: Brunner, Daniel [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 16, 2001 5:05 PM
> To: '[EMAIL PROTECTED]'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: [PHP-DB] Can't connect to local MySQL server error
> 
> 
> Hello...
> 
> Do a netstat -vatp
> To see if mysql is up and listening on your TCP. And it will give your
> PID/Program name as well...
> 
> I remember reading something about if the mysql.sock didn't work...you
> needed to do something with mysql...I'll look into it this
> weekend.....
> 
> If nobody can help you out sooner....
> 
> Well good luck...
> 
> Dan
> 
> 
> 
> > ----------
> > From:       Chris Weiss
> > Reply To:   [EMAIL PROTECTED]
> > Sent:       Friday, February 16, 2001 4:37 PM
> > To:         [EMAIL PROTECTED]
> > Subject:    [PHP-DB] Can't connect to local MySQL server error
> > 
> > Help!
> > I'm experimenting with several of the PHP based WebDatabase front
> ends
> > and
> > am getting the following errors from all of them:
> > 
> > "Warning: Can't connect to local MySQL server through socket
> > '/var/lib/mysql/mysql.sock' (111) in
> /home/httpd/html/pub/mainfile.php
> > on
> > line 9
> > Unable to select database"
> > 
> > I've tried the following:
> > [root@casadelove pub]# telnet localhost 3306 |strings
> > Trying 127.0.0.1...
> > Connected to casadelove.com.
> > Escape character is '^]'.
> > 3.23.27-beta
> > $Gu=m/>.
> > Connection closed by foreign host.
> > 
> > The databases being requested do exist and are populated with the
> > default
> > data and WebMin (Perl-based web administration program) accesses the
> > test
> > databases just fine.
> > 
> > This is on a RH6.2 system with Apache 1.3.14 and PHP 4.0.4.
> > 
> > This strikes me as something really stupid that I'm missing, anyone
> > have any
> > bright ideas where to look?
> > 
> > 
> > -- 
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 
> 




I tried:  Grant ALL ON *.* to user@localhost IDENIFIED BY "password";
so as to provide access to all tables.  I should have stated that the error
I got was that I could not connect to the
/var/lib/mysql/mysql.sock socket.

thanks

rick

Richard L. Emery
IT Sr. Project Manager

"There is no 'trying'...
There is only 'Do' or 'Not Do' "


-----Original Message-----
From: Brunner, Daniel [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 2:18 PM
To: 'Rick Emery'
Cc: '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Can't connect to local MySQL server error


Hello...

Try this instead...


Grant ALL ON Database_name.* to user@localhost IDENIFIED BY "password";

You can use Grant whatever ON Database_name.*...As well....

The .* after the Database_name will allow all tables to be accesed by
the users, on that Database...

It worked great for me...

Dan



> ----------
> From:         Rick Emery
> Sent:         Monday, February 26, 2001 1:16 PM
> To:   '[EMAIL PROTECTED]'
> Subject:      RE: [PHP-DB] Can't connect to local MySQL server error
> 
> I'm also having trouble connecting to the MySQL server.
> 
> I can connect as root, but not as a user from the command line.  When
> connect to the mysql server as ROOT, I've granted all privileges to
> the user
> using 'user@localhost' and 'user@"%" '.  Still no luck.  I'm using
> MySQL on
> Redhat Linux.  I'm having same problem connecting via a
> mysql_connect(---) call in PHP.
> 
> What do I need to do to allow user interaction for MySQL?
> thanks
> 
> rick
> 
> Richard L. Emery
> IT Sr. Project Manager
> 
> 
> "There is no 'trying'...
> There is only 'Do' or 'Not Do' "
> 
> 
> -----Original Message-----
> From: Brunner, Daniel [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 16, 2001 5:05 PM
> To: '[EMAIL PROTECTED]'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: [PHP-DB] Can't connect to local MySQL server error
> 
> 
> Hello...
> 
> Do a netstat -vatp
> To see if mysql is up and listening on your TCP. And it will give your
> PID/Program name as well...
> 
> I remember reading something about if the mysql.sock didn't work...you
> needed to do something with mysql...I'll look into it this
> weekend.....
> 
> If nobody can help you out sooner....
> 
> Well good luck...
> 
> Dan
> 
> 
> 
> > ----------
> > From:       Chris Weiss
> > Reply To:   [EMAIL PROTECTED]
> > Sent:       Friday, February 16, 2001 4:37 PM
> > To:         [EMAIL PROTECTED]
> > Subject:    [PHP-DB] Can't connect to local MySQL server error
> > 
> > Help!
> > I'm experimenting with several of the PHP based WebDatabase front
> ends
> > and
> > am getting the following errors from all of them:
> > 
> > "Warning: Can't connect to local MySQL server through socket
> > '/var/lib/mysql/mysql.sock' (111) in
> /home/httpd/html/pub/mainfile.php
> > on
> > line 9
> > Unable to select database"
> > 
> > I've tried the following:
> > [root@casadelove pub]# telnet localhost 3306 |strings
> > Trying 127.0.0.1...
> > Connected to casadelove.com.
> > Escape character is '^]'.
> > 3.23.27-beta
> > $Gu=m/>.
> > Connection closed by foreign host.
> > 
> > The databases being requested do exist and are populated with the
> > default
> > data and WebMin (Perl-based web administration program) accesses the
> > test
> > databases just fine.
> > 
> > This is on a RH6.2 system with Apache 1.3.14 and PHP 4.0.4.
> > 
> > This strikes me as something really stupid that I'm missing, anyone
> > have any
> > bright ideas where to look?
> > 
> > 
> > -- 
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 
> 




At 12:43 PM 2/24/2001 -0300, you wrote:
>Are you trying to tell Rudi Ahlers is possible to call php scripts from a
>browse event ? The statement "form.submit()" belongs to JavaScript not to
>php.

Of course not.  What I am saying is that client side validation is pretty 
much useless since you have to perform it again server side anyway (so 
what's the point?).  Since you have to check the data again on the server 
and since you have no guarantee that Javascript is even enabled, placing 
your "intelligence" on the client side is a bad idea.  IMHO warnings and 
such should be generated by the server with Javascript used at most maybe 
to provide some extra details.

I guess the main thing I wanted to impart was to not make the mistake of 
relying on client side validation (a common problem).

>Can you imagine how boring is have to submit forms and reload pages every
>time  the user make changes on a drop down menu?

Can you imaging how frustrating it is when your site is completely unusable 
because you do not have Javascript enabled (or your browser does not 
support the exact flavour that the site was designed with)?

If an extra submit makes your site that boring I think you have bigger 
problems to deal with.

=)

>I think academic and radical positions aren't good at all. You should deal
>with the real world where you have the give the user as much comfort as you
>can. Applications don't have proper life, they are created for been used, so
>the user is always the king.

In the real world you cannot trust the end user to send you "safe" 
data.  If your application depends on a specific tree of events you better 
make sure that you are not just trusting your Javascript to create those 
dependencies.  This is not an argument about user rights at all and if you 
want to cast it as such, most Javascript seems to be intended to reduce 
user freedom (pop up windows, removal of browser buttons, enforcing 
specific browser versions, etc.).

All IMHO of course.

Cheers,

Ron




-----------------------------------------------------------------------------
Island Net AMT Solutions Group Inc.          Telephone:          250 383-0096
1412 Quadra                                  Toll Free:        1 800 331-3055
Victoria, B.C.                               Fax:                250 383-6698
V8W 2L1                                      E-Mail:    [EMAIL PROTECTED]
Canada                                       WWW:   http://www.islandnet.com/
-----------------------------------------------------------------------------





Addressed to: Ron Brogden <[EMAIL PROTECTED]>
              [EMAIL PROTECTED]

** Reply to note from Ron Brogden <[EMAIL PROTECTED]> Mon, 26 Feb 2001 12:27:52 -0800
>
> In the real world you cannot trust the end user to send you "safe"
> data.  If your application depends on a specific tree of events you better
> make sure that you are not just trusting your Javascript to create those
> dependencies.  This is not an argument about user rights at all and if you
> want to cast it as such, most Javascript seems to be intended to reduce
> user freedom (pop up windows, removal of browser buttons, enforcing
> specific browser versions, etc.).


<sound="Loud cheering">

Y E S ! ! !


If your site depends on JavaScript, it won't work on my browser.  I've
learned I can eliminate a lot of annoying behavior like windows
re-sizing themselves, those *&$#$2 popups and a bunch of incorrect
JavaScribe version errors by just turning it off. I may miss out on a
little cool behavior here and there, but I'm sure the hassles I don't
have to deal with make up for it.


I've been signed up for a Ziff Davis developer email newsletter for over
a year. The last issue I got had one article based on the idea that
"Spam is here to stay, so it is about time to start using it."  Another
article was about a javascript that asked the user to rate your site,
and if it did not get a good enough answer it would not let you into the
site. They said something about _forcing_ users to make a commitment.

Well, I checked the calendar, and it is not April first, so I cancelled
my subscription.  If _that_ is the future of the web, count me out.







Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com




  help , I have this problem 

   I have redhat 7.0
   mysql 3.23
   and php-mysql rpm installed 

 my code  

 <html>
<head>
   <title>Flaherty Family Page</title>
</head>
<?

//  connect to server 

$mysql_link = mysql_connect("localhost", "user","password");

$mysql_select_db("resume");

$query = "insert into employer(name,add1,add2,city,state)";
$query = $query."values('$name','$add1','$add2','$city','$state')";


$mysql_result = mysql_query($query, $mysql_link);


my line 11 is mysql_connect   


please let me know what I am doing wrong 




back to the drawing board...

Re-compile php --with-mysql

""jim and lois flaherty"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>   help , I have this problem
>
>    I have redhat 7.0
>    mysql 3.23
>    and php-mysql rpm installed
>
>  my code
>
>  <html>
> <head>
>    <title>Flaherty Family Page</title>
> </head>
> <?
>
> //  connect to server
>
> $mysql_link = mysql_connect("localhost", "user","password");
>
> $mysql_select_db("resume");
>
> $query = "insert into employer(name,add1,add2,city,state)";
> $query = $query."values('$name','$add1','$add2','$city','$state')";
>
>
> $mysql_result = mysql_query($query, $mysql_link);
>
>
> my line 11 is mysql_connect
>
>
> please let me know what I am doing wrong
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






This associative array embedded within a function and declared as a global at the 
start of the function, is meant to be a multidimensional array, but with every loop of 
the while ($myrow = mysql_fetch_row($result)) statement, it's previous values are 
replaced by the new ones.  Any ideas on how I can fix this?

          If ($Selection == "3")
          {
          $tabledata[catid]    = $myrow[0];
          $tabledata[category] = "$myrow[1]";
          $tabledata[under]    = $myrow[2];
          $tabledata[corder]   = $myrow[3];
          $tabledata[active]   = $myrow[4];
          }

Keith
aka Larentium




This is a PHP question and should really be asked on the PHP list.

But a suggestion.  Tried using field names instead of number?  ie.
$myrow["catid"];

I'd have to read up the PHP manual to find out for sure but I'm sure you can
do that just as well as I can.

----- Original Message -----
From: "Keith Spiller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, February 27, 2001 10:14
Subject: array awry


This associative array embedded within a function and declared as a global
at the start of the function, is meant to be a multidimensional array, but
with every loop of the while ($myrow = mysql_fetch_row($result)) statement,
it's previous values are replaced by the new ones.  Any ideas on how I can
fix this?

          If ($Selection == "3")
          {
          $tabledata[catid]    = $myrow[0];
          $tabledata[category] = "$myrow[1]";
          $tabledata[under]    = $myrow[2];
          $tabledata[corder]   = $myrow[3];
          $tabledata[active]   = $myrow[4];
          }

Keith
aka Larentium






In article <061201c0a063$08eab5a0$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Keith Spiller") wrote:

> This associative array embedded within a function and declared as a global at 
> the start of the function, is meant to be a multidimensional array, but with 
> every loop of the while ($myrow = mysql fetch row($result)) statement, it's 
> previous values are replaced by the new ones.  Any ideas on how I can fix 
> this?
> 
>           If ($Selection == "3")
>           {
>           $tabledata[catid]    = $myrow[0];
>           $tabledata[category] = "$myrow[1]";
>           $tabledata[under]    = $myrow[2];
>           $tabledata[corder]   = $myrow[3];
>           $tabledata[active]   = $myrow[4];
>           }


So what you're saying is that want indexes 'catid', 'category', etc. to 
have a distinct value for each row pulled from the database?  Then you need 
to add another dimension to that array.

-- 
CC



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

Reply via email to