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:
>
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
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
> > &
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
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
.
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
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
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
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
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
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
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
,
> > > 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
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
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
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
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
--
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
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,
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
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
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'
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
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
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
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
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
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
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
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
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
>
> 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
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
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
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
.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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
'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
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/
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
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
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/
}
>}
>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
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/
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
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:
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
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
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
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
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,
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
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
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*
> >>
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
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.
>
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/
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
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:
> >> >
> >&
ude!
Tho I'd like to see a version that did the countdown with delayed echos :)
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
2.6.18 (CentOS)
PHP 5.2.13
All return __DIR__.
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
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/
>
> 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
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
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-&
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
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
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
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
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/
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/
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
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
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)>
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
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
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
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/
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/
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/
. 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/
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
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
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,
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/
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
701 - 800 of 1126 matches
Mail list logo