Re: [Fwd: [PHP] Sessions in databases]

2009-10-06 Thread Sam Stelfox
If you are distributing your application over multiple servers, using a database for session tracking allows a user to continue there session regardless of which server their request bounces too. It prevents the need for 'sticky' network connections which time out anyways. Databases can make sc

Re: [PHP] how to strip empty lines out of a txt using preg_replace()

2009-09-04 Thread Sam Stelfox
The following snippet is untested and using Ash's regex (it is accurate \s matches any white space). $content is what is getting stripped of the new lines and $filtered is the cleansed output. See if that does the trick for you. $lines = str_split(PHP_EOL, $content); $filtered = ''; foreach ($

Re: [PHP] What type of barcode used for document management system ?

2009-09-04 Thread Sam Stelfox
As a matter of fact... For a while I was using a barcode generator to test out inventory system before getting them professionally made. I personally chose to go with Interleaved 2 of 5 as our barcode scanner was able to read them accurately and it was the same format as our campus ID cards. Th

Re: [PHP] Re: Dan Brown

2009-08-04 Thread Sam Stelfox
DVD's. Cheers, tedd I don't know how successful it would be for using real backups by I personally use it to backup my private keys. It has held up to a coffee ring on the page so I imagine if it's protected by a metal filing cabinet it would be safe enough. Course if there was

Re: [PHP] Re: Dan Brown

2009-08-03 Thread Sam Stelfox
tedd wrote: Everything is backed up at least three fold. I am considering online backup and waiting for the cost to go down. You should add paper backups to that list! http://ollydbg.de/Paperbak/ Sam Stelfox -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] EXEC and SYSTEM delay

2009-07-23 Thread Sam Stelfox
Well if the server your running on is linux based (and I haven't tried this) you could try adding a nohup and background the task for example rather than doing: system('updatedb'); try system('nohup updatedb &'); It should background the task and let it continue running even when the php sc

Re: [PHP] Zend Framework...where to start? -- don't.

2009-01-15 Thread Sam Stelfox
Daevid Vincent wrote: > > The pages are significantly slower than straight PHP by orders of > magnitude: http://paul-m-jones.com/?p=315 > http://www.codinghorror.com/blog/archives/001198.html I know this blog isn't specifically about PHP but he makes a good general point that can be applied to thi

Re: [PHP] Change tracking

2008-10-31 Thread Sam Stelfox
I've always used a version field (just an incrementing id) rather than an effective date field. I can see the benefits of being able to look back and see when the changes were made and if done correctly make it so things don't change until a certain date. Hmmm nifty. Stephen wrote: > -- On Fri, 10

Re: [PHP] Copy Function Errors

2008-07-17 Thread Sam Stelfox
You need to test using regular FTP, SFTP goes over SSH, while the PHP script your trying to use is making use of regular old FTP. Make sure that the linux machine has the ports open for FTP and that you have an FTP server running on it (SSH is not one). Wei, Alice J. wrote: > It sounds to me like

Re: [PHP] Copy Function Errors

2008-07-17 Thread Sam Stelfox
It sounds to me like your problem is now about the authentication. By default most linux distributions do not give apache a password. I personally think using apache would be a bad idea. How about creating a user on the linux box your trying to put the files on to make it's primary group apache (ma