Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread kranthi
I dont think I understood you completely.. Javascript debugger: Something you use to debug javascript. but Formaldehyde dosent make any seance if xhr object is not used. PHP Debugger: We cant use Formaldehyde to debug errors in every single PHP script. I am talking about pages called directly via

Re: [PHP] get an object property

2009-09-11 Thread Lars Torben Wilson
Tom Worster wrote: if i have an expression that evaluates to an object, the return value from a function, say, and i only want the value of one of the objects properties, is there a tidy way to get it without setting another variable? to illustrate, here's something that doesn't work, but it wou

Re: [PHP] User Account Management

2009-09-11 Thread Lester Caine
Waynn Lue wrote: Hello all, We're building out a system that allows for user account creation/password management, and we're hoping to use existing open source software so we don't have to reinvent the wheel. I know of Drupal, and Zend Framework (and maybe CodeIgniter?), but do people have spec

Re: [PHP] Fixing the path

2009-09-11 Thread Paul M Foster
On Sat, Sep 12, 2009 at 06:18:50AM +0200, Rico Secada wrote: > Hi. > > Some time ago I developed a small web application that a bunch of users > has installed. > > I have always used the DOCUMENT_ROOT for my includes, but the other day > I installed the application in a subdirectory, and as you'

Re: [PHP] get an object property

2009-09-11 Thread Paul M Foster
On Fri, Sep 11, 2009 at 07:31:01PM -0400, Tom Worster wrote: > if i have an expression that evaluates to an object, the return value from a > function, say, and i only want the value of one of the objects properties, > is there a tidy way to get it without setting another variable? > > to illustr

Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread Paul M Foster
On Sat, Sep 12, 2009 at 12:23:44AM +0200, Andrea Giammarchi wrote: > > Exactly Ben, except when PHP fails, even with a Fatal Error, the page has > status 200, we need to understand which call failed between hundreds of > potential calls in the debugger, and errors could pass silently. > > With

[PHP] Fixing the path

2009-09-11 Thread Rico Secada
Hi. Some time ago I developed a small web application that a bunch of users has installed. I have always used the DOCUMENT_ROOT for my includes, but the other day I installed the application in a subdirectory, and as you've guessed a lot of the includes didn't work. I have been reading up on the

Re: [PHP] Creating alphanumeric id for a table

2009-09-11 Thread aveev
The reason why I used incremental value from the db is that I need a sequence number generator that can be used as an argument to my function. If I can generate sequence number myself, I don't need this incremental value from db. What I want is that the sequential alphanumeric id that increments i

Re: [PHP] User Account Management

2009-09-11 Thread Ben Dunlap
> Honestly, whipping up a security scheme the way I have done it is a > couple of days' work (including login and management screens). I'm not > sure why people seem to be averse to it. You just work up your screens, I suppose it does depend on the use case. If you're building a system for interna

Re: [PHP] get an object property

2009-09-11 Thread John Corry
Wouldn't it be $o[1]->a? J Corry Sent from my iPhone On Sep 11, 2009, at 7:31 PM, Tom Worster wrote: if i have an expression that evaluates to an object, the return value from a function, say, and i only want the value of one of the objects properties, is there a tidy way to get it withou

[PHP] get an object property

2009-09-11 Thread Tom Worster
if i have an expression that evaluates to an object, the return value from a function, say, and i only want the value of one of the objects properties, is there a tidy way to get it without setting another variable? to illustrate, here's something that doesn't work, but it would be convenient if i

Re: [PHP] Creating alphanumeric id for a table

