Re: [PHP] Object to array conversion oddity

2006-09-26 Thread Marcus Bointon
it properly. The original question wasn't whether it was a good idea or not, but that it didn't act as the docs said it did. In the mean time, you might like to know that this behaviour IS apparently considered correct and a patch to documentation has been committed. Marcus -- Marcus Bointon

Re: [PHP] Object to array conversion oddity

2006-09-24 Thread Marcus Bointon
by pointing out there's a problem in the first place? It's a lot more constructive than being rude. Marcus -- Marcus Bointon Synchromedia Limited: Creators of http://www.smartmessages.net/ [EMAIL PROTECTED] | http://www.synchromedia.co.uk/ -- PHP General Mailing List (http://www.php.net

Re: [PHP] Object to array conversion oddity

2006-09-24 Thread Marcus Bointon
(4) { [A:private]= NULL [B]= NULL [c:protected]= NULL [A:private]= NULL } [c]= NULL } Reference preserved. It's not like I care about PHP4, nor am I doing a deep conversion. Marcus -- Marcus Bointon Synchromedia Limited: Creators of http

Re: [PHP] Object to array conversion oddity

2006-09-24 Thread Marcus Bointon
), but occasionally they just don't read the report - in this case I was referred to the documentation, which agrees 100% with my complaint! Marcus -- Marcus Bointon Synchromedia Limited: Creators of http://www.smartmessages.net/ [EMAIL PROTECTED] | http://www.synchromedia.co.uk/ -- PHP General Mailing

[PHP] Object to array conversion oddity

2006-09-23 Thread Marcus Bointon
the properties (member variables) of that object as the array's elements. The keys are the member variable names. It seems that's not quite true. How can I stop it doing this? Looks a bit buggy to me. Marcus -- Marcus Bointon Synchromedia Limited: Creators of http://www.smartmessages.net/ [EMAIL

Re: [PHP] Object to array conversion oddity

2006-09-23 Thread Marcus Bointon
with multiple public and multiple private variables. If the format of the array keys stays the same, then you should have your answer. In my real code I do have multiple fields all exhibiting this behaviour. I'll report it. Marcus -- Marcus Bointon Synchromedia Limited: Creators of http

Re: [PHP] Object to array conversion oddity

2006-09-23 Thread Marcus Bointon
:private]= string(0) [field3:protected]= string(0) } array(3) { [field1]= string(0) [Myclassfield2]= string(0) [*field3]= string(0) } So it seems protected fields behave differently too. Marcus -- Marcus Bointon Synchromedia Limited: Creators of http://www.smartmessages.net

Re: [PHP] Object to array conversion oddity

2006-09-23 Thread Marcus Bointon
probably be using the object itself anyway. Bug report is here: http://bugs.php.net/?id=38935 Marcus -- Marcus Bointon Synchromedia Limited: Creators of http://www.smartmessages.net/ [EMAIL PROTECTED] | http://www.synchromedia.co.uk/ -- PHP General Mailing List (http://www.php.net

Re: [PHP] Object to array conversion oddity

2006-09-23 Thread Marcus Bointon
by adding 'private' and 'protected' array properties containing field names for each access level to the resulting array. OTOH, that would break what you'd expect count() to deliver after the conversion. I really think it should just do what's it's meant to, and no more. Marcus -- Marcus Bointon

Re: [PHP] Object to array conversion oddity

