php-general Digest 31 Mar 2011 14:38:03 -0000 Issue 7252

2011-03-31 Thread php-general-digest-help
php-general Digest 31 Mar 2011 14:38:03 - Issue 7252 Topics (messages 312146 through 312156): Sessions - More Info 312146 by: Ethan Rosenberg 312147 by: Ashley Sheridan is there a static constructor? 312148 by: D. Dante Lorenso 312149 by: Ryan 312151

[PHP] session_start() may take 5 seconds :(

2011-03-31 Thread Tolas Anon
My web-app sometimes takes just over 5 seconds to execute a single start_session() statement. No other connections are open to the site when i hit the button that makes this happen, the session is just 78kb on a local disk, and it's consistent behavior. So far, it only happens when i request

Re: [PHP] session_start() may take 5 seconds :(

2011-03-31 Thread Negin Nickparsa
session1.php: ?php session_start(); $_SESSION['s1']='sth'; header(location: session2.php?.SID); ? session2.php: ?php session_start(); if(isset($_SESSION['s1'])) echo $_SESSION['s1']; else die(No session!); ?

Re: [PHP] session_start() may take 5 seconds :(

2011-03-31 Thread Tolas Anon
On Thu, Mar 31, 2011 at 8:10 AM, Negin Nickparsa nickpa...@gmail.com wrote: session1.php: ?php session_start(); $_SESSION['s1']='sth'; header(location: session2.php?.SID); ? session2.php: ?php session_start(); if(isset($_SESSION['s1'])) echo $_SESSION['s1']; else die(No session!); ?

Re: [PHP] is there a static constructor?

2011-03-31 Thread Darren Karstens
class Daz_Config { private static $instance; private function __construct(){ $this-load(); } private function load() { ... } public function get($key) { ... } public static getInstance(){ if (!self::$instance) self::$instance = new Daz_Config();

Re: [PHP] Path question

2011-03-31 Thread tedd
At 9:18 PM -0400 3/28/11, Jack wrote: Hello All, Is there a smarter way to do includes by setting up a path or something where I don't have to include /home/domain.com/includes/include_file.php Apparently my path is as shown above, but I would prefer to just put in

[PHP] If Statements Array and Notice Undefined Index

2011-03-31 Thread Nicholas Cooper
Good day, I have three arrays A, B and C. Anyone of them might not have the 'id' key set which will give the Notice Undefined index: id. I just wanted to know what the correct approach to this problem would be; without making the code overly complicated to read by introducing a number of if

Re: [PHP] If Statements Array and Notice Undefined Index

2011-03-31 Thread Stuart Dallas
On Thursday, 31 March 2011 at 15:45, Nicholas Cooper wrote: Good day, I have three arrays A, B and C. Anyone of them might not have the 'id' key set which will give the Notice Undefined index: id. I just wanted to know what the correct approach to this problem would be; without making the

[PHP] Re: session_start() may take 5 seconds :(

2011-03-31 Thread Tolas Anon
On Thu, Mar 31, 2011 at 7:58 AM, Tolas Anon tolas...@gmail.com wrote: My web-app sometimes takes just over 5 seconds to execute a single start_session() statement. No other connections are open to the site when i hit the button that makes this happen, the session is just 78kb on a local disk,

[PHP] Re: session_start() may take 5 seconds :(

2011-03-31 Thread Tolas Anon
On Thu, Mar 31, 2011 at 4:53 PM, Tolas Anon tolas...@gmail.com wrote: On Thu, Mar 31, 2011 at 7:58 AM, Tolas Anon tolas...@gmail.com wrote: My web-app sometimes takes just over 5 seconds to execute a single start_session() statement. No other connections are open to the site when i hit the

Re: [PHP] If Statements Array and Notice Undefined Index

2011-03-31 Thread Nicholas Cooper
On 31 March 2011 15:53, Stuart Dallas stu...@3ft9.com wrote: On Thursday, 31 March 2011 at 15:45, Nicholas Cooper wrote: Good day, I have three arrays A, B and C. Anyone of them might not have the 'id' key set which will give the Notice Undefined index: id. I just wanted to know what

[PHP] neubie seeking answers

2011-03-31 Thread Kirk Bailey
I need to extract the name of the subdirectory a page lives in to use in the title for that page. This will be returned as a string to echo to the output stream. Now how the heck do I do that?!? -- end Very Truly yours, - Kirk Bailey, Largo Florida

Re: [PHP] neubie seeking answers

2011-03-31 Thread Richard Quadling
On 31 March 2011 17:24, Kirk Bailey kbai...@howlermonkey.net wrote: I need to extract the name of the subdirectory a page lives in to use in the title for that page. This will be returned as a string to echo to the output stream. Now how the heck do I do that?!? __DIR__ is the name of the

Re: [PHP] neubie seeking answers

2011-03-31 Thread Stuart Dallas
On Thursday, 31 March 2011 at 17:24, Kirk Bailey wrote: I need to extract the name of the subdirectory a page lives in to use in the title for that page. This will be returned as a string to echo to the output stream. Now how the heck do I do that?!? $dir = basename(dirname(__FILE__));

Re: [PHP] neubie seeking answers

2011-03-31 Thread Steve Staples
On Thu, 2011-03-31 at 12:24 -0400, Kirk Bailey wrote: I need to extract the name of the subdirectory a page lives in to use in the title for that page. This will be returned as a string to echo to the output stream. Now how the heck do I do that?!? -- end Very Truly yours,

Re: [PHP] neubie seeking answers

2011-03-31 Thread Steve Staples
On Thu, 2011-03-31 at 17:34 +0100, Stuart Dallas wrote: On Thursday, 31 March 2011 at 17:24, Kirk Bailey wrote: I need to extract the name of the subdirectory a page lives in to use in the title for that page. This will be returned as a string to echo to the output stream. Now how the heck

[PHP] Closing Session

2011-03-31 Thread Ethan Rosenberg
Dear List - Thanks for your help. How do I close a session form the terminal? I need the ability to do this for debugging. I often have more than one session open at the same time, so creating a program with session_start() and session_unset() or session_destoy() would probably not work.

RE: [PHP] Closing Session

2011-03-31 Thread Jay Blanchard
[snip]How do I close a session form the terminal?[/snip] http://php.net/manual/en/function.session-destroy.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Closing Session

2011-03-31 Thread Daniel Brown
On Thu, Mar 31, 2011 at 13:09, Ethan Rosenberg eth...@earthlink.net wrote: Dear List - Thanks for your help. How do I close a session form the terminal?  I need the ability to do this for debugging.  I often have more than one session open at the same time, so creating a program with

Re: [PHP] Closing Session

2011-03-31 Thread Ethan Rosenberg
At 01:30 PM 3/31/2011, Daniel Brown wrote: On Thu, Mar 31, 2011 at 13:09, Ethan Rosenberg eth...@earthlink.net wrote: Dear List - Thanks for your help. How do I close a session form the terminal? I need the ability to do this for debugging. I often have more than one session open at the

Re: [PHP] Closing Session

2011-03-31 Thread Ashley Sheridan
On Thu, 2011-03-31 at 13:54 -0400, Ethan Rosenberg wrote: At 01:30 PM 3/31/2011, Daniel Brown wrote: On Thu, Mar 31, 2011 at 13:09, Ethan Rosenberg eth...@earthlink.net wrote: Dear List - Thanks for your help. How do I close a session form the terminal? I need the ability to do

Re: [PHP] is there a static constructor?

2011-03-31 Thread Admin
Why not just create a no named function in the top of the class. This this way it loads on include. Richard Buskirk Sent from my iPhone On Mar 31, 2011, at 12:56 AM, D. Dante Lorenso da...@lorenso.com wrote: All, I want to build a config file class that gets called statically. Is there

Re: [PHP] Closing Session

2011-03-31 Thread Daniel Brown
On Thu, Mar 31, 2011 at 13:54, Ethan Rosenberg eth...@earthlink.net wrote: That is what I have. So now the guessing game begins, I suppose, right? What happened to rephrasing the original question, Ethan? ;-P (And why did you send me a link to your copy of WinZip?) -- /Daniel

[PHP] Re: session variable problem

2011-03-31 Thread markb
On 3/25/2011 12:09 PM, markb wrote: Very rusty with PHP. We moved our web site to a new hosting service (godaddy). PHP changed from 4x to 5.2.17. I can no longer change $_SESSION variables after the first use. First call to form - start session create variables Second call - can read variables,

Re: [PHP] Closing Session

2011-03-31 Thread Ethan Rosenberg
At 02:12 PM 3/31/2011, Ashley Sheridan wrote: On Thu, 2011-03-31 at 13:54 -0400, Ethan Rosenberg wrote: At 01:30 PM 3/31/2011, Daniel Brown wrote: On Thu, Mar 31, 2011 at 13:09, Ethan Rosenberg eth...@earthlink.net wrote: Dear List - Thanks for your help. How do I close a

Re: [PHP] Closing Session

2011-03-31 Thread Daniel Brown
On Thu, Mar 31, 2011 at 16:40, Ethan Rosenberg eth...@earthlink.net wrote: Ash - I can be working on more than one program simultaneously and have one tab open w/ program A and another w/ program B.  The site in reference is http://localhost; I hope this helps. Ah, but

Re: [PHP] Closing Session

2011-03-31 Thread Ashley Sheridan
On Thu, 2011-03-31 at 16:40 -0400, Ethan Rosenberg wrote: At 02:12 PM 3/31/2011, Ashley Sheridan wrote: On Thu, 2011-03-31 at 13:54 -0400, Ethan Rosenberg wrote: At 01:30 PM 3/31/2011, Daniel Brown wrote: On Thu, Mar 31, 2011 at 13:09, Ethan Rosenberg eth...@earthlink.net wrote:

Re: [PHP] Closing Session

2011-03-31 Thread Steve Staples
On Thu, 2011-03-31 at 16:51 -0400, Daniel Brown wrote: On Thu, Mar 31, 2011 at 16:40, Ethan Rosenberg eth...@earthlink.net wrote: Ash - I can be working on more than one program simultaneously and have one tab open w/ program A and another w/ program B. The site in reference

Re: [PHP] Closing Session

2011-03-31 Thread Stuart Dallas
On Thursday, 31 March 2011 at 21:53, Ashley Sheridan wrote: On Thu, 2011-03-31 at 16:40 -0400, Ethan Rosenberg wrote: At 02:12 PM 3/31/2011, Ashley Sheridan wrote: On Thu, 2011-03-31 at 13:54 -0400, Ethan Rosenberg wrote: At 01:30 PM 3/31/2011, Daniel Brown wrote: On Thu, Mar

[PHP] PHP 5.2.x with MySQL 5.5.x

2011-03-31 Thread Andre Matos
Hello, We are migrating our MySQL database from 5.0.x to 5.5.x and I have noticed that the current PHP 4.4.x we have will not be compatible with the MySQL 5.5.x.. It has the Client API version for MySQL 5.0.x Unfortunately at this point, we cannot use PHP 5.3.x because of some old application

Re: [PHP] Closing Session

2011-03-31 Thread Ethan Rosenberg
At 05:37 PM 3/31/2011, Ethan Rosenberg wrote: At 04:51 PM 3/31/2011, Daniel Brown wrote: On Thu, Mar 31, 2011 at 16:40, Ethan Rosenberg eth...@earthlink.net wrote: Ash - I can be working on more than one program simultaneously and have one tab open w/ program A and another w/

Re: [PHP] Closing Session

2011-03-31 Thread Ethan Rosenberg
snip 127.0.0.1 localhost development subdomain.development Don't worry about it being an FQDN. Prior to checking with the router or DNS servers, all modern systems check the hosts file. Then just add a reference to each in your Apache configuration file and restart Apache. Boom.

Re: [PHP] Sessions - More Info

2011-03-31 Thread Boers Steven
Dear List - Thank you for your help in the past. This an update on my session problems. Here is a simple test program. It never increments the session counter; ie, does not detect that $_SESSION has been set. ?php session_start(); ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0

[PHP] Re: If Statements Array and Notice Undefined Index

2011-03-31 Thread Al
On 3/31/2011 10:45 AM, Nicholas Cooper wrote: Good day, I have three arrays A, B and C. Anyone of them might not have the 'id' key set which will give the Notice Undefined index: id. I just wanted to know what the correct approach to this problem would be; without making the code overly

Re: [PHP] neubie seeking answers

2011-03-31 Thread Kirk Bailey
PERFECT SIMPLE SOLUTION. THANK YOU! On 3/31/2011 12:34 PM, Stuart Dallas wrote: On Thursday, 31 March 2011 at 17:24, Kirk Bailey wrote: I need to extract the name of the subdirectory a page lives in to use in the title for that page. This will be returned as a string to echo to the output