Re: [PHP] Exposing PHP/errors on production vs. dev

2008-08-01 Thread Robert Cummings
On Fri, 2008-08-01 at 17:30 -0700, mike wrote: > Does this look right? > > Obviously you still want to know about production errors, so I'd like > to log them. > > Development I want to see -everything- and I want it to display on the > page. The assumption is production won't have any notices as

[PHP] Exposing PHP/errors on production vs. dev

2008-08-01 Thread mike
Does this look right? Obviously you still want to know about production errors, so I'd like to log them. Development I want to see -everything- and I want it to display on the page. The assumption is production won't have any notices as the code should be clean and our higher priority are fixing

Re: [PHP] remembering where the user is on the page??

2008-08-01 Thread tedd
At 4:24 PM -0400 8/1/08, Rod Clay wrote: I'm creating a website in php and I've noticed that many websites seem to "remember where the user is on the page," so that, for example, the user can click on a link and go to another page, but, when the user comes back to the original page, it is displ

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-08-01 Thread tedd
At 3:41 PM -0400 8/1/08, Robert Cummings wrote: *lol* Yeah, I hate how HEREDOC ruins my nice formatting too. Cheers, Rob. Yeah, me too. I just slam everything full-left and then I know it's a HEREDOC. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthston

Re: [PHP] remembering where the user is on the page??

2008-08-01 Thread Per Jessen
Rod Clay wrote: > I'm creating a website in php and I've noticed that many websites seem > to "remember where the user is on the page," so that, for example, the > user can click on a link and go to another page, but, when the user > comes back to the original page, it is displayed so that the use

Re: [PHP] remembering where the user is on the page??

2008-08-01 Thread Jim Lucas
Rod Clay wrote: I'm creating a website in php and I've noticed that many websites seem to "remember where the user is on the page," so that, for example, the user can click on a link and go to another page, but, when the user comes back to the original page, it is displayed so that the user is

[PHP] remembering where the user is on the page??

2008-08-01 Thread Rod Clay
I'm creating a website in php and I've noticed that many websites seem to "remember where the user is on the page," so that, for example, the user can click on a link and go to another page, but, when the user comes back to the original page, it is displayed so that the user is looking at the s

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-08-01 Thread Robert Cummings
On Fri, 2008-08-01 at 15:36 -0400, Eric Butera wrote: > On Fri, Aug 1, 2008 at 4:18 AM, Peter Ford <[EMAIL PROTECTED]> wrote: > > > > Now *that's* a good reason... anything that means fewer \'s or \"s. > > I often go for HEREDOC syntax if the backslashes start taking over - > > readability is much

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-08-01 Thread Eric Butera
On Fri, Aug 1, 2008 at 4:18 AM, Peter Ford <[EMAIL PROTECTED]> wrote: > > Now *that's* a good reason... anything that means fewer \'s or \"s. > I often go for HEREDOC syntax if the backslashes start taking over - > readability is much more important to me than nanoseconds of performance. > > There'

RE: [PHP] Internationalisation and MB strings

2008-08-01 Thread Boyd, Todd M.
> -Original Message- > From: Andrew Ballard [mailto:[EMAIL PROTECTED] > Sent: Friday, August 01, 2008 2:06 PM > To: PHP General list > Subject: Re: [PHP] Internationalisation and MB strings ---8<--- > > I didn't see the multiplication by 1000 and the above numbers don't > show > > any tra

Re: [PHP] Internationalisation and MB strings

2008-08-01 Thread Andrew Ballard
On Fri, Aug 1, 2008 at 2:30 PM, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Fri, 2008-08-01 at 13:24 -0400, Andrew Ballard wrote: >> On Fri, Aug 1, 2008 at 12:34 PM, Robert Cummings <[EMAIL PROTECTED]> wrote: >> > On Fri, 2008-08-01 at 11:12 -0500, Boyd, Todd M. wrote: >> >> > -Original Mes

Re: [PHP] Internationalisation and MB strings

2008-08-01 Thread Robert Cummings
On Fri, 2008-08-01 at 13:24 -0400, Andrew Ballard wrote: > On Fri, Aug 1, 2008 at 12:34 PM, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Fri, 2008-08-01 at 11:12 -0500, Boyd, Todd M. wrote: > >> > -Original Message- > >> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

Re: [PHP] Internationalisation and MB strings

2008-08-01 Thread Andrew Ballard
On Fri, Aug 1, 2008 at 12:34 PM, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Fri, 2008-08-01 at 11:12 -0500, Boyd, Todd M. wrote: >> > -Original Message- >> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yeti >> > Sent: Friday, August 01, 2008 10:58 AM >> > To: Andrew

Re: [PHP] Writing my own web based user forum

2008-08-01 Thread Eric Butera
On Fri, Aug 1, 2008 at 9:27 AM, Jason Pruim <[EMAIL PROTECTED]> wrote: > The problem with that is I don't have any code to show since I'm going to be > writing it :) > > Basically, it's a site where people can upload pictures to compare with > other's (Non-porn) so I need to write an authentication

RE: [PHP] Internationalisation and MB strings

2008-08-01 Thread Robert Cummings
On Fri, 2008-08-01 at 11:12 -0500, Boyd, Todd M. wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yeti > > Sent: Friday, August 01, 2008 10:58 AM > > To: Andrew Ballard > > Cc: PHP General list > > Subject: Re: [PHP] Internationalisation and M