2006-09-23 Thread Marcus Bointon
it is preferable to using reflection (unless it's a relic from PHP4?). What's next - appending a creation time to integers when they're cast into strings? Marcus -- Marcus Bointon Synchromedia Limited: Creators of http://www.smartmessages.net/ [EMAIL PROTECTED] | http://www.synchromedia.co.uk/ -- PHP

Re: [PHP] Object to array conversion oddity

2006-09-23 Thread Marcus Bointon
{ //It's a public property $propArray[$key] = $value; } } return $propArray; } Works nicely for me. Marcus -- Marcus Bointon Synchromedia Limited: Creators of http://www.smartmessages.net/ [EMAIL PROTECTED] | http

Re: [PHP] Recommendations for PHP debuggers?

2006-08-21 Thread Marcus Bointon
traces alone makes it worthwhile IMHO. Marcus -- Marcus Bointon Synchromedia Limited: Creators of http://www.smartmessages.net/ [EMAIL PROTECTED] | http://www.synchromedia.co.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: loop in horizontal direction (php-html)

2006-08-10 Thread Marcus Bointon
on a single page; This is a very good way of making a browser go very slowly and eat lots of memory. Marcus -- Marcus Bointon Synchromedia Limited: Creators of http://www.smartmessages.net/ [EMAIL PROTECTED] | http://www.synchromedia.co.uk/ -- PHP General Mailing List (http://www.php.net

[PHP] $_SERVER['REMOTE_ADDR'] arriving in IPv6

2006-05-18 Thread Marcus Bointon
networking disabled in my network control panel, and my PHP is configured with --disable-ipv6. How can I force it to return only ipv4 addresses? Is there an ini setting somewhere? Thanks, Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http

Re: [PHP] $_SERVER['REMOTE_ADDR'] arriving in IPv6

2006-05-18 Thread Marcus Bointon
. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Beware of OS X PHP security update...

2006-03-03 Thread Marcus Bointon
. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Compiling PHP with freetype2 on MacOS X

2006-02-24 Thread Marcus Bointon
in there, and also in /usr/X11R6/include/freetype2/freetype/ freetype.h Those files should be found using the paths I gave in configure. Anyone got any idea how I can fix this? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP

Re: [PHP] Recompile PHP on pre-installed system

2006-02-07 Thread Marcus Bointon
a dependency for apps installed through rpm. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mail() and Return-Path header

2006-02-06 Thread Marcus Bointon
bounces - MS Exchange server sometimes bounces messages with no indication of the address the original message was sent to! Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net

Re: [PHP] Class constructor

2006-02-01 Thread Marcus Bointon
} function __construct(){ //This will be called in PHP5 } } Why penalise the platform you're intending to run it on? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List

Re: [PHP] Wysiwyg editors?

2006-02-01 Thread Marcus Bointon
is working great for me from PHP. http://www.fckeditor.net/ http://tinymce.moxiecode.com/ Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] HTML rendering extension?

2005-12-21 Thread Marcus Bointon
enough. Alternatively something like a CLI option to firefox to run without X (i.e. no visible windows) and output to a file instead of a display device. The options here don't indicate that it can do that: http://kb.mozillazine.org/Command_line_arguments Any other ideas? Marcus -- Marcus

Re: [PHP] HTML rendering extension?

2005-12-21 Thread Marcus Bointon
-- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] HTML rendering extension?

2005-12-21 Thread Marcus Bointon
... Thanks very much for the tip, very glad to have finally found a solution. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] mod_rewrite and include paths

2005-11-21 Thread Marcus Bointon
. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] APC caching keys.

2005-11-21 Thread Marcus Bointon
:05. Nothing special was needed. The current 3.0.8 release of APC is broken in PHP 5.1.0-dev if you ever use __autoload. It will be fixed in 3.0.9 (and is fixed in CVS), though Rasmus implied that 3.0.9 is waiting until 5.1 release. Marcus -- Marcus Bointon Synchromedia Limited: Putting you

Re: [PHP] php5 call by refference

2005-11-21 Thread Marcus Bointon
call this as you asked, where would the result go? Is there some sort of workaround ? As was suggested, put your values in variables before calling the function, though the code example you posted suggests you're trying to do something odd. Marcus -- Marcus Bointon Synchromedia Limited

Re: [PHP] using ($test)?$true:$false in a string

2005-11-21 Thread Marcus Bointon
that this is the fastest method: 'first part of string '.(($a==$b)?$c:$d).' rest of string' I benchmarked this a while ago and was surprised to find that multiple concats with single quotes are significantly faster than interpolation. Marcus -- Marcus Bointon Synchromedia Limited: Putting you

Re: [PHP] APC caching keys.