2009-09-11 Thread Lupus Michaelis
aveev wrote: where the id consists of 3 alphanumeric characters and 4 numerical digits in the beginning (for numerical digit, it can grow like this AAA10001). I try to use php script to generate id like this, where I use the following script. $id = $num; if($num_dig <= $sta

Re: [PHP] User Account Management

2009-09-11 Thread Paul M Foster
On Fri, Sep 11, 2009 at 02:43:15PM -0700, Waynn Lue wrote: > Hello all, > > We're building out a system that allows for user account creation/password > management, and we're hoping to use existing open source software so we > don't have to reinvent the wheel. I know of Drupal, and Zend Framewor

RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread Andrea Giammarchi
Exactly Ben, except when PHP fails, even with a Fatal Error, the page has status 200, we need to understand which call failed between hundreds of potential calls in the debugger, and errors could pass silently. With Formaldehyde, accordingly with your predefined error_reporting level, above si

RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread Andrea Giammarchi
> Date: Fri, 11 Sep 2009 12:37:30 -0400 > To: an_...@hotmail.com; php-general@lists.php.net > From: tedd.sperl...@gmail.com > Subject: RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error > Debugger > The only > things that may go wrong are in the data I am sending to the ajax > rou

Re: [PHP] Reading files in PHP 5.3.0

2009-09-11 Thread Paul M Foster
On Fri, Sep 11, 2009 at 08:38:13AM -0700, Tommy Pham wrote: > --- On Fri, 9/11/09, Paul M Foster wrote: > > > From: Paul M Foster > > Subject: Re: [PHP] Reading files in PHP 5.3.0 > > To: php-general@lists.php.net > > Date: Friday, September 11, 2009, 8:57 AM > > On Fri, Sep 11, 2009 at 05:48:4

[PHP] User Account Management

2009-09-11 Thread Waynn Lue
Hello all, We're building out a system that allows for user account creation/password management, and we're hoping to use existing open source software so we don't have to reinvent the wheel. I know of Drupal, and Zend Framework (and maybe CodeIgniter?), but do people have specific preferences fo

Re: [PHP] APC - Upload progress problem. apc

2009-09-11 Thread Nathan Nobbe
On Fri, Sep 11, 2009 at 3:01 PM, tedd wrote: > At 2:17 PM -0400 9/11/09, Eddie Drapkin wrote: > >> On Fri, Sep 11, 2009 at 1:02 PM, Phred White >> wrote: >> >>> Hey folks.. >>> >>> > Anybody ever use APC to show upload progress? >> > > Nope, I choose not to complicate my life. :-) > > Instea

Re: [PHP] APC - Upload progress problem. apc

2009-09-11 Thread tedd
At 2:17 PM -0400 9/11/09, Eddie Drapkin wrote: On Fri, Sep 11, 2009 at 1:02 PM, Phred White wrote: Hey folks.. > Anybody ever use APC to show upload progress? Nope, I choose not to complicate my life. :-) Instead, I give the user one of these: http://webbytedd.com/bb/wait/ Besides, wh

Re: [PHP] Creating alphanumeric id for a table

2009-09-11 Thread Jo�o C�ndido de Souza Neto
I don´t know if it´d be the right way, but what about using trigger in this case? "aveev" escreveu na mensagem news:25391939.p...@talk.nabble.com... > > I want to create user generated id like this : > AAA0001 > AAA0002 > ... > AAA0009 > AAA0010 > > where the id consists of 3 alphanumeric ch

Re: [PHP] Creating alphanumeric id for a table

2009-09-11 Thread hack988 hack988
You can use mysql's autoincrement ,but you must do some php for special display,follow is my method. 1.create an int or smallint mysql col. 2.set it autoincrement. 3.insert some dates to database. 4.select dates and display with letter prefix. for example: 12->AAA0012,AAA1234, you can make an php

Re: [PHP] APC - Upload progress problem. apc

