Re: [PHP] mysql_connect noob question

2013-04-21 Thread tamouse mailing lists
On Sat, Apr 20, 2013 at 9:37 PM, Glob Design Info wrote: > Night now this is just a test server. On the real thing I'll do it right. > > > On 4/20/13 10:58 AM, Tedd Sperling wrote: >> >> On Apr 20, 2013, at 11:44 AM, Stuart Dallas wrote: >> >>> On 20 Apr 2013, at 16:25, Jim Giner wrote: >>>

Re: [PHP] Looking for complete entered URL

2013-04-21 Thread tamouse mailing lists
On Sat, Apr 20, 2013 at 1:51 PM, Angela Barone wrote: > I've written a script that logs all visits to a web site, complete > with referrer and IP address. It also logs all 4xx errors. What I'd like to > add to this is, if someone adds extra code after the page_name.php, to be > able t

Re: [PHP] Looking for complete entered URL

2013-04-21 Thread Ashley Sheridan
tamouse mailing lists wrote: >On Sat, Apr 20, 2013 at 1:51 PM, Angela Barone > wrote: >> I've written a script that logs all visits to a web site, >complete with referrer and IP address. It also logs all 4xx errors. >What I'd like to add to this is, if someone adds extra code after th

[PHP] Re: mysql_connect noob question

2013-04-21 Thread Glob Design Info
Thanks for that great response Geoff. That very well may be what is wrong, however, my problem is I don't have admin access to this server - it hosted in a BaaS site where they do all the admin. They do provide mysql command line access and it works, but it won't let me log in as root, not even

[PHP] Re: mysql_connect noob question

2013-04-21 Thread Glob Design Info
Thanks Geoff, I am aware of the security implications. I will deal with that later. Right now I am just trying to get the WS architecture working. I am logging in with the creds the hosting provider gave me (xeround.com) When I use those creds on the mysql command line, or hard-code them in the

Re: [PHP] Re: mysql_connect noob question

2013-04-21 Thread Stuart Dallas
On 21 Apr 2013, at 11:20, Glob Design Info wrote: > I don't understand why mysql_connect should append something in the case of a > passed variable but not in the case of a local variable. Unless there is > something in the form parsing machinery I am unaware of. Nothing is being added by anyt

Re: [PHP] Looking for complete entered URL

2013-04-21 Thread Andrew Ballard
Correct. Just to expand on that, a browser will not send the hash fragment part of a URL with the request. If you ever receive that part at the web server, that's a pretty good sign the request came from a robot. Andrew On Apr 21, 2013 3:29 AM, "Ashley Sheridan" wrote: > > > tamouse mailing list

Re: [PHP] Re: mysql_connect noob question

2013-04-21 Thread tamouse mailing lists
On Sun, Apr 21, 2013 at 5:20 AM, Glob Design Info wrote: > I am aware of the security implications. I will deal with that later. Right > now I am just trying to get the WS architecture working. I'm wondering, if you can get it to work with the creds in the script, why do you have to have them co

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Tedd Sperling
On Apr 21, 2013, at 9:32 AM, Stuart Dallas wrote: > However, a more important question for me is why you are doing this. You say > you are aware of the security implications, and that you'll "deal with that > later," but I question how you're going to deal with it. What exactly are you > develo

Re: [PHP] mysql_connect noob question

2013-04-21 Thread tamouse mailing lists
On Sun, Apr 21, 2013 at 9:12 AM, Tedd Sperling wrote: > On Apr 21, 2013, at 9:32 AM, Stuart Dallas wrote: >> However, a more important question for me is why you are doing this. You say >> you are aware of the security implications, and that you'll "deal with that >> later," but I question how

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Stuart Dallas
On 21 Apr 2013, at 15:46, tamouse mailing lists wrote: > On Sun, Apr 21, 2013 at 9:12 AM, Tedd Sperling > wrote: >> On Apr 21, 2013, at 9:32 AM, Stuart Dallas wrote: >>> However, a more important question for me is why you are doing this. You >>> say you are aware of the security implications

Re: [PHP] mysql_connect noob question

2013-04-21 Thread tamouse mailing lists
On Sun, Apr 21, 2013 at 9:49 AM, Stuart Dallas wrote: > On 21 Apr 2013, at 15:46, tamouse mailing lists > wrote: > >> On Sun, Apr 21, 2013 at 9:12 AM, Tedd Sperling >> wrote: >>> On Apr 21, 2013, at 9:32 AM, Stuart Dallas wrote: However, a more important question for me is why you are do

Re: [PHP] mysql_connect noob question