2005-11-21 Thread Marcus Bointon
(it is reported as having come from your __autoload function). You need a stack trace to figure out where the original problem occurred - xdebug works a treat (but it won't mix with APC). Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http

Re: [PHP] Re: PHP 4.4.1 on Apache 2.0.x issue

2005-11-21 Thread Marcus Bointon
bugs in the bug system, but only if you have a short reproducable test case. If everything goes well, we can release it next tuesday. Especially test issues with mod_rewrite and Apache 2 please! Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http

Re: [PHP] Sorting users geographically...

2005-11-21 Thread Marcus Bointon
-geometries.html Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] using ($test)?$true:$false in a string

2005-11-21 Thread Marcus Bointon
supported very nicely in PDO in PHP 5.1. A tangent I know, but a useful one nonetheless. Hey, and I remember when print using was considered a 'power user' feature in BASIC in 1981! Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http

Re: [PHP] forking off in php

2005-11-21 Thread Marcus Bointon
without a break. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] forking off in php

2005-11-21 Thread Marcus Bointon
by not forking and using nohup (look it up with man) with , however, that will mean it runs as you, whereas a forked process can easily switch users and drop privileges for increased security. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http

Re: [PHP] Is echo tag reasonably portable?

2005-11-18 Thread Marcus Bointon
this pretty much puts paid to using short tags. Admittedly it is on in php.ini-dist, but that's not recommended is it ;^) Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net

Re: [PHP] Set Timezone to localtime in php.ini

2005-11-18 Thread Marcus Bointon
date.timezone ini setting. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie to PHP5

2005-11-15 Thread Marcus Bointon
://www.oreilly.com/catalog/upgradephp5/ Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mod_rewrite and include paths

2005-11-14 Thread Marcus Bointon
in sitepoint apache forums too, see if anyone there has any idea. Thanks for the ideas. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Printing to a buffer

2005-11-14 Thread Marcus Bointon
written some), there are others that do nothing but downloads (I use Interarchy for just that). I could offer a similar opinion about the browsers that have odd implementations of content-disposition. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED

Re: [PHP] Recommendations for the Zend PHP Certification

2005-11-13 Thread Marcus Bointon
on their site. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Printing to a buffer

2005-11-13 Thread Marcus Bointon
- it's right up there with 'application/force-download'. If you want to suggest (the final choice is not yours to make) that a browser might download something instead of displaying it, set an appropriate content-disposition header instead of setting the wrong type. Marcus -- Marcus Bointon

Re: [PHP] Printing to a buffer

2005-11-13 Thread Marcus Bointon
later. Todd, I think you should read this: http://support.microsoft.com/kb/ q260519/ There's a PHP example just before the user notes here: http:// www.php.net/header Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk

[PHP] mod_rewrite and include paths

2005-11-13 Thread Marcus Bointon
as there may be multiple independent deployments of the same scripts on the server, and I don't want them including each others files. Adding .. to the path would work but is a security risk. Any other ideas? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL

Re: [PHP] mod_rewrite and include paths

2005-11-13 Thread Marcus Bointon
();' seems to fail completely when called via a rewrite. After all that, smarty still can't find its templates_c for some reason. I'm sure there must be something simple and elegant I'm missing. Probably a good night's sleep. Marcus -- Marcus Bointon Synchromedia Limited: Putting you

Re: [PHP] mod_rewrite, apache2, php5RC1 and osx bsd

2005-11-11 Thread Marcus Bointon
will be: 'blah.php?x=Hello there', which is obviously broken. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php session in ie

2005-11-11 Thread Marcus Bointon
for this site in IE. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sessions and register_long_arrays

2005-11-05 Thread Marcus Bointon
! Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Richard Lynch's Email Address ...

2005-11-03 Thread Marcus Bointon
compliant, it's pretty unlikely to work, though I have occasionally seen things like non-ASCII chars and '_' get through. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net

Re: [PHP] Re: Richard Lynch's Email Address ...

2005-11-03 Thread Marcus Bointon
On 3 Nov 2005, at 14:16, Richard Heyes wrote: It even has a method specifically for normal email addresses of the form [EMAIL PROTECTED] Ah, well, that's good news. It's been a while since I looked at it. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL

