Re: [PHP] PHP session replication

2011-03-18 Thread Stuart Dallas
han a few hundred bytes that is specific and unique to that session storage? What are the use cases for server-side session storage because it seems like I'm missing something? -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ > BR/Torsten > > > "tedd" schrieb: >

Re: [PHP] PHP session replication

2011-03-18 Thread Stuart Dallas
On Friday, 18 March 2011 at 17:14, Torsten Rosenberger wrote: > "Stuart Dallas" schrieb: > > > On Friday, 18 March 2011 at 16:19, Torsten Rosenberger wrote: > > Hello > > > > > > First you need to decide which type of cluster you choose. If you us

Re: [PHP] PHP session replication

2011-03-18 Thread Stuart Dallas
On Friday, 18 March 2011 at 17:36, Nathan Nobbe wrote: On Fri, Mar 18, 2011 at 11:19 AM, Stuart Dallas wrote: > > On Friday, 18 March 2011 at 17:14, Torsten Rosenberger wrote: > > > > I'm curious to know what people are storing in their sessions. Is there > > &

Re: [PHP] PHP session replication

2011-03-18 Thread Stuart Dallas
On Friday, 18 March 2011 at 19:25, Torsten Rosenberger wrote: If i am right then you have 1.44KB per request ? > I've never done the analysis, but it's an AJAX-heavy site so that could well be the average. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ > "St

Re: [PHP] PHP session replication

2011-03-18 Thread Stuart Dallas
On Friday, 18 March 2011 at 19:14, tedd wrote: At 3:53 PM + 3/18/11, Stuart Dallas wrote: > > The cookies I use to replace sessions are session-based cookies and > > last no longer than a traditional PHP session. The key is to provide > > a lightweight method of ensur

Re: [PHP] PHP session replication

2011-03-18 Thread Stuart Dallas
. I don't know if there are advanced books or online resources that cover using cookies, but how many people who learn PHP bother to go through learning the advanced stuff when they can do everything they need with the basics. Very few developers ever hit the scalability issues we're

Re: [PHP] PHP session replication

2011-03-18 Thread Stuart Dallas
On Friday, 18 March 2011 at 19:56, tedd wrote: At 7:26 PM + 3/18/11, Stuart Dallas wrote: > > On Friday, 18 March 2011 at 19:14, tedd wrote: > > At 3:53 PM +0000 3/18/11, Stuart Dallas wrote: > > > > The cookies I use to replace sessions are session-based cookies an

Re: [PHP] PHP session replication

2011-03-18 Thread Stuart Dallas
On Friday, 18 March 2011 at 20:18, tedd wrote: At 8:03 PM + 3/18/11, Stuart Dallas wrote: > > On Friday, 18 March 2011 at 19:56, tedd wrote: > > At 7:26 PM +0000 3/18/11, Stuart Dallas wrote: > > > > On Friday, 18 March 2011 at 19:14, tedd wrote: > > > > At

Re: [PHP] Problem with PHP 5.3.3 under Debian/Squeeze

2011-03-20 Thread Stuart Dallas
cludes/00_main.inc' ] > [0248] /* DISPLAY admin ***** */ > [0249] if ( $_POST['what'] == 'admin' ) { > [0250] > [0251] function do_auth() { > > [0283] /* *** FIX CSS */ > [0284] if ($_GET['csslink'] != '') { > [0285] if ($_GET['csslink'] == 'foo') { > > [0297] /* SET and UNSET COOKIES * */ > [0298] if ( $_GET['cookie'] != '' ) { > [0299] if ($_GET['cookie'] == 'set') { > > - > > I am something missing here... Use isset or empty to check for the presence of a GET or POST variable before attempting to use it. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: echo?

2011-03-23 Thread Stuart Dallas
http://php.net/manual/en/language.types.string.php -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ On Wednesday, 23 March 2011 at 12:39, Jim Giner wrote: > Very Interesting - '\n' doesn't work, but "\n" does work. > "Steve Staples" wrote in

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

2011-03-31 Thread Stuart Dallas
set($array[$key]) ? $array[$key] : $default); } if (ifsetor($arrayA, 'id') == ifsetor($arrayB, 'id') || ifsetor($arrayC, 'id') == ifsetor($arrayB, 'id'))... If you need to avoid a match if neither $arrayA nor $arrayB have an id you simply pass a different

