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

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

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

2011-03-30 Thread Negin Nickparsa
session1.php: session2.php:

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

2011-03-30 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 certai

Re: [PHP] is there a static constructor?

2011-03-30 Thread Peter Lind
On 31 March 2011 06:56, D. Dante Lorenso wrote: > All, > > I want to build a config file class that gets called statically.  Is there > such a thing as a static constructor?  Example: > > class Daz_Config { >  public static function load() { >    ... >  } >  public static function get($key) { >  

Re: [PHP] Sessions - More Info - SOLVED

2011-03-30 Thread Ethan Rosenberg
At 07:28 PM 3/30/2011, Ashley Sheridan wrote: On Wed, 2011-03-30 at 19:20 -0400, Ethan Rosenberg wrote: > 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 det

Re: [PHP] is there a static constructor?

2011-03-30 Thread Ryan
There is such thing, but its not called static constructor, its called singleton pattern class SingletonA { public static instance; public SingletonA(){} public static function getInstancce() { if(self::instance != null) { return self::instanc; } return new Singleton

[PHP] is there a static constructor?

2011-03-30 Thread D. Dante Lorenso
All, I want to build a config file class that gets called statically. Is there such a thing as a static constructor? Example: class Daz_Config { public static function load() { ... } public static function get($key) { self :: load(); ... } } Daz_Config :: get('myvalue');

Re: [PHP] Sessions - More Info

2011-03-30 Thread Ashley Sheridan
On Wed, 2011-03-30 at 19:20 -0400, Ethan Rosenberg wrote: > 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. > > > > "h

[PHP] Sessions - More Info

2011-03-30 Thread Ethan Rosenberg
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. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1

Re: [PHP] Re: Slow sessions.

2011-03-30 Thread Bostjan Skufca
Nice of you to post the resolution of your problem. Glad to hear it is fixed now. Take care, b. On 30 March 2011 17:46, Rob Adams wrote: > On 3/28/2011 3:40 PM, Bostjan Skufca wrote: > >> Great, please report back if/when you discover the cause. >> > > After searching for some information abou

[PHP] Session Variables - Error

2011-03-30 Thread Ethan Rosenberg
Dear List - Thanks for your help. Here is another one. I cannot get my session variables to work. The program will print out a chess board and show the positions of the pieces after the move Here are code snippets: The program is chess2.php $results = array(array("Br", "Bn", "Bb", "Bq"

Re: [PHP] Permission Denied - Help Requested - Solved

2011-03-30 Thread Ethan Rosenberg
At 12:07 AM 3/30/2011, Adam Richardson wrote: On Tue, Mar 29, 2011 at 8:21 PM, Ethan Rosenberg wrote: > At 05:33 PM 3/29/2011, Adam Richardson wrote: > >> > >> > Thanks. >> > >> > What do you see if you run this? "Can't open or create file!" >> > >> > Ethan >> >> >> OK, >> >> If you're running

Re: [PHP] Re: Slow sessions.

2011-03-30 Thread Rob Adams
On 3/28/2011 3:40 PM, Bostjan Skufca wrote: Great, please report back if/when you discover the cause. After searching for some information about the error messages I was getting on the file server, I found this: http://www.spinics.net/lists/linux-nfs/msg14679.html I ran 'server nfslock stat

Re: [PHP] Grasping class / controllers

2011-03-30 Thread Aleksandar Skodric
Hi, Yes indeed you are correct. Found out that framework was loading libraries from array in specific order, whereby one overrules the next one. Anyway, problem solved by rearranging the order of the array :) Thanks anyway :) On 03/30/2011 04:13 PM, Ashley Sheridan wrote: "Aleksandar Skodri

Re: [PHP] Grasping class / controllers

2011-03-30 Thread Ashley Sheridan
"Aleksandar Skodric" wrote: >Hi all, > >I am using Codeigniter framework, tho' I believe my question is more >PHP >related in general. > >Problem I am having is following. > >Codeigniter (CI) uses general class CI_Controller for all functions. >I have extended this controller with: abstract class

[PHP] Grasping class / controllers

2011-03-30 Thread Aleksandar Skodric
Hi all, I am using Codeigniter framework, tho' I believe my question is more PHP related in general. Problem I am having is following. Codeigniter (CI) uses general class CI_Controller for all functions. I have extended this controller with: abstract class CORE_Controller extends CI_Controll

Re: [PHP] Path question

2011-03-30 Thread Richard Quadling
On 29 March 2011 19:41, D. Dante Lorenso wrote: > On 3/28/11 8:18 PM, 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

[PHP] Re: Resizing an image

2011-03-30 Thread Ross McKay
On Tue, 29 Mar 2011 03:21:48 +0300, Andre Polykanine wrote: >[...] >My questions are: >1. what are the restrictions of ImageCopyResampled()? Can I make a jpg >image from a jpg one, and a png image from a png one? And what about >gif's? Yes, or even a JPEG from a GIF, or a PNG from a JPEG, etc