Re: [PHP] [DONE] Substr by words

2005-10-31 Thread Marcus Bointon
that a nested mass of string functions is even more confusing - at least a regex has a fixed grammar. I've just written a load of stuff that uses preg_replace_callback that I'm quite pleased with. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED

Re: [PHP] Type of form element

2005-10-31 Thread Marcus Bointon
don't know about you but I often deal with arrays containing NULL values where using isset would be very wrong. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net

Re: [PHP] Re: Substr by words

2005-10-31 Thread Marcus Bointon
- the subsequent trim fixes them both. I like mine because it has 1 less char ;^) Ultimately, if it works for you, great! Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net

Re: [PHP] php mail function vs smtp server

2005-10-31 Thread Marcus Bointon
reliable to deal with all the other stuff like MIME encoding, plus it has support for all these sending methods without having to change much code. I use it with qmail. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk

Re: [PHP] Type of form element

2005-10-31 Thread Marcus Bointon
be exposed to this possibility, no matter where your data comes from. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Type of form element

2005-10-31 Thread Marcus Bointon
used other functions the same way you're using isset, you would see nothing wrong with this: $myarray = array(); print $myarray['a']; but I would hope that you would have a problem with that. Why treat isset differently? Marcus -- Marcus Bointon Synchromedia Limited: Putting you

Re: [PHP] Type of form element

2005-10-31 Thread Marcus Bointon
, and their test with isset was failing. So it's not just academic and I'm not making it up - this problem does happen for real. All this over such a little thing - imagine if we had a whole language to worry about! Oh wait... Marcus -- Marcus Bointon Synchromedia Limited: Putting you

Re: [PHP] Type of form element

2005-10-30 Thread Marcus Bointon
'])) { if (array_key_exists('option1', $_REQUEST['checkbox_name'])) { echo you selected option 1\n; } if (array_key_exists('option2', $_REQUEST['checkbox_name'])) { echo you selected option 2\n; } //etc... } Marcus -- Marcus Bointon Synchromedia Limited: Putting you

Re: [PHP] [DONE] Substr by words

2005-10-30 Thread Marcus Bointon
: $text = preg_replace('/ */', ' ', $text); Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Substr by words

2005-10-30 Thread Marcus Bointon
]); echo $result; } Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php not activated

2005-10-30 Thread Marcus Bointon
= mysql_fetch_array($myquery, MYSQL_NUM); return $mydata[0]; } return false; } Then call it: if ($contents = display()) eval($contents); This should be faster and safer than your original code. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED

Re: [PHP] Re: Substr by words

2005-10-30 Thread Marcus Bointon
-- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Sessions and register_long_arrays

2005-10-29 Thread Marcus Bointon
does not get saved back to the session file if register_long_arrays is enabled. Anyone else seen this? Any idea why it might be happening? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List

Re: [PHP] Sessions and register_long_arrays

2005-10-29 Thread Marcus Bointon
On 29 Oct 2005, at 14:48, Marcus Bointon wrote: changing an item in $_SESSION simply does not get saved back to the session file if register_long_arrays is enabled. I meant disabled. I've also tried using it with the mm session save handler and I get the same symptoms. I also get

Re: [PHP] PHP version check

2005-10-28 Thread Marcus Bointon
/function.version-compare.php to do so reliably. Version strings are messy things. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] prevent user from getting scripts outside the web folder [this better?]

2005-10-14 Thread Marcus Bointon
). It doesn't do anything significantly different to addslashes(), which is purely a PHP internal function. If you are writing database independent code, you should probably prefer addslashes (or things like adodb::qstr). Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture

Re: [PHP] OPTIMIZING - The fastest way to open and show a file

2005-10-14 Thread Marcus Bointon
be expected to deliver). Otherwise as Jochem says, use RAM for your cache in the first place. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Re: ampersand in dom with utf-8