Re: [PHP] neubie seeking answers

2011-03-31 Thread Stuart Dallas
FILE__)); -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- 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 Stuart Dallas
, > > > Ash > > > http://www.ashleysheridan.co.uk > > > > > > 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. > > > > Ethan > > > > > > MySQL 5.1 PHP 5.3.3-6 Linux [Debian (sid)] > > > I had this problem quite a lot, so now I use sub-arrays for each site. > For example: > > $_SESSION['personal_website'] = session data; > $_SESSION['friends_site'] = session data; > $_SESSION['shop_down_the_road'] = session data; > > Then you need only unset the specific array for that site, rather than > the whole session. Another option is to use http://php.net/session-set-cookie-params to set the path for which the session cookie is valid. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] neubie seeking answers

2011-04-01 Thread Stuart Dallas
On Friday, 1 April 2011 at 03:31, Kirk Bailey wrote: PERFECT SIMPLE SOLUTION. THANK YOU! As Richard noted there is a constant called __DIR__ which is equivalent to dirname(__FILE__) so basename(__DIR__) will give you what you want and saves a few cycles. -Stuart -- Stuart Dallas 3ft9 Ltd

Re: [PHP] newbie - function is undefined

2011-04-01 Thread Stuart Dallas
I think given the nature and level of the original question, talking about the browser cache is only likely to confuse the poor chap. Jim: Ignore the browser cache for now and focus on learning the difference between javascript and PHP and which one should be used in what situations. -Stuart

Re: [PHP] How to check if remote machines are running using PHP and Eclipse-Require Urgent Help

2011-04-01 Thread Stuart Dallas
pt? I really don't understand most management types! -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] File locking with PHP functions

2011-04-04 Thread Stuart Dallas
from writes until finished? > Does it lock the file from reads as well? > > All this is in the context of a Linux/Unix web server. No, fopen does not lock the file. Check out http://php.net/flock but be sure to read all of that page because there are some gotchas with using it. -Stuart --

Re: [PHP] randomly random

2011-04-05 Thread Stuart Dallas
p; filesize($filename) > 0 ) > echo array_rand(file($filename), 1); > > ?> This method will eat memory unless you have a very small file. Personally I would use filesize to get the length of the file, fopen it, fseek to a random position, then track back to a newline and use f

Re: [PHP] Silly question

2011-04-11 Thread Stuart Dallas
On Monday, 11 April 2011 at 02:12, Curtis Maurand wrote: nevermind. There is a function: fgetcsv(); Ewww! http://blog.ericlamb.net/2010/01/parse-apache-log-files-with-php/ -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ > Curtis Maurand wrote: > > > > > > Hello,

Re: [PHP] Silly question

2011-04-11 Thread Stuart Dallas
On Monday, 11 April 2011 at 13:17, Curtis Maurand wrote: Stuart Dallas wrote: > > On Monday, 11 April 2011 at 02:12, Curtis Maurand wrote: > > nevermind. There is a function: fgetcsv(); > > > > Ewww! > > Say what you want, it works. Your solution is way more elegant

Re: [PHP] a shortcut to set variable

2011-04-12 Thread Stuart Dallas
On Tuesday, 12 April 2011 at 10:36, Joe Francis wrote: eh, I just want to get a shortcut like > > $id = isset($_GET['id']) ? $_GET['id'] : 0; > > > BTW, I'm using PHP5.3+, thanks bros. http://stut.net/2011/04/12/php-snippet-array-element-access/ -Stuart

Re: [PHP] a shortcut to set variable

