php-general Digest 1 Aug 2011 11:34:24 -0000 Issue 7423
php-general Digest 1 Aug 2011 11:34:24 - Issue 7423 Topics (messages 314252 through 314263): Re: Session treating 314252 by: Andre Polykanine Problem with header(Location: )... 314253 by: Jason Pruim 314254 by: Dajka Tamas 314255 by: Jason Pruim 314260 by: Tamara Temple 314261 by: Jason Pruim Phone numbers 314256 by: Jason Pruim 314257 by: Alex Nikitin 314258 by: Jason Pruim 314259 by: Ashley Sheridan Understanding deprecated features from 5.2 - 5.3 314262 by: robert mena What is valid for a named parameter in a prepared query using PDO_SQLSRV. 314263 by: Richard Quadling Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- Hello Ashley, One thing sticks out a little bit to me. In your index.php file, you're accessing an element of the $_SESSION array, but without calling session_start() first. I believe this may be causing the issue you are seeing. I tried using it without success. I'm having now 3 separate session IDs: 1. Before the login form is processed, 2. After the login form is processed, 3. When clicking the Articles link, on the articles.php page. -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion ---End Message--- ---BeginMessage--- So I'm attempting to redirect back to the main site of a page after a successful insert into a database... Here's my code: ?PHP if (!$resp-is_valid) { // What happens when the CAPTCHA was entered incorrectly die (The reCAPTCHA wasn't entered correctly. Go back and try it again. . (reCAPTCHA said: . $resp-error . )); } else { $name = mysql_real_escape_string($_POST['txtName']); $comment = mysql_real_escape_string($_POST['areaComment']); $phonelink = mysql_real_escape_string($_POST['phonelink']); $SQL = INSERT INTO comments (name, comment, phonelink) VALUES ('$name', '$comment', '$phonelink'); mysql_query($SQL) or die(Unable to insert at this time. Sorry for the inconvience); //echo Insert successful!; header(Location: HTTP://jason.pruimphotography.com/dev/clients/flewid/Phone/); // Your code here to handle a successful verification } ? The insert happens, BUT it won't redirect back to the site There isn't any reason I should be able to do a header() redirect at that point is there? Or is there a better way to do it? Thanks Everyone! Jason Pruim li...@pruimphotography.com ---End Message--- ---BeginMessage--- Try lowercase 'http'. Anything in error log? Try turning on display_errors. Cheers, Tamas -Original Message- From: Jason Pruim [mailto:li...@pruimphotography.com] Sent: Sunday, July 31, 2011 8:40 PM To: php-gene...@lists.php.net Subject: [PHP] Problem with header(Location: )... So I'm attempting to redirect back to the main site of a page after a successful insert into a database... Here's my code: ?PHP if (!$resp-is_valid) { // What happens when the CAPTCHA was entered incorrectly die (The reCAPTCHA wasn't entered correctly. Go back and try it again. . (reCAPTCHA said: . $resp-error . )); } else { $name = mysql_real_escape_string($_POST['txtName']); $comment = mysql_real_escape_string($_POST['areaComment']); $phonelink = mysql_real_escape_string($_POST['phonelink']); $SQL = INSERT INTO comments (name, comment, phonelink) VALUES ('$name', '$comment', '$phonelink'); mysql_query($SQL) or die(Unable to insert at this time. Sorry for the inconvience); //echo Insert successful!; header(Location: HTTP://jason.pruimphotography.com/dev/clients/flewid/Phone/); // Your code here to handle a successful verification } ? The insert happens, BUT it won't redirect back to the site There isn't any reason I should be able to do a header() redirect at that point is there? Or is there a better way to do it? Thanks Everyone! Jason Pruim li...@pruimphotography.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- ---BeginMessage--- Jason Pruim li...@pruimphotography.com On Jul 31, 2011, at 2:50 PM, Dajka Tamas wrote: Try lowercase 'http'. Anything in error log? Try turning on display_errors. Tried both, upper and lower case http nothing changed... And nothing in the error log... I try a simple echo with a link and that works just fine... Starting to get
php-general Digest 2 Aug 2011 05:45:51 -0000 Issue 7424
php-general Digest 2 Aug 2011 05:45:51 - Issue 7424 Topics (messages 314264 through 314267): 3.1.9 build of APC win 64 314264 by: Dan Baughman 314265 by: Lester Caine 314266 by: Dan Baughman Keyword Constructor 314267 by: Ren Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- Does anyone know where you can download a 64 bit build of apc 3.1.9? I want to take advantage of some of the stuff they've pushed out since 3.1.8 for windows, but can't find a 64 bit binary to save my life. ---End Message--- ---BeginMessage--- Dan Baughman wrote: Does anyone know where you can download a 64 bit build of apc 3.1.9? I want to take advantage of some of the stuff they've pushed out since 3.1.8 for windows, but can't find a 64 bit binary to save my life. http://www.anindya.com/php-5-3-6-x64-64-bit-for-windows/ is still 3.1.6, and while I expect Anindya will be running a 5.3.7 soon with the later libraries, but I've dropped a comment asking if 3.1.9 will build for use with 5.3.6 and Anindya is normally quite quick responding if requests are simple. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php ---End Message--- ---BeginMessage--- Thank you. On Mon, Aug 1, 2011 at 9:20 AM, Lester Caine les...@lsces.co.uk wrote: Dan Baughman wrote: Does anyone know where you can download a 64 bit build of apc 3.1.9? I want to take advantage of some of the stuff they've pushed out since 3.1.8 for windows, but can't find a 64 bit binary to save my life. http://www.anindya.com/php-5-**3-6-x64-64-bit-for-windows/http://www.anindya.com/php-5-3-6-x64-64-bit-for-windows/is still 3.1.6, and while I expect Anindya will be running a 5.3.7 soon with the later libraries, but I've dropped a comment asking if 3.1.9 will build for use with 5.3.6 and Anindya is normally quite quick responding if requests are simple. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=**contacthttp://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/**index.phphttp://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- ---BeginMessage--- For a long time I wanted keyword parameters in PHP. But thanks to newer features like traits and reflection classes I have come up with something that looks pretty close. trait KeywordConstructor { public function __construct($members) { $class = new ReflectionClass($this); $properties = $class-getProperties(); foreach ($properties as $p) { $name = $p-getName(); if (isset($members[$name])) { $this-$name = $members[$name]; } } } } class User { use KeywordConstructor; private $name; private $age; } $lobby = new User(['name' = 'Lobby', 'age' = 36]); Right now this requires the trunk version of PHP to work. I just wanted to share this in case anyone finds it interesting and/or useful. -- ejmr 南無妙法蓮華經 ---End Message---
[PHP] What is valid for a named parameter in a prepared query using PDO_SQLSRV.
Hi. Just started using PDO with the nice and shiny SQLSRV driver form Microsoft for SQL Server. I seem to be having an issue with named parameters in prepared statements. Are there limitations to the characters that can be used for named parameters. UPPER, lower and MixedCase all seem OK, but I think I'm messing up with _. And my brain JUST fired and told me _ is a single character wildcard (as when used within a LIKE statement). Can anyone confirm? The usernote http://www.php.net/manual/en/pdo.prepared-statements.php#97162 mentions the use of hyphen (-), but not underscore (_). I'm also going to be converting an old style coding mysql to mysqli prepared statements (I know very little mysql, so 2 lots of learning going on here). Would mysqli have the same behaviour? Is it driver specific? Regards, Richard. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 3.1.9 build of APC win 64
Does anyone know where you can download a 64 bit build of apc 3.1.9? I want to take advantage of some of the stuff they've pushed out since 3.1.8 for windows, but can't find a 64 bit binary to save my life.
Re: [PHP] 3.1.9 build of APC win 64
Dan Baughman wrote: Does anyone know where you can download a 64 bit build of apc 3.1.9? I want to take advantage of some of the stuff they've pushed out since 3.1.8 for windows, but can't find a 64 bit binary to save my life. http://www.anindya.com/php-5-3-6-x64-64-bit-for-windows/ is still 3.1.6, and while I expect Anindya will be running a 5.3.7 soon with the later libraries, but I've dropped a comment asking if 3.1.9 will build for use with 5.3.6 and Anindya is normally quite quick responding if requests are simple. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 3.1.9 build of APC win 64
Thank you. On Mon, Aug 1, 2011 at 9:20 AM, Lester Caine les...@lsces.co.uk wrote: Dan Baughman wrote: Does anyone know where you can download a 64 bit build of apc 3.1.9? I want to take advantage of some of the stuff they've pushed out since 3.1.8 for windows, but can't find a 64 bit binary to save my life. http://www.anindya.com/php-5-**3-6-x64-64-bit-for-windows/http://www.anindya.com/php-5-3-6-x64-64-bit-for-windows/is still 3.1.6, and while I expect Anindya will be running a 5.3.7 soon with the later libraries, but I've dropped a comment asking if 3.1.9 will build for use with 5.3.6 and Anindya is normally quite quick responding if requests are simple. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=**contacthttp://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/**index.phphttp://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Keyword Constructor
For a long time I wanted keyword parameters in PHP. But thanks to newer features like traits and reflection classes I have come up with something that looks pretty close. trait KeywordConstructor { public function __construct($members) { $class = new ReflectionClass($this); $properties = $class-getProperties(); foreach ($properties as $p) { $name = $p-getName(); if (isset($members[$name])) { $this-$name = $members[$name]; } } } } class User { use KeywordConstructor; private $name; private $age; } $lobby = new User(['name' = 'Lobby', 'age' = 36]); Right now this requires the trunk version of PHP to work. I just wanted to share this in case anyone finds it interesting and/or useful. -- ejmr 南無妙法蓮華經 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php