2005-10-13 Thread Marcus Bointon
be OK. However, if you're using UTF-8 anyway, why not just use the real characters? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] SOAP WSDL location

2005-10-12 Thread Marcus Bointon
all). This would work, but it's way less efficient. I can't use an absolute path as it's deployed in multiple configurations on multiple servers, and config is bad enough already. Now before I report this as a bug/feature request, does anyone have any better ideas? Marcus -- Marcus Bointon

[PHP] Global unavailable?

2005-10-05 Thread Marcus Bointon
() { require 'a.inc.php'; global $a; echo $a; } } Is this just how it is, or am I doing something wrong? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net

Re: [PHP] Global unavailable?

2005-10-05 Thread Marcus Bointon
. The original definition is directly inside the included file, and not itself inside a function or class. I should have mentioned that I'm using PHP 5.1-dev, so it could just be bug... Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http

[PHP] OS X compile problem with GD

2005-08-30 Thread Marcus Bointon
for png_write_image in -lpng... (cached) yes If configure fails try --with-xpm-dir=DIR checking for FreeType 1 support... no - FreeType 2.x is to be used instead ... Any idea why this is not working? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http

Re: [PHP] Looking for CMS advice

2005-08-23 Thread Marcus Bointon
. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] __sleep, __wakeup and persistent connections

2005-08-20 Thread Marcus Bointon
, so it returns an empty array from __sleep, but that's unlikely to be useful for a subclass that does have properties (and serializing an object without any properties is pointless!). Ideas? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http

Re: [PHP] parallel execution of php code?

2005-08-09 Thread Marcus Bointon
this. Since MySQL 4.1 I've changed it to something like: INSERT INTO mytable SET id = 123, bla = '$x' ON DUPLICATE KEY UPDATE bla='$x' This saves you a query, and makes it easier to isolate the insert/ update as it will play nicely with autocommit. Marcus -- Marcus Bointon Synchromedia

Re: [PHP] Fast count of recordset in php...

2005-08-07 Thread Marcus Bointon
by then asking: $sql = SELECT FOUND_ROWS(); Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regex help

2005-08-03 Thread Marcus Bointon
here: http://www.hexillion.com/samples/#Regex Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] function with argument of type array

2005-07-29 Thread Marcus Bointon
type hinting, so they HAD to implement it for objects so that catch clauses could work properly. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] time()

2005-07-29 Thread Marcus Bointon
); Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Multipage form redux

2005-07-28 Thread Marcus Bointon
to you abandon and resume later (unless you get clever with JS and cookies). For keeping data in a session, you could combine this approach with Ajax: http://particletree.com/features/smart-validation-with-ajax Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL

[PHP] Class constants

2005-07-28 Thread Marcus Bointon
::BAR) { echo $a; } } In this case $this-thing will be undefined, but wibble() will get the correct default value for $a. Comments? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List

Re: [PHP] function with argument of type array