2011-04-12 Thread Stuart Dallas
On Tuesday, 12 April 2011 at 11:52, tedd wrote: At 11:06 AM +0100 4/12/11, Stuart Dallas wrote: > > On Tuesday, 12 April 2011 at 10:36, Joe Francis wrote: > > eh, I just want to get a shortcut like > > > > > > $id = isset($_GET['id']) ? $_GET['id'

Re: [PHP] $_POST vars

2011-04-13 Thread Stuart Dallas
7;s available everywhere (i.e. it's a superglobal). There is nothing stopping you modifying that array from anywhere within your code. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_POST vars

2011-04-13 Thread Stuart Dallas
o everyone can benefit from the discussion. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_POST vars

2011-04-13 Thread Stuart Dallas
depending upon whether the data you're dealing with has come from within or without your code I think you have bigger style issues to address. All hail the superglobals! (sarcasm for those not familiar) -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_POST vars

2011-04-13 Thread Stuart Dallas
On Wednesday, 13 April 2011 at 19:12, Jim Giner wrote: When you say "assign that array to $_POST" do you mean > > $_POST = $qrslt; > > Not sure about this "assigning an array" thing. Yup, nothing more complicated than that. -Stuart -- Stuart Dallas 3ft9 Ltd ht

Re: [PHP] $_POST vars

2011-04-13 Thread Stuart Dallas
On Wednesday, 13 April 2011 at 19:15, Nathan Nobbe wrote: On Wed, Apr 13, 2011 at 12:04 PM, Stuart Dallas wrote: > > On Wednesday, 13 April 2011 at 18:55, Nathan Nobbe wrote: > > On Wed, Apr 13, 2011 at 11:49 AM, Jim Giner > > wrote: > > > > > > > Can o

Re: [PHP] $_POST vars

2011-04-13 Thread Stuart Dallas
On Wednesday, 13 April 2011 at 19:47, Nathan Nobbe wrote: > On Wed, Apr 13, 2011 at 12:34 PM, Stuart Dallas wrote: > > On Wednesday, 13 April 2011 at 19:15, Nathan Nobbe wrote: > > On Wed, Apr 13, 2011 at 12:04 PM, Stuart Dallas wrote: > > > > On Wednesday, 13 April

Re: [PHP] $_POST vars

2011-04-14 Thread Stuart Dallas
On Thursday, 14 April 2011 at 07:11, Nathan Nobbe wrote: On Wed, Apr 13, 2011 at 3:30 PM, Stuart Dallas wrote: > > On Wednesday, 13 April 2011 at 19:47, Nathan Nobbe wrote: > > I never make any assumptions about the source of any data when I'm > > developing software

Re: [PHP] $_POST vars

2011-04-14 Thread Stuart Dallas
On Thursday, 14 April 2011 at 23:08, Nathan Nobbe wrote: On Thu, Apr 14, 2011 at 2:53 AM, Stuart Dallas wrote: > > On Thursday, 14 April 2011 at 07:11, Nathan Nobbe wrote: > > On Wed, Apr 13, 2011 at 3:30 PM, Stuart Dallas wrote: > > > > On Wednesday, 13 April 2011 at 1

Re: [PHP] JavaScript Injection ???

2011-04-18 Thread Stuart Dallas
ill still not > produce a javascript alert. Looks like some form of variable tainting. There was a proposal and a patch a while back, but all it did was emit a warning. I've looked at the PHP5 changelog to see if this was added but can't find any reference to it being merged in. This is not a browser change because it's happening before the browser sees the response (try it with curl). -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] usort within a class

2011-04-18 Thread Stuart Dallas
> > I know it's probably something very simple, but for the life of me I > can't find what I'm missing. > > I think in part it's that the normal way I know of calling that sort > function from within the class is $this->content_score_sort(), but that

Re: [PHP] usort within a class

2011-04-18 Thread Stuart Dallas
On Monday, 18 April 2011 at 21:52, Ashley Sheridan wrote: On Mon, 2011-04-18 at 21:41 +0100, Stuart Dallas wrote: > > On Monday, 18 April 2011 at 21:27, Ashley Sheridan wrote: > > I'm trying to get the usort function working inside of a class, but am > > > having s

Re: [PHP] str_replace

2011-04-24 Thread Stuart Dallas
ller , rand(1,98) , 1 ); > > Thanks for your help. I would probably go with http://php.net/preg_replace_callback -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] trouble using "is_file()"

2011-04-24 Thread Stuart Dallas
running on an XP machine with php 5.2 Are you expecting it to check that the file exists on the client or on the server? Remember that PHP runs on the server and cannot access the client's file system. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] trouble using "is_file()"

2011-04-24 Thread Stuart Dallas
.file-upload.post-method.php -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] trouble using "is_file()"

2011-04-24 Thread Stuart Dallas
otos I really don't think you need to worry about it. Code it defensively, assume things will go wrong, and it will work as well for you as it does for them. In the grand scheme of things photo files are relatively small. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP Ge