2009-09-11 Thread Eddie Drapkin
On Fri, Sep 11, 2009 at 1:02 PM, Phred White wrote: > Hey folks.. > > Anybody ever use APC to show upload progress? > > It sounds really cool, but apc_fetch always returns false a value for > uploads. I can apc_add something and fetch it, but not for uploads : ( > (set-up: php-apc 3.0.19, Apache2,

Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread Ben Dunlap
> Examine this: > > http://webbytedd.com/a/ajax-site/js/a.js > > Now, where can something go wrong? I suppose slave.php could fail with a 4xx or 5xx response. Then, most likely, the user would be left clicking on a link that does nothing. In an edge case the body of the error-response might includ

Re: [PHP] Hoping for a hand with a login script

2009-09-11 Thread Ben Dunlap
> Moreover, I'm using CI right now, and as far as I know, it does *no* > user authentication. I had to write my own routines, using their session > class to save the user data. Yeah, I realized that too (hence my last post to this thread) -- so, scratch CI for the present purpose. Ben -- PHP Ge

[PHP] APC - Upload progress problem. apc

2009-09-11 Thread Phred White
Hey folks.. Anybody ever use APC to show upload progress? It sounds really cool, but apc_fetch always returns false a value for uploads. I can apc_add something and fetch it, but not for uploads : ( (set-up: php-apc 3.0.19, Apache2, php 5.2.10, no suhosin patch) There is little info to googl

[PHP] Re: htaccess question

2009-09-11 Thread tedd
At 10:15 AM -0500 9/11/09, Shawn McKenzie wrote: .htaccess php_value auto_prepend_file "/path/to/auth.php" Thanks! -Shawn AND At 5:11 PM +0200 9/11/09, J DeBord wrote: > Here is a link to the manual. http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file *PHP_INI_PERDIR* Entr

RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread tedd
At 4:54 PM +0200 9/11/09, Andrea Giammarchi wrote: How do you debug Ajax calls? I am starting to think you do not do it, or your applications are extremely simple... do you transform only at the end the result? How do you debug the transformation if something go wrong? How do you test via clien

Re: [PHP] Reading files in PHP 5.3.0

2009-09-11 Thread Tommy Pham
-- On Fri, 9/11/09, Steve Brown wrote: > From: Steve Brown > Subject: Re: [PHP] Reading files in PHP 5.3.0 > To: php-general@lists.php.net > Date: Friday, September 11, 2009, 9:08 AM Perhaps you should add some error checking to see where it breaks > >> function > parseResponseHeaders($header_

RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread Andrea Giammarchi
Agreed, I have never said that, but I cannot even think about a modern website developed without browser tools such Firebug or others. That is why I was kinda surprised by zero reaction. Your feedback will be more than welcome, thanks. Regards Date: Fri, 11 Sep 2009 20:39:21 +0530 From: muxic

Re: [PHP] Reading files in PHP 5.3.0

2009-09-11 Thread Tommy Pham
--- On Fri, 9/11/09, Paul M Foster wrote: > From: Paul M Foster > Subject: Re: [PHP] Reading files in PHP 5.3.0 > To: php-general@lists.php.net > Date: Friday, September 11, 2009, 8:57 AM > On Fri, Sep 11, 2009 at 05:48:42AM > -0700, Tommy Pham wrote: > > > > > I just checked my 'Mail Options'

Re: [PHP] PHP configuration values

2009-09-11 Thread Andrew Ballard
On Fri, Sep 11, 2009 at 10:49 AM, Arno Kuhl wrote: > You're right, you can't change register_globals in script but you can query > it in script, which is what I was referring to. There aren't many settings > you can change in script, about the only useful one that we use is > max_execution_time. E

[PHP] Re: htaccess question

2009-09-11 Thread Shawn McKenzie
tedd wrote: > Hi gang: > > Is there a way I can use a htaccess directive to require a php script to > be "included" within each file contained within that directory? > > For example, let's say I have a directory with 100 scripts in it, but I > want each script within that directory to pass throug

Re: [PHP] htaccess question

2009-09-11 Thread J DeBord
On Fri, Sep 11, 2009 at 4:46 PM, tedd wrote: > Hi gang: > > Is there a way I can use a htaccess directive to require a php script to be > "included" within each file contained within that directory? > > For example, let's say I have a directory with 100 scripts in it, but I > want each script wit

Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread Bipin Upadhyay
I do use FirePHP and your project looks interesting to evaluate. Will check it out in a couple of days. It would be more interesting if they really are complimentary. I think people who use FireBug's console API would be able to appreciate FirePHP/formaldehyde more. However, I do NOT deny the

RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread Andrea Giammarchi
So nobody here debugs interaction and nobody uses Selenium for application tests ... fair enough. Would be nice to receive some response for those developers whose deal everyday with big/complex applications, 'cause here seems nobody i susing FirePHP or frameworks debuggers while numbers tell

Re: [PHP] htaccess question

2009-09-11 Thread Sudheer Satyanarayana
Is there a way I can use a htaccess directive to require a php script to be "included" within each file contained within that directory? For example, let's say I have a directory with 100 scripts in it, but I want each script within that directory to pass through an authorization script befo

RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread Andrea Giammarchi
How do you debug Ajax calls? I am starting to think you do not do it, or your applications are extremely simple... do you transform only at the end the result? How do you debug the transformation if something go wrong? How do you test via client if something goes wrong? You simply do not care,

RE: [PHP] PHP configuration values

2009-09-11 Thread Arno Kuhl
On Fri, Sep 11, 2009 at 3:06 AM, Arno Kuhl wrote: > I'm having some problems with the way my service provider is > implementing FastCGI. My tests show that local configuration values > are no longer used, even though those are the values reported by php > when the script queries a setting (e.g.

[PHP] htaccess question

2009-09-11 Thread tedd
Hi gang: Is there a way I can use a htaccess directive to require a php script to be "included" within each file contained within that directory? For example, let's say I have a directory with 100 scripts in it, but I want each script within that directory to pass through an authorization sc

RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread Ashley Sheridan
On Fri, 2009-09-11 at 10:35 -0400, tedd wrote: > At 3:27 PM +0200 9/11/09, Andrea Giammarchi wrote: > >That's a finished production site ... how did you debug during its > >development? 'Cause Formaldehyde is for development, not for > >production ... I guess you have implented your own error >

RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread tedd
At 3:27 PM +0200 9/11/09, Andrea Giammarchi wrote: That's a finished production site ... how did you debug during its development? 'Cause Formaldehyde is for development, not for production ... I guess you have implented your own error manager/debugger, right? What's to debug? The site -- h

Re: [PHP] Reading files in PHP 5.3.0

2009-09-11 Thread Steve Brown
>> function parseResponseHeaders($header_file) { >>     $http_found = $error_found = false; >>     $http_reponse = $error_message = NULL; >> >>     $response = array(); >>     $response['ResponseCode'] = NULL; >>     $response['ErrorMessage'] = NULL; >> >>     if (!is_file($header_file) || >> !is_r

Re: [PHP] Creating alphanumeric id for a table

2009-09-11 Thread Ralph Deffke
I agree that this question could be just "how to create an unique ID with leading letters like 'AAA'. At that point I want to mention that a timestamp does garanty a unique number at almost 100% formated with the given samples in the other posts will do the job. "tedd" wrote in message news:p062

Re: [PHP] Reading files in PHP 5.3.0

2009-09-11 Thread Andrew Ballard
On Fri, Sep 11, 2009 at 8:15 AM, Ashley Sheridan wrote: > On Fri, 2009-09-11 at 08:04 -0400, tedd wrote: >> At 5:06 PM -0700 9/10/09, Tommy Pham wrote: >> >  > So did anything change in PHP5.3.0 that would preclude the > code >> >below > from working?  Am I going crazy?  Or did Apple > f...@# >> >

Re: [PHP] Reading files in PHP 5.3.0

2009-09-11 Thread Paul M Foster
On Fri, Sep 11, 2009 at 05:48:42AM -0700, Tommy Pham wrote: > > I just checked my 'Mail Options' again. It's always been 'compose as text'. > But I can't guaranteed that Yahoo actually does it. Been having problems > with Yahoo lately (both mail and Yahoo hosting of www.php.net). Maybe I >

Re: [PHP] PHP configuration values

2009-09-11 Thread Andrew Ballard
On Fri, Sep 11, 2009 at 3:06 AM, Arno Kuhl wrote: > I'm having some problems with the way my service provider is implementing > FastCGI. My tests show that local configuration values are no longer used, > even though those are the values reported by php when the script queries a > setting (e.g. re

RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread Andrea Giammarchi
That's a finished production site ... how did you debug during its development? 'Cause Formaldehyde is for development, not for production ... I guess you have implented your own error manager/debugger, right? Well, with Formaldehyde you do not need to implement anything. Moreover, ASAIK, Form

Re: [PHP] Creating alphanumeric id for a table

2009-09-11 Thread tedd
At 3:17 PM -0700 9/10/09, aveev wrote: I want to create user generated id like this : AAA0001 AAA0002 ... AAA0009 AAA0010 where the id consists of 3 alphanumeric characters and 4 numerical digits in the beginning (for numerical digit, it can grow like this AAA10001). I try to use php script to g

Re: [PHP] Reading files in PHP 5.3.0

2009-09-11 Thread Tommy Pham
--- On Fri, 9/11/09, Ashley Sheridan wrote: > From: Ashley Sheridan > Subject: Re: [PHP] Reading files in PHP 5.3.0 > To: "tedd" > Cc: "Tommy Pham" , php-general@lists.php.net > Date: Friday, September 11, 2009, 7:15 AM > On Fri, 2009-09-11 at 08:04 -0400, > tedd wrote: > > At 5:06 PM -0700 9/1

Re: [PHP] Reading files in PHP 5.3.0

2009-09-11 Thread tedd
At 1:15 PM +0100 9/11/09, Ashley Sheridan wrote: On Fri, 2009-09-11 at 08:04 -0400, tedd wrote: At 5:06 PM -0700 9/10/09, Tommy Pham wrote: > > So did anything change in PHP5.3.0 that would preclude the > code >below > from working? Am I going crazy? Or did Apple > f...@# >something up in

[PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread tedd
At 11:35 PM +0200 9/10/09, Andrea Giammarchi wrote: Being something nobody thought before I was expecting some comment ... zero Ajax developers here? Andrea: No, I develop in ajax. Here's one of my demos: http://webbytedd.com/a/ajax-site/ Please note that the above site can be expanded/edite

Re: [PHP] Reading files in PHP 5.3.0

2009-09-11 Thread Ashley Sheridan
On Fri, 2009-09-11 at 08:04 -0400, tedd wrote: > At 5:06 PM -0700 9/10/09, Tommy Pham wrote: > > > So did anything change in PHP5.3.0 that would preclude the > code > >below > from working? Am I going crazy? Or did Apple > f...@# > >something up in > this release? > > Thanks, > Steve > > BEGIN

Re: [PHP] Creating alphanumeric id for a table

2009-09-11 Thread Phpster
On Sep 11, 2009, at 3:50 AM, Ashley Sheridan wrote: On Fri, 2009-09-11 at 00:19 -0400, Phpster wrote: Note that this approach has risks around race conditions. Anytime you have a construct for the id you run the risk of having it create duplicate ids. You will need to handle that. Bast

Re: [PHP] Reading files in PHP 5.3.0

2009-09-11 Thread tedd
At 5:06 PM -0700 9/10/09, Tommy Pham wrote: > So did anything change in PHP5.3.0 that would preclude the > code below > from working? Am I going crazy? Or did Apple > f...@# something up in > this release? > > Thanks, > Steve > > BEGIN CODE -snip- Does anyone else see every line above endi

Re: [PHP] String scrambling

2009-09-11 Thread Ashley Sheridan
On Fri, 2009-09-11 at 11:03 +0100, Tom Chubb wrote: > !niBgo > > > /* > $str = "Bingo!"; > str_shuffle($str); > */ > > > > :) No, that won't work at all, it's in comments ;) Thanks, Ash http://www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

Re: [PHP] String scrambling

2009-09-11 Thread Tom Chubb
!niBgo /* $str = "Bingo!"; str_shuffle($str); */ :)

Re: [PHP] Creating alphanumeric id for a table

2009-09-11 Thread Marcus Gnaß
aveev wrote: > function generate_id($num) { > $start_dig = 4; > $num_dig = strlen($num); > > $id = $num; > if($num_dig <= $start_dig) { > $num_zero = $start_dig - $num_dig; > > for($i=0;$i< $num_zero; $i++) { >

Re: [PHP] Creating alphanumeric id for a table

2009-09-11 Thread Ashley Sheridan
On Fri, 2009-09-11 at 00:19 -0400, Phpster wrote: > Note that this approach has risks around race conditions. Anytime you > have a construct for the id you run the risk of having it create > duplicate ids. You will need to handle that. > > Bastien > > Sent from my iPod > > On Sep 10, 2009, a

[PHP] PHP configuration values

2009-09-11 Thread Arno Kuhl
I'm having some problems with the way my service provider is implementing FastCGI. My tests show that local configuration values are no longer used, even though those are the values reported by php when the script queries a setting (e.g. register_globals). In fact all settings done by script or in