RE: [PHP] Internationalisation and MB strings

2008-08-01 Thread Boyd, Todd M.
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yeti > Sent: Friday, August 01, 2008 10:58 AM > To: Andrew Ballard > Cc: PHP General list > Subject: Re: [PHP] Internationalisation and MB strings > > Oh right. Doing 1 measurement only is not even worth

Re: [PHP] Internationalisation and MB strings

2008-08-01 Thread Bernhard Kohl
/* snippetty */ foreach ($mb_array as $mb_string) { strlen('œŸŒ‡Ņ'); } /* snip */ Oh, this is supposed to be a *strlen($mb_string)*; of course >

Re: [PHP] Internationalisation and MB strings

2008-08-01 Thread Yeti
Oh right. Doing 1 measurement only is not even worth a theory. Well, I'm wondering how much PHP can speed that result up, since we are calling the same function with the same parameter 1 times. Wouldn't it be even more realistic if we called it with changing strings? MB_STRLEN took : '.(($e_t

Re: [PHP] Internationalisation and MB strings

2008-08-01 Thread Andrew Ballard
On Fri, Aug 1, 2008 at 9:50 AM, Yeti <[EMAIL PROTECTED]> wrote: > *# Hello Community > # Internationalisation, a topic discussed more than enough and YES, I am > looking forward to PHP6. > # But in reality I still have to develop for PHP4 and that's where the dog > is burried ^^ > # We have a cust

[PHP] Internationalisation and MB strings

2008-08-01 Thread Yeti
2048) { /* snip */ } // do something } /* snip */ // do something *#this works fine as long as the user only submits single byte charachters, but with UTF-8 the whole thing changes ..* ?> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml";> test You subm

Re: [PHP] Writing my own web based user forum

2008-08-01 Thread Jason Pruim
The problem with that is I don't have any code to show since I'm going to be writing it :) Basically, it's a site where people can upload pictures to compare with other's (Non-porn) so I need to write an authentication system for that, but that is taken care of... Another aspect of the site

Re: [PHP] Writing my own web based user forum

2008-08-01 Thread Yeti
If I fully understood the question you were asking then no. Since it seems you are using a database there is no need to serialize. You can write a simple function that fetches user data from a DB query and then creates the object. If you are going to use sessions you will have to do that only when

Re: [PHP] Writing my own web based user forum

2008-08-01 Thread Jason Pruim
So are you suggesting, create the users in the forum, and then just serialize/unserialize when needed to store the info so when they go to the picture upload side it queries the forum database? On Aug 1, 2008, at 8:07 AM, Bernhard Kohl wrote: pw = md5($pw); $this->username = $name; retur

Re: [PHP] Writing my own web based user forum

2008-08-01 Thread Bernhard Kohl
pw = md5($pw); $this->username = $name; return true; } } $new_user = new user(); if ($new_user->set_user('Joe', 'swordfish') { $fp =@ fopen('/some_dir/users.txt', 'a'); @fwrite($fp, serialize($new_user)); @fclose($fp); } # the next time you need it simple read it in again with unserialize

[PHP] Writing my own web based user forum

2008-08-01 Thread Jason Pruim
Hi Everyone, I am looking at writing my own web based user forum somewhat for my own knowledge, and because I know that I don't know enough to be able to tie in authentication so they only need 1 user account. Does anyone have any examples short of downloading something like phpbb and tea

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-08-01 Thread Peter Ford
Eric Butera wrote: On Wed, Jul 30, 2008 at 6:51 PM, Stephen <[EMAIL PROTECTED]> wrote: I have traditionally used double quotes going back to my PASCAL days. I see many PHP examples using single quotes, and I began to adopt that convention. Even updating existing code. And I broke some stuff t

Re: [PHP] HTTP PUT for file uploads

2008-08-01 Thread mike
On 8/1/08, Micah Gersten <[EMAIL PROTECTED]> wrote: > Is this a repetitive thing your clients will do many times? I recently > created a backup solution using ssh keys and the pecl ssh extension to > automate backups. Then a cronjob sorts the files on the server. It's a > lot more secure than a

Re: [PHP] HTTP PUT for file uploads

2008-08-01 Thread Micah Gersten
Is this a repetitive thing your clients will do many times? I recently created a backup solution using ssh keys and the pecl ssh extension to automate backups. Then a cronjob sorts the files on the server. It's a lot more secure than allowing PUTs. Thank you, Micah Gersten onShore Networks Inte

[PHP] PHP 5.3.0alpha1

2008-08-01 Thread Lukas Kahwe Smith
Hello! Johannes has packed PHP 5.3.0alpha1 yesterday evening, which you can find here: http://downloads.php.net/johannes/ Please test it carefully, and report any bugs in the bug system, but only if you have a short reproducable test case. The final release is expected sometime between mi

[PHP] HTTP PUT for file uploads

2008-08-01 Thread mike
It appears that PHP can support the PUT method using php://stdin and appropriately configuring the webserver to accept it. My company needs a file upload solution that will support large file uploads (2GB limit is optional - if we have to tell them less than 2GB that's fine) that will keep re-tryi