Re: [PHP] Problem with Include

2010-12-20 Thread Ravi Gehlot
My point is that you tried to take code from one page and put it all "organized" in another page and the include that page of includes back into the pages that you want it to feed off from. If stuff works the way that it does then there a reason for it to have been done that way. That's why documen

Re: [PHP] Error Querying Database

2010-12-20 Thread Ravi Gehlot
Trying to connect to the database can involve setting up your database. Make sure that you have a valid login/password that is recognized by MySQL. Please keep in mind that MySQL works on permission by hosts. So your host IP must be matched with the username/password on the database for a successfu

Re: [PHP] PHPInfo disabled due to security

2010-12-20 Thread Ravi Gehlot
Hello there, If you have a small to medium size web site then go to GoDaddy. Do not believe all that you see from php_info(). I will give you an example. The memory_limit it gives on shared hosting does not reflect the one intended for your shared account. It shows what was set for overall use. Bu

Re: [PHP] array question

2010-12-20 Thread Ravi Gehlot
Jim Lucas has it. You can use the preg_match function to find it. I would use regexp for that reason. regexp is good for making sure things are typed the way they need to (mostly used for). Ravi. On Sat, Dec 18, 2010 at 5:17 PM, Jim Lucas wrote: > On 12/17/2010 12:52 PM, Sorin Buturugeanu wrot

Re: [PHP] Problem with Include

2010-12-20 Thread David Hutto
On Tue, Dec 21, 2010 at 2:29 AM, Ravi Gehlot wrote: > Why mess with something that is already working? If you are trying to make > it pretty then you are not solving a problem. You are creating one. Define working. I've had programs 'work', but more experienced would say it's flawed in some resp

Re: [PHP] All records not displaying...

2010-12-20 Thread Ravi Gehlot
I would say enabled error_reporting(E_ALL); error_reporting(-1); Then use die(mysql_error()); with your mysql function to get some debugging data. Also use var_dump($query_name) to find out what is spits out. Debugging is your best friend here. If you don't use die() or error_reporting() then yo

Re: [PHP] Problem with Include

2010-12-20 Thread Ravi Gehlot
Why mess with something that is already working? If you are trying to make it pretty then you are not solving a problem. You are creating one. Ravi. On Mon, Dec 20, 2010 at 7:40 AM, Daniel P. Brown wrote: > On Mon, Dec 20, 2010 at 02:49, Simcha Younger wrote: > > > > Since it is being included

Re: [PHP] Common session for all subdomains?

2010-12-20 Thread Ravi Gehlot
That's a good question. There should be a setting on php.ini to allow cross session. Ravi. On Mon, Dec 20, 2010 at 7:05 PM, Jonathan Tapicer wrote: > Hi! > > You should use the function session_set_cookie_params to set the > session cookie domain to ".oire.org" like this comment explains: > p

Re: [PHP] PDO Prepared Statements and stripslashes

2010-12-20 Thread Ravi Gehlot
Hello, The plug-in PDO has nothing to do with the backslashes being inserted into the database. The backslashes are used to escape characters like in D's...it would show D's. That's the safe behavior of it. You can change your programming code to fix that. Ravi. On Tue, Dec 21, 2010

Re: [PHP] PDO Prepared Statements and stripslashes

2010-12-20 Thread Rico Secada
On Tue, 21 Dec 2010 00:32:19 -0500 Paul M Foster wrote: > On Tue, Dec 21, 2010 at 05:31:15AM +0100, Rico Secada wrote: > > > Hi. > > > > In an article about SQL Injection by Chris Shiflett he mentions the > > following in a comment: "The process of escaping should preserve > > data, so it shoul

Re: [PHP] Problems w/ goto