Re: [PHP] trouble using "is_file()"

2011-04-24 Thread Stuart Dallas
an option was on a photo archiving site which was expecting you to upload a very large number of RAW files at a time - we're talking hundreds of megs. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ On Monday, 25 April 2011 at 01:32, Jim Giner wrote: > Well, I'll take you

Re: [PHP] gd Graphics Library Question (EXIF)

2011-04-29 Thread Stuart Dallas
ng gd utilities to resize and create the > new JPEG image files: > > imagecreatefromjpeg > imagesx > imagesy > imagercreatetruecolor > imagecopyresized > imagejpeg This is a known shortcoming of the GD library. You won't have that issue with ImageMagick: http://php.net/book.imagick

Re: [PHP] Why Constants could Not be Array?

2011-04-30 Thread Stuart Dallas
s not evaluations because they're initialised during parsing not execution. Arrays are evaluations even if they only contain literal values. It could be done, but it would require a fundamental change to the engine and the benefit-cost calculation just doesn't add up. -Stuart -- Stu

Re: [PHP] Wiki formatting class or something similar

2011-04-30 Thread Stuart Dallas
ion (and supports tables which markdown does not): http://textile.thresholdstate.com/ -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] gd Graphics Library Question (EXIF)

2011-04-30 Thread Stuart Dallas
it to be compatible with your host and then upload it) but it's highly unlikely they'll have the dl function enabled. Your best bet is to ask them to add it to their environment. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ > On 4/29/2011 9:26 AM, Stuart Dallas wrote: &g

Re: [PHP] What's faster using if else or arrays?

2011-04-30 Thread Stuart Dallas
even just > > > THINKING > > > about using a GOTO! :P > > > > > > (yes, there are still *SOME* (and i use that loosely) benefits to the > > > GOTO command, but in reality, no.) > > People, people, don't you realize that break IS a goto?? It's just one > of limited scope. By that logic, so is a function call. Hey, hey... what do you call a group of gotos? . . . A CLASS!! Bwhahahahahahahahaha. Not! Happy Saturday all :) -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Why Constants could Not be Array?

2011-04-30 Thread Stuart Dallas
kype: Francophile > My blog: http://oire.org/menelion (mostly in Russian) > Twitter: http://twitter.com/m_elensule > Facebook: http://facebook.com/menelion That's not a class constant. That type of constant is not defined until that line is executed (so an array is a valid value), where

Re: [PHP] passing control to a separate script

2011-05-01 Thread Stuart Dallas
p --- echo 'do something else'; // pass control back to one.php --- If that's correct then simply include two.php from one.php, like so... one.php --- echo 'do one thing'; include 'two.php'; echo 'do another thing'; --- If not then I've misunderstood w

Re: [PHP] passing control to a separate script

2011-05-01 Thread Stuart Dallas
e execution of a web-based PHP script and wait for a user action. In what you've given us above I'm unclear on how script1 and script2 interact with each other. Can you elaborate? -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] passing control to a separate script

2011-05-02 Thread Stuart Dallas
ded, are you calling a function in script 2, or is the user clicking on a link / submitting a form that runs script 2? To get "script 1 to begin" from script 2 based on a certain path... script2.php --- if ($path1) { // do stuff here include('script1.php'); exit; } // other

Re: [PHP] passing control to a separate script

2011-05-02 Thread Stuart Dallas
htting the initial script again). If either of those are your goal then it would have been helpful for you to say so. If not, why are you so against using includes? -Stuart Sent from my leaf blower On 2 May 2011, at 13:55, "Jim Giner" wrote: > Sorry - I responded directly to the

Re: [PHP] passing control to a separate script

2011-05-02 Thread Stuart Dallas
On Monday, 2 May 2011 at 17:23, Tim Streater wrote: On 02 May 2011 at 15:40, tedd wrote: > > > > At 2:48 PM +0100 5/2/11, Stuart Dallas wrote: > > > Sent from my leaf blower > > > > Leaf blower? > > > > I suppose some day soon, we will send stuff f

Re: [PHP] Re: php to store data

2011-05-03 Thread Stuart Dallas
lution - and a very good one, actually. > > > > br, > > > > flj > > > Paying for mysql (non enterprise) just seems wrong... You're not paying for MySQL, you're paying for the costs of hosting it, which are not insignificant. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Parsing a simple sql string in php