2013-04-21 Thread tamouse mailing lists
On Fri, Apr 19, 2013 at 3:43 PM, Glob Design Info wrote: > I know this has probably been answered already. > > When I pass a user name and password from a form to my PHP script and then > pass those to mysql_connect it doesn't connect. When I paste those exact > same values into mysql_connect as s

Re: [PHP] Re: mysql_connect noob question

2013-04-21 Thread Glob Design Info
If that is the case then why does logging in with exactly the same params from a UNIX shell work fine? Command line login supposedly would be adding the @localhost or @IP_address as well but isn't. Only when I pass the variables to the script is that happening. I am doing exactly as you stated:

Re: [PHP] Re: mysql_connect noob question

2013-04-21 Thread Glob Design Info
This for a commercial app - the client wants both an API connect via PHP and a web portal in which they can login from a web page and view the tables in the DB. Right now I am just trying to get the form/PHP interaction to work. On Apr 21, 2013, at 6:42 AM, tamouse mailing lists wrote: > On S

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Glob Design Info
What question did I not answer? I am developing a web portal that has to display the tables in the DB via a form/script. The web page has a login with user and password. Right now I am just trying to connect. On Apr 21, 2013, at 7:12 AM, Tedd Sperling wrote: > On Apr 21, 2013, at 9:32 AM, Stu

Re: [PHP] mysql_connect noob question

2013-04-21 Thread David OBrien
Not meaning to beat the proverbial dead horse I am developing a web portal that has to display the tables in the DB via a > form/script. The web page has a login with user and password. Right now I > am just trying to connect. > This for a commercial app - the client wants both an API connect via

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Glob Design Info
Except that a) I already have my form and script done, b) don't have time to learn phpMyAdmin, c) want to know why the script doesn't work as-is. On Apr 21, 2013, at 12:46 PM, David OBrien wrote: > Not meaning to beat the proverbial dead horse > > I am developing a web portal that has to displ

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Glob Design Info
One other thing I noted in the FAQ was this: "Dots in incoming variable names Typically, PHP does not alter the names of variables when they are passed into a script. However, it should be noted that the dot (period, full stop) is not a valid character in a PHP variable name. For the reason, loo

Re: [PHP] mysql_connect noob question

2013-04-21 Thread David OBrien
On Sun, Apr 21, 2013 at 6:01 PM, Glob Design Info wrote: > One other thing I noted in the FAQ was this: > > "Dots in incoming variable names > Typically, PHP does not alter the names of variables when they are passed > into a script. However, it should be noted that the dot (period, full stop) > i

Re: [PHP] Re: mysql_connect noob question

2013-04-21 Thread Stuart Dallas
On 21 Apr 2013, at 20:29, Glob Design Info wrote: > If that is the case then why does logging in with exactly the same params > from a UNIX shell work fine? Command line login supposedly would be adding > the @localhost or @IP_address as well but isn't. Only when I pass the > variables to the

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Stuart Dallas
On 21 Apr 2013, at 22:43, Glob Design Info wrote: > Except that a) I already have my form and script done, b) don't have time to > learn phpMyAdmin, c) want to know why the script doesn't work as-is. You have multiple database users who will need to do this, or just one database user? If just

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Stuart Dallas
On 21 Apr 2013, at 23:01, Glob Design Info wrote: > I should note my user name in this case *is* an email address, however the > dots in that address are *not* being converted to underscores as mentioned > (at least not visibly). This could be the culprit. Try using a username without an @ in

Re: [PHP] mysql_connect noob question

2013-04-21 Thread David OBrien
> I should note my user name in this case *is* an email address, however the dots in that address are *not* being converted to underscores as mentioned (at least not visibly). I just created a free account there and the email says my username is dgobr...@gmail.com but I connected to it from sqlyo

Re: [PHP] mysql_connect noob question

2013-04-21 Thread David OBrien
In fact using the @gmail.com part added on gives me the same error as the OP I think their welcome email needs tweaking.. try it without the domain added on On Sun, Apr 21, 2013 at 6:56 PM, David OBrien wrote: > > I should note my user name in this case *is* an email address, however > the dots

Re: [PHP] Re: mysql_connect noob question

2013-04-21 Thread Glob Design Info
On 4/21/13 3:27 PM, Stuart Dallas wrote: On 21 Apr 2013, at 20:29, Glob Design Info wrote: If that is the case then why does logging in with exactly the same params from a UNIX shell work fine? Command line login supposedly would be adding the @localhost or @IP_address as well but isn't. Onl

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Glob Design Info
Except that I want to use my script and form - precisely because I have already sunk time into it. I'm not going to sink *more* time into something that could potentially create *another* problem. I want the script to work - as it should if PHP is 1/2 what it's cracked up to be. If not, I'll h

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Glob Design Info
Tried that. Still didn't work. I appears to be the port. On 4/21/13 3:40 PM, Stuart Dallas wrote: On 21 Apr 2013, at 23:01, Glob Design Info wrote: I should note my user name in this case *is* an email address, however the dots in that address are *not* being converted to underscores as men

