Re: [PHP] opcode question

2007-09-05 Thread Rob Desbois
Hi,

I believe this would be a bug - report it at http://bugs.php.net/ with the
exact error output and a minimal example script.

--rob

On 9/5/07, Frank Höger [EMAIL PROTECTED] wrote:

 Hello,

 I recently came across an invalid opcode 137/8/8 error. I couldn't
 find anything on the net regarding this specific error. Where can I find
 documentation concerning opcodes and particularly this error?


 Regards

 Frank

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Rob Desbois
Eml: [EMAIL PROTECTED]
Tel: 01452 760631
Mob: 07946 705987
There's a whale there's a whale there's a whale fish he cried, and the
whale was in full view.
...Then ooh welcome. Ahhh. Ooh mug welcome.


[PHP] Bind function parameters with create_function ('currying')

2007-09-04 Thread Rob Desbois
Hi all,

I have a function which is my callback for preg_replace_callback - and it
needs to be able to access a string and an object outside of itself.
When I call create_function I can insert the string, but without serializing
the object I can't figure out how to make it available to the function
without making it global, which seems nasty.

I've tried 'currying' the function - creating a new function out of it with
the string and object parameters bound, but have the same problem - I can't
get the object into the function.
Can anyone point me towards a good solution? I guess I could also create a
class with the one function, but that seems a wee bit messy to me.

Any ideas?

-- 
Rob Desbois
Eml: [EMAIL PROTECTED]


Re: [PHP] Pokeing functionality

2007-05-22 Thread Rob Desbois

Many ideas, all of them completely dependent on exactly what your
requirements are - should a poke be delivered to the target in real-time or
when they next load a page?
This is an extremely general question, like I want users to be able to view
each other's profiles, how?...

--rob

On 5/22/07, Don Don [EMAIL PROTECTED] wrote:


Hi All, am trying to integrate a poke me poke you functionality to a web
2.0 application am developing.  I've got some ideas of how to do this but
am not sure if its the best aproach.  i am using the idea of a PM system
since i've done that earlier.

Does anyone have any way of implementing a pokeing functionality in php ?

Cheers


-
Ready for the edge of your seat? Check out tonight's top picks on Yahoo!
TV.





--
Rob Desbois
Eml: [EMAIL PROTECTED]
Tel: 01452 760631
Mob: 07946 705987
There's a whale there's a whale there's a whale fish he cried, and the
whale was in full view.
...Then ooh welcome. Ahhh. Ooh mug welcome.


[PHP] Timezone DB update frequency

2007-05-21 Thread Rob Desbois

I am responsible for development of a product using PHP, which is
distributed as a component of the product.

How often does the timezone DB (php_timezonedb.dll) actually *need* to be
updated? We would be responsible for this task via product updates so need
to know if the default DB shipped with PHP will become unsuitable and when /
how often.

Thanks,
--rob


Re: [PHP] Re: using preg_match

2007-05-16 Thread Rob Desbois

[re-sending, forgot to include list :-|]
If you're matching a string and not a pattern then it is far more efficient
to use strpos:

if (strpos($path, '/realtors') !== FALSE) {
  echo 'Success';
}

rob

On 5/16/07, Al [EMAIL PROTECTED] wrote:


The container, as you called it, are delimiters.  They can be about any
character you choose; but, stay away from preg
control characters. Personally, I use % most of the time.

It's a good habit to use delimiter characters that you can be certain will
not be included in your strings. Then, you
don't need to worry about escaping them in your string.

Ed Curtis wrote:
 I'm trying to use preg_match to find a string in a system path.

 What I need to do is see if the string '/realtors' exists in a variable
 named '$path'.

 I know '/' is used as a container within the command itself. How do I
 escape it to find the string '/realtors'?

 Thanks,

 Ed

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
Rob Desbois
Eml: [EMAIL PROTECTED]
Tel: 01452 760631
Mob: 07946 705987
There's a whale there's a whale there's a whale fish he cried, and the
whale was in full view.
...Then ooh welcome. Ahhh. Ooh mug welcome.


[PHP] Timezones

2007-05-15 Thread Rob Desbois

After my last week's email on timezones I have come to the decision that it
is far more sensible to cease using fixed offsets from UTC (e.g. +2:00) and
to use the proper zones e.g. Europe/London.

After doing some reading up on the subject as I am not too familiar with it,
I understand that it is necessary to keep the local DB up-to-date, for PHP
this comes in the form of PECL's timezonedb.

Since we distribute PHP as a part of a larger product, we would be
responsible for keeping this up-to-date - so what I need to know is:
* where does the php_timezonedb.dll need to be located and does it need to
be in php.ini - I can't find mention of the file in the default installation
* how often would we actually need to update the DB - PECL says You should
only install this extension in case you need to get a later version of the
timezone database than the one that ships with PHP. - does this imply that
we might actually be fine to continue using the default installed DB for the
foreseeable future?

I'd appreciate any guidance on this - TIA.
--rob


[PHP] Using timezones

2007-05-04 Thread Rob Desbois
I have a script which uses UTC times read from a database.

Up until now the users have just provided their current timezone offset from 
UTC in hours, but this needs to be changed as the script may not be running on 
a server with UTC set and I'd like to use set_default_timezone().

Looking at the documentation, all of the timezones which I want to provide 
(Etc/GMT+N, Etc/GMT-N and UTC) are listed as 'only existing for backward 
compatible reasons'.
Is there any reason why UTC should exist only for backward compatible reasons?? 
It seems like a pretty important timezone to me...

What's the best way to go about providing this functionality? Should I just 
provide an option of all regional timezones (how do I use this? The manual says 
where to download a pre-compiled Windows DLL but doesn't explain how to use 
it). Even if I do that how should I obtain UTC time if UTC is a deprecated 
timezone?

Thanks!
Rob


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php