2011-05-06 Thread Stuart Dallas
ode.google.com/p/php-sqlparser/ and more: http://jmp.li/fmy -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Bold links

2011-05-10 Thread Stuart Dallas
's important to remember that the fundamental reason for having the spec is that everyone (developers, browsers, screenreaders, etc) are working from the same guidelines. You have to assume that HTML5 consumption devices (both software and hardware) will follow the spec, so as a developer I think it's important to do the same regardless of your philosophical arguments against the decisions made when that spec was written. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP want not write in Database

2011-05-16 Thread Stuart Dallas
out the last error message from PDO you would not have had this problem for longer than a minute. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] PHP want not write in Database

2011-05-16 Thread Stuart Dallas
On Mon, May 16, 2011 at 11:40 AM, Silvio Siefke wrote: > Hello, > > On Mon, 16 May 2011 11:06:17 +0100 Stuart Dallas wrote: > > In order to avoid this problem in future I encourage you to check the > return > > value of every function call you make that might fail, i.e. e

Re: [PHP] Consistent Class Renaming (Simple Refactoring)

2011-05-17 Thread Stuart Dallas
my clients has dozens of tasks that need to be executed at various times across a cluster of servers, and rather than maintaining cron entries (which was getting nightmareish) we use a single cron entry on each server that runs a controlling process that in turn runs those tasks according to their indi

Re: [PHP] Sending messages from php to C++ application via UDP socket

2011-05-18 Thread Stuart Dallas
or some other format to package the data in a way that will be easily manipulated at both ends, rather than trying to duplicate the in-memory representation that your particular C++ compiler of choice is using. Doing things that way leads to an extremely fragile system. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Warning: session_start()

2011-05-18 Thread Stuart Dallas
} >} >else >echo "Please enter all the fields!"; > > } > > ?> Compare your configuration files. The option that's likely different here is output_buffering. See the manual for full details: http://php.net/outcontrol.configuration To avoid thi

Re: [PHP] Script ID?

2011-05-21 Thread Stuart Dallas
the current URL. I have no idea whether that's part of the HTML spec, but that's the behaviour I've always observed. Alternatively, by my reckoning, you could make your use of PHP_SELF safe by applying rawurlencode to $self when you put it in the action, but that's only after 30 seconds of thinking about it. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Script ID?

2011-05-21 Thread Stuart Dallas
On Sat, May 21, 2011 at 3:35 PM, Peter Lind wrote: > On 21 May 2011 16:18, Stuart Dallas wrote: > > On Sat, May 21, 2011 at 3:11 PM, tedd wrote: > > > >> Hi gang: > >> > >> Okay, so,what's the "best" (i.e., most secure) way for your s

Re: [PHP] Script ID?

2011-05-21 Thread Stuart Dallas
On Sat, May 21, 2011 at 4:07 PM, Peter Lind wrote: > On 21 May 2011 17:01, Stuart Dallas wrote: > > On Sat, May 21, 2011 at 3:35 PM, Peter Lind > wrote: > >> > >> On 21 May 2011 16:18, Stuart Dallas wrote: > >> > On Sat, May 21, 2011 at 3:

Re: [PHP] Script ID?

2011-05-21 Thread Stuart Dallas
On Sat, May 21, 2011 at 4:24 PM, Peter Lind wrote: > On 21 May 2011 17:18, Stuart Dallas wrote: > > *snip* > > >> Again, this depends upon what your url scheme looks like - and without > >> knowing that, there's simple no clue as to whether or not this is

Re: [PHP] Script ID?

2011-05-21 Thread Stuart Dallas
On Sat, May 21, 2011 at 4:42 PM, Ashley Sheridan wrote: > On Sat, 2011-05-21 at 16:34 +0100, Stuart Dallas wrote: > > On Sat, May 21, 2011 at 4:24 PM, Peter Lind wrote: > > > On 21 May 2011 17:18, Stuart Dallas wrote: > > > > *snip* > > > > >&g

Re: [PHP] Script ID?

2011-05-21 Thread Stuart Dallas
On Sat, May 21, 2011 at 4:48 PM, Ashley Sheridan wrote: > On Sat, 2011-05-21 at 16:47 +0100, Stuart Dallas wrote: > > On Sat, May 21, 2011 at 4:42 PM, Ashley Sheridan > wrote: > > > On Sat, 2011-05-21 at 16:34 +0100, Stuart Dallas wrote: > > > > On Sat, Ma

