Re: [PHP] Pros/Cons of using mysqli prepared statments

2010-11-04 Thread Tamara Temple
On Nov 4, 2010, at 6:36 AM, Jay Blanchard wrote: [snip] If you have a query in your PHP code, which you are going to be executing a lot, even if you are using prepared statements, you can go one further by creating a stored procedure. Now the SQL server will only ever need to compile the statem

RE: [PHP] How to code in PHP an onchange event in a ?

2010-11-04 Thread admin
OnChange is Javascript. I might suggest you get yourself familiar with JQuery. JQuery makes your life a lot easier when there is a need for client browser interaction with site scripting. Richard L. Buskirk From: Tomás Corrales Lemoine [mailto:to...@hog.ecasa.avianet.cu] S

Re: [PHP] Pros/Cons of using mysqli prepared statments

2010-11-04 Thread knl
On Thu, 4 Nov 2010 02:48:55 -0500 Tamara Temple wrote: > I'm wondering what the advantages/disadvantage of using prepared > statements with mysqli are. I'm used to using the mysqli::query and > mysqli::fetch_assoc functions to deal with retrieving data and > bulding my sql statement in php co

Re: [PHP] Pros/Cons of using mysqli prepared statments

2010-11-04 Thread Alex Nikitin
One thing to remember is that dealing with results from prepared statements is different then getting results from queries, so if you are using both, confusion can easily set in (and lets face it, prepared statements arent always the best thing to use)... if its of any help, i have written a class

RE: [PHP] Pros/Cons of using mysqli prepared statments

2010-11-04 Thread Jay Blanchard
[snip] Just don't go too far. [/snip] I absolutely agree! Doing SP's for SP sake is not desired and be truly careful about cascading the procedures. And always, ALWAYS document your code and put copious comments in the SP's. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

RE: [PHP] Pros/Cons of using mysqli prepared statments

2010-11-04 Thread Matt Graham
"Jay Blanchard" didst scribe: > using stored procedures has a lot of advantages. If you need to > change your SQL you can do it in one spot. It reinforces MVS or > modular coding behavior, the SP becomes very re-usable. Security > is improved. Performance can be improved. You can put the bulk of >

Re: [PHP] How to code in PHP an onchange event in a ?

2010-11-04 Thread Bastien
On 2010-11-04, at 4:23 PM, Tomás Corrales Lemoine wrote: > Hi, List, > > > > I have this two files (“index.php” and “include.php”). They both work fine, > but I want to substitute the code for de onchange event in the tag. > Can I use PHP to code this event? How? > > > > Thanks. >

Re: [PHP] php-general-digest-unsubscr...@lists.php.net not working?

2010-11-04 Thread Kevin Kinsey
Paul M Foster wrote: On Thu, Nov 04, 2010 at 12:34:35PM -0400, Daniel P. Brown wrote: On Thu, Nov 4, 2010 at 12:33, Daniel P. Brown wrote: If you continue to have issues, let me know and I will remove you. From the list, that is, to be clear. Not the Earth. Dang! I was just about t

[PHP] Re: Weird preg issue

2010-11-04 Thread Alex Nikitin
but that doesnt work if you add something after the "Mooo" *sigh*. well it gets kept On Thu, Nov 4, 2010 at 3:47 PM, Alex Nikitin wrote: > Hi, > > I'm kind of new to this list, and so if there have been discussions about > this, i am not quite aware of them (i tried searching), but i ra

[PHP] Re: Weird preg issue