2010-12-20 Thread David Harkness
On Mon, Dec 20, 2010 at 7:45 PM, David Hutto wrote: > Is the problem with using the goto convolutedness(as I've seen other > senior programmers in other languages when explaining, or 'showing > off'), or is their an actual functional problem with it? It works perfectly well and is a great solut

Re: [PHP] PDO Prepared Statements and stripslashes

2010-12-20 Thread Paul M Foster
On Tue, Dec 21, 2010 at 05:31:15AM +0100, Rico Secada wrote: > Hi. > > In an article about SQL Injection by Chris Shiflett he mentions the > following in a comment: "The process of escaping should preserve data, > so it should never be necessary to reverse it. When I'm auditing an > application,

[PHP] PDO Prepared Statements and stripslashes

2010-12-20 Thread Rico Secada
Hi. In an article about SQL Injection by Chris Shiflett he mentions the following in a comment: "The process of escaping should preserve data, so it should never be necessary to reverse it. When I'm auditing an application, things like stripslashes() alert me to design problems." Now, I'm always

Re: [PHP] Problems w/ goto

2010-12-20 Thread David Hutto
On Mon, Dec 20, 2010 at 4:47 PM, David Harkness wrote: > On Fri, Dec 17, 2010 at 10:05 AM, la...@garfieldtech.com < > la...@garfieldtech.com> wrote: > >> What PHP has implemented is "named break statements", as I understand it. >> > > Not exactly. You can jump to arbitrary (labeled) lines within t

Re: [PHP] Common session for all subdomains?

2010-12-20 Thread Jonathan Tapicer
Hi! You should use the function session_set_cookie_params to set the session cookie domain to ".oire.org" like this comment explains: php.net/manual/en/function.session-set-cookie-params.php#94961 Regards, Jonathan On Mon, Dec 20, 2010 at 7:18 PM, Andre Polykanine wrote: > Hello php-general, >

[PHP] Common session for all subdomains?

2010-12-20 Thread Andre Polykanine
Hello php-general, I've got a question: I have a site http://oire.org/. Then we started developing some applications at http://apps.oire.org/. How can I manage it in the way so the session valid at http://oire.org/ would be also valid at http://apps.oire.org/? Thanks! -- With best regards from Ukr

Re: [PHP] Does ReflectionMethod::setAccessible() do anything?

2010-12-20 Thread David Harkness
On Thu, Dec 16, 2010 at 6:09 PM, Nathan Nobbe wrote: > you just have to invoke the function from the context of the > ReflectionMethod instance > > class Foo { protected function bar() { echo "foobar\n"; } } > $m = new ReflectionMethod('Foo', 'bar'); > $m->setAccessible(true); > $m->invokeArgs(ne

Re: [PHP] Does ReflectionMethod::setAccessible() do anything?

2010-12-20 Thread David Harkness
On Thu, Dec 16, 2010 at 6:09 PM, Nathan Nobbe wrote: > you just have to invoke the function from the context of the > ReflectionMethod instance > > class Foo { protected function bar() { echo "foobar\n"; } } > $m = new ReflectionMethod('Foo', 'bar'); > $m->setAccessible(true); > $m->invokeArgs(ne

Re: [PHP] Problems w/ goto

2010-12-20 Thread David Harkness
On Fri, Dec 17, 2010 at 10:05 AM, la...@garfieldtech.com < la...@garfieldtech.com> wrote: > What PHP has implemented is "named break statements", as I understand it. > Not exactly. You can jump to arbitrary (labeled) lines within the same context (method/function), but you cannot enter loop const

[PHP] Re: PHPmailer.. best way to send to many recipients?

2010-12-20 Thread Govinda
followup question, please see below the OP: I just started using PHPmailer for one project that requires SMTP authentication (if I said that right).. and all is well.. but I want to ask now before it might get outta hand later: How many comma-delim'ed addresses can I stuff in $BCC_recipient

[PHP] [SOLVED] Re: Upgraded system and now $_SERVER['SERVER_NAME'] is not more working

2010-12-20 Thread Michelle Konzack
I do not know HOW, but it wors again... Thanks, Greetings and nice Day/Evening Michelle Konzack -- # Debian GNU/Linux Consultant ## Development of Intranet and Embedded Systems with Debian GNU/Linux itsyst...@tdnet France EURL itsyst...@tdnet

[PHP] Re: [PHP-DB] Re: [PHP] Problems w/ goto

2010-12-20 Thread David Hutto
On Mon, Dec 20, 2010 at 7:37 AM, Daniel Brown wrote: > On Sat, Dec 18, 2010 at 17:02, David Hutto wrote: >> or maybe it's saturday morning and i'm drunk? > >    This seems to be the most likely, and considering how all messages > are permanently and independently archived and propagate throughout

Re: [PHP] Performance Improvement on Calling C++ executable from PHP

2010-12-20 Thread Daniel P. Brown
On Sun, Dec 19, 2010 at 15:35, Shiplu wrote: > === > Recently I  my this php-general doesn't accept my mail for some > reason. So I send it again from anther email >

Re: [PHP] Problem with Include

2010-12-20 Thread Daniel P. Brown
On Mon, Dec 20, 2010 at 02:49, Simcha Younger wrote: > > Since it is being included by PHP, and not served by Apache, the extension is > not important. Correct, but keep in mind that it will likely be served as plain text if accessed directly, if the web server is not properly configured (wh

[PHP] Re: [PHP-DB] Re: [PHP] Problems w/ goto

2010-12-20 Thread Daniel Brown
On Sat, Dec 18, 2010 at 17:02, David Hutto wrote: > or maybe it's saturday morning and i'm drunk? This seems to be the most likely, and considering how all messages are permanently and independently archived and propagate throughout the Internet, it might be a good reason not to go nuts in se