Re: [PHP] Script ID?

2011-05-21 Thread Stuart Dallas
On Sat, May 21, 2011 at 4:57 PM, Peter Lind wrote: > On 21 May 2011 17:34, Stuart Dallas wrote: > > On Sat, May 21, 2011 at 4:24 PM, Peter Lind > wrote: > >> > >> On 21 May 2011 17:18, Stuart Dallas wrote: > >> > >> *snip* > >> > &g

Re: [PHP] Script ID?

2011-05-21 Thread Stuart Dallas
On Sat, May 21, 2011 at 5:02 PM, Ashley Sheridan wrote: > On Sat, 2011-05-21 at 16:53 +0100, Stuart Dallas wrote: > > On Sat, May 21, 2011 at 4:48 PM, Ashley Sheridan > wrote: > > > On Sat, 2011-05-21 at 16:47 +0100, Stuart Dallas wrote: > > > > On Sat, May 21,

Re: [PHP] Script ID?

2011-05-21 Thread Stuart Dallas
On Sat, May 21, 2011 at 5:14 PM, Peter Lind wrote: > On 21 May 2011 18:05, Stuart Dallas wrote: > > On Sat, May 21, 2011 at 4:57 PM, Peter Lind > wrote: > >> > >> On 21 May 2011 17:34, Stuart Dallas wrote: > >> > On Sat, May 21, 2011 at 4:24 PM, Peter

Re: [PHP] Script ID?

2011-05-21 Thread Stuart Dallas
On Sat, May 21, 2011 at 5:33 PM, Peter Lind wrote: > On 21 May 2011 18:26, Stuart Dallas wrote: > > *snip* > > > http://en.wikipedia.org/wiki/Defensive_programming > > You do things your way and I'll do things my way. Best of luck to you. > > Thank you for yo

Re: [PHP] Script ID?

2011-05-21 Thread Stuart Dallas
On Sat, May 21, 2011 at 6:00 PM, Peter Lind wrote: > On 21 May 2011 18:42, Stuart Dallas wrote: > > On Sat, May 21, 2011 at 5:33 PM, Peter Lind > wrote: > >> > >> On 21 May 2011 18:26, Stuart Dallas wrote: > >> > >> *snip* > >>

Re: [PHP] GnuPG from PHP - Where is the include ??

2011-05-24 Thread Stuart Dallas
On Tue, May 24, 2011 at 8:41 PM, Eli Orr (Office) wrote: > Please advise - I'guess it is not a build in and looking for the GnuPG PHP > include as > all the GnuPG functions are now considered undefined. http://php.net/gnupg.installation -Stuart -- Stuart Dallas 3ft9 Ltd h

Re: [PHP] smart auto download file

2011-05-31 Thread Stuart Dallas
miss the way the web was before javascript :/ -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ On 31 May 2011 20:38, Ali Asghar Toraby Parizy > wrote: > > > Hi > > thanks for your help jean > > I've used this code before. But I want a little different thing. >

Re: [PHP] Re: about php comet

2011-06-03 Thread Stuart Dallas
uld write a select-based comet server in PHP, but it definitely wouldn't be in my top 10 language choices. I've just seen a later email in this thread that mentions that this is a chat-type system. Watch this and have your mind blown... http://vimeo.com/20605470 - at some point he describes how to write a pretty efficient chat server in PHP using ZeroMQ, but the whole thing is worth watching. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] phpsadness

2011-06-03 Thread Stuart Dallas
of their religion. He didn't imply that everyone who follows that religion would do the same, but that's the only interpretation I can think of that would cause offence, so surely the offence is in the interpretation not the actual words. Offence, like all things, is in the eye of the b

Re: [PHP] phpsadness

2011-06-03 Thread Stuart Dallas
On Fri, Jun 3, 2011 at 4:56 PM, Peter Lind wrote: > On 3 June 2011 17:36, Stuart Dallas wrote: > > On Fri, Jun 3, 2011 at 4:14 PM, Peter Lind > wrote: > >> > >> On Jun 3, 2011 4:52 PM, "Paul M Foster" > wrote: > >> > > >&