2010-11-04 Thread Alex Nikitin
Ah, i seem to have figured out the problem here... if you run a preg_match_all it will return [0] => Array ( [0] => And the cow says [1] => [2] => Moo" [3] => ) And preg_replace is global by default, so in order for this to work

Re: [PHP] How to code in PHP an onchange event in a ?

2010-11-04 Thread Nicholas Kell
On Nov 4, 2010, at 3:23 PM, Tomás Corrales Lemoine wrote: > Hi, List, > > I have this two files (“index.php” and “include.php”). They both work fine, > but I want to substitute the code for de onchange event in the tag. > Can I use PHP to code this event? How? > > Thanks. > > > > ind

[PHP] How to code in PHP an onchange event in a ?

2010-11-04 Thread Tomás Corrales Lemoine
Hi, List, I have this two files (“index.php” and “include.php”). They both work fine, but I want to substitute the code for de onchange event in the tag. Can I use PHP to code this event? How? Thanks. index.php: '; include_once 'include.php'; $mysql_link = tcl_MySQL_C

[PHP] Weird preg issue

2010-11-04 Thread Alex Nikitin
Hi, I'm kind of new to this list, and so if there have been discussions about this, i am not quite aware of them (i tried searching), but i ran across this issue and i figured it would be interesting enough to show you guys here: I was looking for a way to replace all the text in a string that do

Re: [PHP] php-general-digest-unsubscr...@lists.php.net not working?

2010-11-04 Thread Paul M Foster
On Thu, Nov 04, 2010 at 12:34:35PM -0400, Daniel P. Brown wrote: > On Thu, Nov 4, 2010 at 12:33, Daniel P. Brown > wrote: > > > >    If you continue to have issues, let me know and I will remove you. > > From the list, that is, to be clear. Not the Earth. Dang! I was just about to send yo

Re: [PHP] Chinese words on a PHP web page

2010-11-04 Thread tedd
At 12:52 PM -0400 11/4/10, Ernie Kemp wrote: I'm writing a program that allows the user to click the flag and the test will change to that language and display. I'm trying to convert from English to Chinese using characters such as " æ°©"è¿Î" The browser interprets these into, in this case,

Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-04 Thread Steve Staples
On Thu, 2010-11-04 at 11:48 -0600, Nathan Nobbe wrote: > On Thu, Nov 4, 2010 at 11:43 AM, Nathan Nobbe wrote: > > > $ yum search php | grep -i socket > > php-pear-Net-Socket.noarch : Network Socket Interface > > > > check that - thats def *not* the package you're looking for, it's a > userspace o

Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-04 Thread Nathan Nobbe
On Thu, Nov 4, 2010 at 11:43 AM, Nathan Nobbe wrote: > $ yum search php | grep -i socket > php-pear-Net-Socket.noarch : Network Socket Interface > check that - thats def *not* the package you're looking for, it's a userspace oo wrapper. you'd be best asking how to install this software on some s

Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-04 Thread Nathan Nobbe
On Thu, Nov 4, 2010 at 11:11 AM, Suyash R wrote: > On Tue, Nov 2, 2010 at 5:49 PM, Nathan Nobbe wrote: > >> On Tue, Nov 2, 2010 at 2:33 PM, Suyash R wrote: >> >>> No, we didn't try it our dept.'s admin wants to know where is sockets.so >>> file on disk >>> >> >> lol, tell your dept.'s 'admin' to

Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-04 Thread Suyash R
On Tue, Nov 2, 2010 at 5:49 PM, Nathan Nobbe wrote: > On Tue, Nov 2, 2010 at 2:33 PM, Suyash R wrote: > >> No, we didn't try it our dept.'s admin wants to know where is sockets.so >> file on disk >> > > lol, tell your dept.'s 'admin' to run > > locate sockets.so > yeah he couldn't find it eithe

Re: [PHP] suhosin simulation blocks script

2010-11-04 Thread Daniel P. Brown
On Thu, Nov 4, 2010 at 12:08, David Oros wrote: > Hi, > > I am just wondering if anybody have the same experience. Yes, I noticed that > the Suhosin forum is down for maintenance, as soon as possible I will write > them too. > > Answer to the question about apache, yes I did restart it. It just do

Re: [PHP] Chinese words on a PHP web page

2010-11-04 Thread a...@ashleysheridan.co.uk
You could do it using the &1234; type codes, or copy it directly from another source, like a character map program. Bear in mind that if you do the latter, you'll need to output a utf 8 meta tag with the html output too. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - Fro

[PHP] Chinese words on a PHP web page

2010-11-04 Thread Ernie Kemp
I’m writing a program that allows the user to click the flag and the test will change to that language and display. I’m trying to convert from English to Chinese using characters such as “ 歓迎” The browser interprets these into, in this case, Japanese but my code needs to display in C

Re: [PHP] php-general-digest-unsubscr...@lists.php.net not working?

2010-11-04 Thread Steve Staples
On Thu, 2010-11-04 at 12:34 -0400, Daniel P. Brown wrote: > On Thu, Nov 4, 2010 at 12:33, Daniel P. Brown > wrote: > > > >If you continue to have issues, let me know and I will remove you. > > From the list, that is, to be clear. Not the Earth. > i lol'd. -- PHP General Mailing Li

Re: [PHP] php-general-digest-unsubscr...@lists.php.net not working?

2010-11-04 Thread Daniel P. Brown
On Thu, Nov 4, 2010 at 12:33, Daniel P. Brown wrote: > >    If you continue to have issues, let me know and I will remove you. From the list, that is, to be clear. Not the Earth. -- Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/

Re: [PHP] php-general-digest-unsubscr...@lists.php.net not working?

2010-11-04 Thread Daniel P. Brown
On Thu, Nov 4, 2010 at 12:00, Marc Abramowitz wrote: > The bottom of my daily digest email says to unsubscribe, I should email > php-general-digest-unsubscr...@lists.php.net > > I've done this several times -- sometimes with various combinations of blank > and "unsubscribe" in the subject line and

Re: [PHP] php-general-digest-unsubscr...@lists.php.net not working?

2010-11-04 Thread Richard Quadling
On 4 November 2010 16:00, Marc Abramowitz wrote: > The bottom of my daily digest email says to unsubscribe, I should email > php-general-digest-unsubscr...@lists.php.net > > I've done this several times -- sometimes with various combinations of blank > and "unsubscribe" in the subject line and bod

Re: [PHP] suhosin simulation blocks script

2010-11-04 Thread David Oros
Hi, I am just wondering if anybody have the same experience. Yes, I noticed that the Suhosin forum is down for maintenance, as soon as possible I will write them too. Answer to the question about apache, yes I did restart it. It just doesn`t make any sense. Regards, -- David Oros System A

[PHP] php-general-digest-unsubscr...@lists.php.net not working?

2010-11-04 Thread Marc Abramowitz
The bottom of my daily digest email says to unsubscribe, I should email php-general-digest-unsubscr...@lists.php.net I've done this several times -- sometimes with various combinations of blank and "unsubscribe" in the subject line and body. I keep getting the emails though. -- PHP General Maili

Re: [PHP] Problems converting strings with 0 to integer

2010-11-04 Thread Richard Quadling
On 4 November 2010 15:31, robert mena wrote: > Hi Richard, > I am not top posting.  I am just explaining other symptoms that may point to > the cause since they may be the same and this is happening with the same > file.  I'll try to get approval to release the file. > Meanwhile, In your opinion w

Re: [PHP] suhosin simulation blocks script

2010-11-04 Thread Daniel P. Brown
2010/11/4 David Oros : > > I have scripts that need for example exec() functions, but in general conf - > suhosin.ini the exec function is disabled, so I turned on suhosin simulation > mode. Now it is logging ALERT-SIMULATION messages in syslog, but it also > blocks the scripts with exec() function

Re: [PHP] Problems converting strings with 0 to integer

2010-11-04 Thread Richard Quadling
On 4 November 2010 15:11, robert mena wrote: > Hi, > The core of the code is simply > $fp = fopen('file.tab', 'rb'); > while(!feof($fp)) > { >    $line = fgets($fp); >    $data = explode("\t", $line); >     ... > } > So I try to manipulate the $data[X].  For example $data[0] is supposed to be > nu

[PHP] suhosin simulation blocks script

2010-11-04 Thread David Oros
Hello, I am searching through the internet how to work with suhosin. I am using debain lenny with apache2 and php 5.2 in production and my problem is: I have scripts that need for example exec() functions, but in general conf - suhosin.ini the exec function is disabled, so I turned on suhosin

Re: [PHP] Problems converting strings with 0 to integer

2010-11-04 Thread robert mena
Hi, The core of the code is simply $fp = fopen('file.tab', 'rb'); while(!feof($fp)) { $line = fgets($fp); $data = explode("\t", $line); ... } So I try to manipulate the $data[X]. For example $data[0] is supposed to be numeric so I $n = (int) $data[0] One other thing if the second co

Re: [PHP] Re: Apache mod_pagespeed

2010-11-04 Thread Daniel P. Brown
On Thu, Nov 4, 2010 at 10:58, Colin Guthrie wrote: > > Nice. I still stick spaces in my tags due to the parsing error in > IE(somethingold) but I'm pretty sure that was pre-IE6 and thus something > I really don't care about now! > > That said, I'm not sure I'd really want it to optimise all my HT

Re: [PHP] PHP sessions - users being automatically logged out

2010-11-04 Thread Paul Waring
On 04/11/10 14:56, Alexander Holodny wrote: Inc session.cache_expire. You have only 3 minutes. This means browser will drop cookie containing session id in three minutes, or even less, of clients inactivity. According to the PHP manual: "session.cache_expire specifies time-to-live for cached s

[PHP] Re: Apache mod_pagespeed

2010-11-04 Thread Colin Guthrie
'Twas brillig, and Daniel P. Brown at 04/11/10 14:36 did gyre and gimble: > I'm already highly impressed with mod_pagespeed. It even > removes excess spaces - such as those in tags - without any > adverse reactions I've seen so far. Nice. I still stick spaces in my tags due to the parsing error

Re: [PHP] PHP sessions - users being automatically logged out

2010-11-04 Thread Alexander Holodny
Inc session.cache_expire. You have only 3 minutes. This means browser will drop cookie containing session id in three minutes, or even less, of clients inactivity. I prefer to set expire-time to zero. So, browser will never forget session id. In other case, if security requires, i usually set it to

Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-04 Thread Suyash R
We added the extension=sockets.so to php.ini but it didn't work. However, the problem was there was no sockets.so extension anywhere to be found. i searched if I could install or add sockets.so extension. Couldn't find anything. Still looking for it. Thank you for all the help. -Suyash On Tue

Re: [PHP] Re: Apache mod_pagespeed

2010-11-04 Thread Daniel P. Brown
On Thu, Nov 4, 2010 at 05:12, Colin Guthrie wrote: > > Yeah it seems like a nice idea. Basically we already do a "pre-process > stage where we minify css and js before we deploy the application (dev > versions are nicely verbose so that the "javascript error on line 1" > debugging does not plague

[PHP] PHP sessions - users being automatically logged out

2010-11-04 Thread Paul Waring
I'm having trouble with a PHP site whereby some users are being logged out on a regular basis. This will usually happen after they have been using the site for a few minutes, they can login without any problems and access a few pages, but then suddenly they will request a page and be sent to th

RE: [PHP] Pros/Cons of using mysqli prepared statments

2010-11-04 Thread Jay Blanchard
[snip] If you have a query in your PHP code, which you are going to be executing a lot, even if you are using prepared statements, you can go one further by creating a stored procedure. Now the SQL server will only ever need to compile the statement once. No matter how many times it is used. You on

Re: [PHP] Pros/Cons of using mysqli prepared statments

2010-11-04 Thread Richard Quadling
On 4 November 2010 10:42, Richard Quadling wrote: > On 4 November 2010 08:19, Shreyas Agasthya wrote: >> Tamara, >> >> In one of the earlier threads, it was mentioned mysqli APIs are more secure, >> faster, and actually maintained. >> >> Also, if you use some of the mysql_xxx(), you actually get

Re: [PHP] Pros/Cons of using mysqli prepared statments

2010-11-04 Thread Richard Quadling
On 4 November 2010 08:19, Shreyas Agasthya wrote: > Tamara, > > In one of the earlier threads, it was mentioned mysqli APIs are more secure, > faster, and actually maintained. > > Also, if you use some of the mysql_xxx(), you actually get a warning saying > that it will be or it is being deprecate

Re: [PHP] Problems converting strings with 0 to integer

2010-11-04 Thread Richard Quadling
On 4 November 2010 10:33, Richard Quadling wrote: > // Create test file. > $s_TabbedFilename = './test.tab'; > file_put_contents($s_TabbedFilename, "0\t0002" . PHP_EOL . > "4\t0004" . PHP_EOL); > > // Open test file. > $fp_TabbedFile = fopen($s_TabbedFilename, 'rt') or die("Could not open

Re: [PHP] Problems converting strings with 0 to integer

2010-11-04 Thread Richard Quadling
On 3 November 2010 21:42, Alexander Holodny wrote: > To exclude unexcepted behavior in case of wrongly formated input data, > it would be much better to use such type-casting method: > intval(ltrim(trim($inStr), '0')) > > 2010/11/3, Nicholas Kell : >> >> On Nov 3, 2010, at 4:22 PM, robert mena wro

[PHP] Re: Apache mod_pagespeed

2010-11-04 Thread Colin Guthrie
'Twas brillig, and Daniel P. Brown at 03/11/10 19:34 did gyre and gimble: > On Wed, Nov 3, 2010 at 14:48, Shreyas Agasthya wrote: >> Thiago, >> >> I would like to join this. Let me know how I can help you with this. Please >> be explicit with your requests so that we can totally test it and see i

Re: [PHP] Pros/Cons of using mysqli prepared statments

2010-11-04 Thread Shreyas Agasthya
Tamara, In one of the earlier threads, it was mentioned mysqli APIs are more secure, faster, and actually maintained. Also, if you use some of the mysql_xxx(), you actually get a warning saying that it will be or it is being deprecated and paves the way for you to approach the same thing with mys

[PHP] Pros/Cons of using mysqli prepared statments

2010-11-04 Thread Tamara Temple
I'm wondering what the advantages/disadvantage of using prepared statements with mysqli are. I'm used to using the mysqli::query and mysqli::fetch_assoc functions to deal with retrieving data and bulding my sql statement in php code. Tamara Temple -- aka tamouse__ tam...@tamaratempl