2005-07-28 Thread Marcus Bointon
$foo){ There is no way to do that. What you _CAN_ do, to ensure you're getting an array is: There IS a way to do exactly this. It's called type hinting and it's a PHP 5 feature: http://www.php.net/manual/en/language.oop5.typehinting.php Marcus -- Marcus Bointon Synchromedia Limited

Re: [PHP] Multipage form redux

2005-07-28 Thread Marcus Bointon
within a session may go to different servers, so file- or memory-based sessions are not much use. Despite this, I also suspect that sessions may not be the way to go. User authentication and management is not a synonym for sessions. Marcus -- Marcus Bointon Synchromedia Limited: Putting you

[PHP] Calling methods in returned SOAP objects

2005-07-27 Thread Marcus Bointon
on earth do I do that in PHP? I don't think that creating PHP classes and using classmap will help (it just moves the problem), at least partly because this is a dynamic WSDL that is subject to change. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http

[PHP] iconv trouble on OS X

2005-07-21 Thread Marcus Bointon
I wrote this question then found out where the problem was, so this is just for the archives... == I've compiled PHP 5.0.4 successfully on OS X 10.4.2, but I'm getting a weird problem with iconv. I specified it in my configure line: --with-iconv and it seems to pick it up ok

Re: [PHP] Re: Tracking a mobile phone

2005-07-20 Thread Marcus Bointon
On 18 Jul 2005, at 20:56, Sebastian wrote: The phone would have to have GPS capabilities.. Not true. The network knows what cell the phone is in(and cells are pretty small in cities), and it knows where the cell is. This is the mechanism that's used for location dependent services

[PHP] Overriding __soapCall

2005-07-14 Thread Marcus Bointon
. If I call it manually (i.e. non-WSDL way), something like: $sc-__soapCall('login', array('username' = 'abc', 'password' = 'xyz')); then it works, but in that simple gesture I've lost most of the WSDL advantage. What am I supposed to do? Marcus -- Marcus Bointon Synchromedia Limited

Re: [PHP] Overriding __soapCall

2005-07-14 Thread Marcus Bointon
On 14 Jul 2005, at 16:07, Marcus Bointon wrote: I've found various references to overriding the __call function (which is now completely obsolete as it clashes with a magic method) for the same kind of reason that I need to. So, it seems as if __soapCall is NOT called internally when

Re: [PHP] Compilation trouble on OS X

2005-06-13 Thread Marcus Bointon
some fink packages like apache2, JPEG, PNG, etc) and I'm still getting the ld problem I mentioned. Think I may have to report it as a bug and see what comes of that. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk

Re: [PHP] Compilation trouble on OS X

2005-06-13 Thread Marcus Bointon
On 13 Jun 2005, at 10:52, Marcus Bointon wrote: I just tried compiling on a clean install of 10.4, with a clean install of fink (I'm using some fink packages like apache2, JPEG, PNG, etc) and I'm still getting the ld problem I mentioned. Think I may have to report it as a bug and see what

Re: [PHP] Making a page loop with header('Location: ...

2005-06-10 Thread Marcus Bointon
for days at a time. This article I wrote might help: http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_20977409.html Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net

Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions!

2005-06-09 Thread Marcus Bointon
/articles/printyourway/ http://www.alistapart.com/articles/goingtoprint/ Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Compilation trouble on OS X

2005-06-09 Thread Marcus Bointon
extensions I need. There are no bugs posted on the PHP tracker that match these errors, so it's clearly not a common problem. Any ideas what might be broken, and how I might fix it? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http

Re: [PHP] Compilation trouble on OS X

2005-06-09 Thread Marcus Bointon
with this. PHP's build system is completely independent of XCode. PHP uses normal Unix-type tools such as gcc, make, ld, libtool, autoconf etc. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List

Re: [PHP] Compilation trouble on OS X

2005-06-09 Thread Marcus Bointon
rather than a compiling problem (i.e. the problem occurs after gcc has finished successfully). It seems that the OS X ld has different options to the GNU or BSD implementations, so I guess I'm really after someone that knows ld well enough. Marcus -- Marcus Bointon Synchromedia Limited

Re: [PHP] PHP 5 Question about OO

2005-06-02 Thread Marcus Bointon
' in a global context is not really anything wildly different in style to say ini_set or error_reporting. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] PHP 5 Question about OO

2005-06-02 Thread Marcus Bointon
talking hypothetically anyway as we don't have autoload methods at present). This thread is meant to be about how to improve automatic include file location - saying not to try to do it at all is not very helpful. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture

Re: [PHP] [Files suffix] .inc.php files

2005-06-01 Thread Marcus Bointon
-- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP 5 Question about OO

2005-06-01 Thread Marcus Bointon
, the file system you're on probably is, so keep your case consistent throughout. Docs are here: http://www.php.net/manual/en/language.oop5.autoload.php Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing

Re: [PHP] PHP 5 Question about OO

2005-06-01 Thread Marcus Bointon
method like __construct, so that a class would attempt to run its own autoloader before breaking out to the global function namespace. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http

Re: [PHP] xml

2005-05-31 Thread Marcus Bointon
,..., read its contents and put it in an associative array. You have described exactly what the pear config package does: http:// pear.php.net/package/config/ Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General

  1   2   >