Re: [PHP] Announcing New PHP Extension: System Detonation Library (was: phpsadness)

2011-06-03 Thread Stuart Dallas
ude! Tho I'd like to see a version that did the countdown with delayed echos :) -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] What do you get for ...

2011-06-07 Thread Stuart Dallas
2.6.18 (CentOS) PHP 5.2.13 All return __DIR__. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] ftell Issue or Feature

2011-06-08 Thread Stuart Dallas
ternatively it could just do a filesize on the filename to get the current size rather than using ftell on the resource. If the size is less than ftell then another thread has rolled it over and this thread needs to close and reopen the file. If they match, roll the file over. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] execute my php code before every php call

2011-06-12 Thread Stuart Dallas
> > Thanks, > > TL Look up the auto_prepend_file php.ini configuration option. That should give you the functionality you're after. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ Sent from my leaf blower -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Uncatchable errors

2011-06-13 Thread Stuart Dallas
s (PHP or otherwise), piping the output accordingly so you can detect errors that cannot be caught by the error handler. However, statically detectable issues such as parse errors should never get as far as a dynamic environment outside of your development machine, so I would question why you

Re: [PHP] newbie date time question

2011-06-22 Thread Stuart Dallas
otime($dt2), $d[1]); > > Not elegant but it gives me the date/time value. $dt->getTimestamp() will give you the same value as strtotime($dt2), so you don't need the inelegance. $format = 'd/m/Y g:i:s A'; $dt = date_create_from_format($format, $d[0]); $data[] = array($dt-&

Re: [PHP] Php filter validate url

2011-06-26 Thread Stuart Dallas
the rules in the above RFC. If you need to check for a specific type of URL you'll need to implement your own validation function, or google for one - there's loads out there. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Php filter validate url

2011-06-26 Thread Stuart Dallas
On Sunday, 26 June 2011 at 21:59, Ashley Sheridan wrote: > On Sun, 2011-06-26 at 20:10 +0100, Stuart Dallas wrote: > > On Sunday, 26 June 2011 at 18:31, Adam Tong wrote: > Hi, > > I wanted tu > > use php filters for validation to avoid regular expresions. &g

Re: [PHP] Re: Php filter validate url

2011-06-26 Thread Stuart Dallas
the rules, regardless of people's personal opinion of the merits of any particular posting style. http://php.net/reST/php-src/trunk_README.MAILINGLIST_RULES - item 3 near the bottom of the page. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://ww

Re: [PHP] Re: asynchronous launch of a script

2011-06-27 Thread Stuart Dallas
obs to be done via a database, IPC, socket or other mechanism from the HTTP handler to the offline process. I use a job queueing system to accomplish this in most of my projects, where I can either schedule a repeating job or queue one-off jobs when needed. I wrote a post on my blog a little while ago describing that system... http://stut.net/2009/05/29/php-job-queue/ -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to implement Authentication of UNIX users?

2011-06-27 Thread Stuart Dallas
DNS lookup for a non-existant record. Turn that off and you might see an improvement in connect speed. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Benchmark two functions against each other?

2011-06-27 Thread Stuart Dallas
t will let you do that - allowing arbitrary PHP to be entered into a website to be executed is far too dangerous. Just knocked this up, should do what you want: https://gist.github.com/1049335 -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Benchmark two functions against each other?

2011-06-27 Thread Stuart Dallas
On Mon, Jun 27, 2011 at 6:39 PM, Scott Baker wrote: > On 06/27/2011 10:33 AM, Stuart Dallas wrote: > > > > You're not going to find a service that will let you do that - allowing > > arbitrary PHP to be entered into a website to be executed is far too > > danger

Re: [PHP] caching problem

2011-06-28 Thread Stuart Dallas
lem is obviously outside the web server. There are two possibilities I can think of... * Browser caching * Proxy caching See if clearing your browser cache helps. If not then you probably have a proxy between you and the server that's caching the content. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] caching problem

2011-06-28 Thread Stuart Dallas
On Tue, Jun 28, 2011 at 1:51 PM, Fatih P. wrote: > > > On Tue, Jun 28, 2011 at 1:52 PM, Stuart Dallas wrote: > >> On Tuesday, 28 June 2011 at 06:57, Fatih P. wrote: >> > On Tue, Jun 28, 2011 at 7:40 AM, Nilesh Govindarajan >> > mailto:cont...@nileshgr.com)>