Re: [PHP] Re: mysql_connect noob question

2013-04-21 Thread David Robley
Glob Design Info wrote: > On 4/21/13 3:27 PM, Stuart Dallas wrote: >> On 21 Apr 2013, at 20:29, Glob Design Info wrote: >> >>> If that is the case then why does logging in with exactly the same >>> params from a UNIX shell work fine? Command line login supposedly would >>> be adding the @localhos

Re: [PHP] Re: mysql_connect noob question

2013-04-21 Thread Stuart Dallas
On 22 Apr 2013, at 00:14, Glob Design Info wrote: > However, I may have found the problem: the port. As a security measure the > BaaS provider appears to have changed MySQL to a non-standard port. > So > > On the command line: > > sudo mysql --host=instance43490.db.xeround.com --p

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Glob Design Info
SUCCESS! However. if ( $_REQUEST['Submit'] ) { makes it work (using my own form button ID). Why it doesn't work without this on my machine is beyond me. But it doesn't. Could it be somehow there is something about accessing the $_REQUEST that changes something? I am baffled as to the ca

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Glob Design Info
Even more strange: It doesn't work from the form with or without the domain (but on the command line it does), but.. IF I add the $_REQUEST access *and* use the user that the *MySQL* install has, and *not* the xeround user name (my email), then it *does* work! WEIRD. On 4/21/13 3:59 P

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Stuart Dallas
On 22 Apr 2013, at 00:16, Glob Design Info wrote: > Except that I want to use my script and form - precisely because I have > already sunk time into it. I'm not going to sink *more* time into something > that could potentially create *another* problem. The idea of sunk time is that it's alread

Re: [PHP] Re: mysql_connect noob question

2013-04-21 Thread Glob Design Info
As shown in the OP I am already doing that in the PHP scipt: $host = "instance43490.db.xeround.com:8904"; And then passing that as the 1st param to mysql_connect On 4/21/13 4:23 PM, Stuart Dallas wrote: On 22 Apr 2013, at 00:14, Glob Design Info wrote: However, I may have found the problem:

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Glob Design Info
A very complex solution that takes time to learn, configure, and install, vs. a single file I can toss on the server. Over-engineering is what is daft. On 4/21/13 4:33 PM, Stuart Dallas wrote: On 22 Apr 2013, at 00:16, Glob Design Info wrote: Except that I want to use my script and form - p

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Glob Design Info
Ever heard of the MySQL C Connector? http://www.karlkraft.com/index.php/2010/06/02/mysql-and-objective-c/ :-) On 4/21/13 4:33 PM, Stuart Dallas wrote: On 22 Apr 2013, at 00:16, Glob Design Info wrote: Except that I want to use my script and form - precisely because I have already sunk time

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Stuart Dallas
On 22 Apr 2013, at 00:35, Glob Design Info wrote: > A very complex solution that takes time to learn, configure, and install, vs. > a single file I can toss on the server. > > Over-engineering is what is daft. Building your house by making your own bricks is daft. Using bricks somebody else h

Re: [PHP] mysql_connect noob question

2013-04-21 Thread Stuart Dallas
On 22 Apr 2013, at 00:36, Glob Design Info wrote: > Ever heard of the MySQL C Connector? > > http://www.karlkraft.com/index.php/2010/06/02/mysql-and-objective-c/ That would be Objective-C, not C. I have used libmysqlclient extensively, but there's a lot more to a MySQL management tool than co

Re: [PHP] Newbie Question - Parse XML with PHP...

2013-04-21 Thread Bastien Koert
I have an app that gets passed in xml and use this code to read that data in // We use php://input to get the raw $_POST results. $xml_post = file_get_contents('php://input'); Maybe it will help Bastien On Sat, Apr 20, 2013 at 7:48 AM, shiplu wrote: > > > > > > > > Question: how do you use $

Re: [PHP] Newbie Question - Parse XML with PHP...

2013-04-21 Thread shiplu
On Apr 22, 2013 7:00 AM, "Bastien Koert" wrote: > > I have an app that gets passed in xml and use this code to read that data in > > // We use php://input to get the raw $_POST results. > $xml_post = file_get_contents('php://input'); $xml_post is string. I think now you know what to do.

Re: [PHP] mysql_connect noob question

2013-04-21 Thread tamouse mailing lists
After all this, the OP remains unenlightened. This is just a waste of time. "You are doing this wrong." "There are existing tools that do what your client wants." "A command line tool is not the same as the php library." are all met with "I don't want to learn, just tell me what isn't working." To