Re: [PHP] caching problem

2011-06-28 Thread Stuart Dallas
th default > settings. also mentioned no caching is > enabled to cache anything. And NO i am not using APC either or something > else!!! > Fatih, please explain what you mean by "the code files are being cached. and modifications in methods are skipped and not executed." How

Re: [PHP] caching problem

2011-06-28 Thread Stuart Dallas
On Tue, Jun 28, 2011 at 5:12 PM, Fatih P. wrote: > On Tue, Jun 28, 2011 at 5:30 PM, Stuart Dallas wrote: > >> Fatih, please explain what you mean by "the code files are being cached. >> and modifications in methods are skipped >> and not executed." How are y

Re: [PHP] caching problem

2011-06-28 Thread Stuart Dallas
On Tue, Jun 28, 2011 at 5:53 PM, Fatih P. wrote: > > > On Tue, Jun 28, 2011 at 6:34 PM, Stuart Dallas wrote: > >> On Tue, Jun 28, 2011 at 5:12 PM, Fatih P. wrote: >> >>> On Tue, Jun 28, 2011 at 5:30 PM, Stuart Dallas wrote: >>> >>>> Fati

Re: [PHP] asynchronous launch of a script

2011-06-28 Thread Stuart Dallas
at work to a separate process so as to free up the request handler so it's available to handle another incoming request. Another option is to fork the process using pcntl_fork() [1]. I haven't used > this in PHP before so I can't give an example. > Forking an HTTP request handler can lead to some very unwelcome side-effects. I'd urge you not to do this. It may appear to work for a while, but I guarantee you'll live to regret it. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] best ways to recruit volunteers for a PHP framework

2011-06-28 Thread Stuart Dallas
e - let them discover/decide how worthy your project is of their attention and efforts on their own. That's the only way to build a quality bunch of contributors. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] PHP EOL

2011-07-02 Thread Stuart Dallas
mented mail servers (rare these days, but it happens). Incidentally, CR only applies to Mac OS9 and earlier. OSX uses LF due to its BSD roots. For a near-complete list, see "Representations" here: http://en.wikipedia.org/wiki/Newline. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] vend-bot?

2011-07-03 Thread Stuart Dallas
. They come back from PayPal to a script that sets up their unique URL, then you take them to that URL. KISS it - the more complicated you make this the worse the user experience will be and it won't be any more secure than a time-limited unique token as described above. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] PHP EOL

2011-07-03 Thread Stuart Dallas
you accept" - if it wasn't like that the internet would fall apart. I encourage you to do your part to do things right, but it's completely up to you if you don't want to follow the users' manual. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ On Jul 2, 2011, at 8

Re: [PHP] Re: [PHP-DB] Re: [PHP] PHP EOL

2011-07-03 Thread Stuart Dallas
On Sun, Jul 3, 2011 at 11:22 PM, Karl DeSaulniers wrote: > @Stuart, > Actually that is what made me look into the PHP_EOL Stuart. Wanting to do > things right. > Did you not read my initial email? I am not suggesting anyone adopt my > code. > The question was directed to what t

Re: [PHP] Re: [PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] PHP EOL

2011-07-04 Thread Stuart Dallas
On Mon, Jul 4, 2011 at 7:11 AM, Karl DeSaulniers wrote: > Hello Stuart, > After some closer look at the RFC Compliant manuals you suggested, > I have determined that the creator of that code was in fact RFC821 > Compliant. > Being that this was a code I found several years ago,

Re: [PHP] Re: Top Posting

2011-07-05 Thread Stuart Dallas
ng in the business world annoys me just as must as bottom posting annoys you in this world. One final thing... you keep calling this a newsgroup. The PHP mailing lists are mailing lists first, and a newsgroup second - that's kinda why they're called the PHP mailing lists. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/

Re: [PHP] Foreach question

2011-07-05 Thread Stuart Dallas
ext item in the array is calculated after evaluating the condition but before executing that loop. Thus, with a single array element it decides it's at the end of the array before the first loop. My C is a little rusty so I might have the details slightly wrong, but that's the crux of wh

<    3   4   5   6   7   8   9   10   11   12   >