[PHP] SimpleXMLElement and gb2312 or big5

2010-04-02 Thread Peter Pei
I use the following code to get rss and parse it, but the code occasionally have issues with gb2312 or big-5 encoded feeds, and fails to parse them. However other times may appear just okay. Any thoughts? Maybe SimpleXMLElement is simply not meant for other language encodings...

[PHP] SimpleXMLElement occasionally fails to parse gb2312 or big5 feeds

2010-04-02 Thread Peter Pei
I use the following code to get rss and parse it, but the code occasionally have issues with gb2312 or big-5 encoded feeds, and fails to parse them. However other times may appear just okay. Any thoughts? Maybe SimpleXMLElement is simply not meant for other language encodings...

Re: [PHP] Re: optimizing PHP for microseconds

2010-03-29 Thread Peter Lind
is adopt the normal good coding standards: don't using functions in loops like the above, for instance. However, be skeptic about tips: single-quotes are not faster than double-quotes, for instance. Regards Peter On 29 March 2010 10:28, Bastien Helders eldroskan...@gmail.com wrote: I have

Re: [PHP] Allowing multiple, simultaneous, non-blocking queries.

2010-03-26 Thread Peter Lind
when ready To get the threaded-ness, just open a connection per query you want to run asynchronous and pick it up when you're ready for it - i.e. iterate over steps 1-2, then do step 3 when things are ready. Regards Peter On 26 March 2010 12:45, Richard Quadling rquadl...@googlemail.com wrote: Hi

Re: [PHP] Will PHP ever grow up and have threading?

2010-03-25 Thread Peter Lind
be less costly, but as I haven't been involved in writing the PHP code my guess isn't worth much. Regards Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com

Re: [PHP] Will PHP ever grow up and have threading?

2010-03-25 Thread Peter Lind
On 25 March 2010 20:09, Tommy Pham tommy...@gmail.com wrote: On Thu, Mar 25, 2010 at 12:02 PM, Peter Lind peter.e.l...@gmail.com wrote: On 25 March 2010 19:37, Tommy Pham tommy...@gmail.com wrote: On Thu, Mar 25, 2010 at 3:55 AM, Per Jessen p...@computer.org wrote: Tommy Pham wrote: On Thu

Re: [PHP] Will PHP ever grow up and have threading?

2010-03-25 Thread Peter Lind
On 25 March 2010 20:19, Tommy Pham tommy...@gmail.com wrote: Aren't all feature requests must be analyzed the same way?  Example, namespace, how many of us actually uses it now when there is an alternative solution- subfolders - that we've been using since who knows how long.  I don't know if

Re: [PHP] Will PHP ever grow up and have threading?

2010-03-25 Thread Peter Lind
On 25 March 2010 20:59, Tommy Pham tommy...@gmail.com wrote: On Thu, Mar 25, 2010 at 12:28 PM, Peter Lind peter.e.l...@gmail.com wrote: On 25 March 2010 20:19, Tommy Pham tommy...@gmail.com wrote: Aren't all feature requests must be analyzed the same way?  Example, namespace, how many of us

Re: [PHP] Will PHP ever grow up and have threading?

2010-03-25 Thread Peter Lind
On 25 March 2010 22:51, Lester Caine les...@lsces.co.uk wrote: Per Jessen wrote: Tommy Pham wrote: I'm presenting the argument for threading.  Per is presenting the work around using asynchronous queries via mysqlnd.  I did read that link a few days ago, Although the user can send multiple

Re: [PHP] Will PHP ever grow up and have threading?

2010-03-25 Thread Peter Lind
On 25 March 2010 23:23, Tommy Pham tommy...@gmail.com wrote: There's the code example from that same link.  You may have executed the queries asynchronously, but the process of the results are still serial.  Let's face it, all of our processing of queries are not a simple echo.  We

Re: [PHP] PHP to access shell script to print barcodes

2010-03-24 Thread Peter Lind
the postscript as-is and the browser sends it to Preview which interprets it. I basically want to replicate the functionality found here: http://blog.maniac.nl/webbased-pdf-lto-barcode-generator/ On Mar 23, 2010, at 5:37 PM, Peter Lind wrote: You can create a .php script that sets a proper

Re: [PHP] Will PHP ever grow up and have threading?

2010-03-24 Thread Peter Lind
On 24 March 2010 10:38, Rene Veerman rene7...@gmail.com wrote: and if threading and shared memory aren't implemented, then hey, the php dev team can build something else in that these naysayers DO need eh... lol... Do you have any idea how sad and pathetic you come across? I'm very sorry to

Re: [PHP] Will PHP ever grow up and have threading?

2010-03-24 Thread Peter Lind
On 24 March 2010 11:53, Tommy Pham tommy...@gmail.com wrote: On Wed, Mar 24, 2010 at 3:44 AM, Per Jessen p...@computer.org wrote: Tommy Pham wrote: On Wed, Mar 24, 2010 at 3:20 AM, Per Jessen p...@computer.org wrote: Tommy Pham wrote: What I find funny is that one of opponents of PHP

Re: [PHP] Will PHP ever grow up and have threading?

2010-03-24 Thread Peter Lind
On 24 March 2010 12:04, Tommy Pham tommy...@gmail.com wrote: On Wed, Mar 24, 2010 at 3:52 AM, Lester Caine les...@lsces.co.uk wrote: Tommy Pham wrote: How exactly will threading in PHP help with the size of the database? That makes no sense to me, please help me understand how you think

Re: [PHP] Will PHP ever grow up and have threading?

2010-03-24 Thread Peter Lind
On 24 March 2010 12:14, Tommy Pham tommy...@gmail.com wrote: On Wed, Mar 24, 2010 at 4:09 AM, Peter Lind peter.e.l...@gmail.com wrote: On 24 March 2010 12:04, Tommy Pham tommy...@gmail.com wrote: On Wed, Mar 24, 2010 at 3:52 AM, Lester Caine les...@lsces.co.uk wrote: Tommy Pham wrote: How

Re: [PHP] Properly handling multiple constructors.

2010-03-24 Thread Peter Lind
Hmmm, that looks to me like you're trying to solve a problem in PHP with a c/c++c/# overloading solution. I'd give the builder pattern a try instead: http://en.wikipedia.org/wiki/Builder_pattern On 24 March 2010 13:01, Richard Quadling rquadl...@googlemail.com wrote: Hi. I have a scenario

Re: [PHP] Properly handling multiple constructors.

2010-03-24 Thread Peter Lind
in different ways while documenting it properly and avoid the huge switch inside your constructor that Nilesh proposed. On 24 March 2010 13:35, Richard Quadling rquadl...@googlemail.com wrote: On 24 March 2010 12:06, Peter Lind peter.e.l...@gmail.com wrote: Hmmm, that looks to me like you're trying

Re: [PHP] Properly handling multiple constructors.

2010-03-24 Thread Peter Lind
One of the main points of the OP was that you can document the code properly. Your example doesn't allow for nice docblocks in any way, as you'll either have to param points or a whole lot of noise. Quick note: __ prefixed functions are reserved, you shouldn't use that prefix for any of your own

Re: [PHP] Properly handling multiple constructors.

2010-03-24 Thread Peter Lind
On 24 March 2010 15:33, Robert Cummings rob...@interjinn.com wrote: Peter Lind wrote: One of the main points of the OP was that you can document the code properly. Your example doesn't allow for nice docblocks in any way, as you'll either have to param points or a whole lot of noise. I

Re: [PHP] Properly handling multiple constructors.

2010-03-24 Thread Peter Lind
On 24 March 2010 16:09, Robert Cummings rob...@interjinn.com wrote: Peter Lind wrote: On 24 March 2010 15:33, Robert Cummings rob...@interjinn.com wrote: Peter Lind wrote: One of the main points of the OP was that you can document the code properly. Your example doesn't allow for nice

Re: [PHP] Properly handling multiple constructors.

2010-03-24 Thread Peter Lind
On 24 March 2010 16:23, Robert Cummings rob...@interjinn.com wrote: Peter Lind wrote: On 24 March 2010 16:09, Robert Cummings rob...@interjinn.com wrote: Peter Lind wrote: On 24 March 2010 15:33, Robert Cummings rob...@interjinn.com wrote: Peter Lind wrote: One of the main points

Re: [PHP] Properly handling multiple constructors.

2010-03-24 Thread Peter Lind
On 24 March 2010 16:48, Robert Cummings rob...@interjinn.com wrote: Peter Lind wrote: The ,... is a supported syntax. Then I'd add the appropriate docblock for the alternate constructors. It might be but in effect the documentation you're left with is vague and has double the amount

Re: [PHP] Filtering all output to STDERR

2010-03-23 Thread Peter Lind
outputs messages to STDERR, then it's opening that stream somewhere before the output. Regards Peter On 23 March 2010 11:28, Marten Lehmann lehm...@cnm.de wrote: Have you tried with http://dk2.php.net/manual/en/function.error-reporting.php or just the @ operator? Yes. But this does not work

Re: [PHP] PHP to access shell script to print barcodes

2010-03-23 Thread Peter Lind
'); That tells the browser to download the file. You can also try setting the content-type header('Content-type: application/postscript'); Either of the above might do the trick for you. Regards Peter On 23 March 2010 22:10, Rob Gould gould...@me.com wrote: I love the idea of using PHP to insert

Re: [PHP] Filtering all output to STDERR

2010-03-22 Thread Peter Lind
You could consider suppressing errors for the duration of the problematic call - if indeed you're looking at a warning that doesn't grind everything to a halt. On 22 March 2010 18:01, Marten Lehmann lehm...@cnm.de wrote: Hello, we have a strange problem here: - Our ISP is merging STDERR and

Re: [PHP] Global Var Disappearing After Function

2010-03-22 Thread Peter van der Does
! From PHP.net: If a globalized variable is unset() inside of a function, only the local variable is destroyed. The variable in the calling environment will retain the same value as before unset() was called. [1] [1] http://php.net/manual/en/function.unset.php -- Peter van der Does GPG key

Re: [PHP] Filtering all output to STDERR

2010-03-22 Thread Peter Lind
Have you tried with http://dk2.php.net/manual/en/function.error-reporting.php or just the @ operator? On 22 March 2010 23:56, Marten Lehmann lehm...@cnm.de wrote: Hello, You could consider suppressing errors for the duration of the problematic call yes, but how? Regards Marten -- PHP

Re: [PHP] no svn checkout of the current PHP development repo?

2010-03-20 Thread Peter Lind
You should probably have a look at the internals list - there's a lot of discussion going on as to what should happen in terms of SVN structure. Regards Peter On 20 March 2010 12:32, Robert P. J. Day rpj...@crashcourse.ca wrote:  just for fun, i figured i'd check out the current PHP

Re: [PHP] web sniffer

2010-03-19 Thread Peter Lind
You should be able to do that by setting context options: http://www.php.net/manual/en/context.http.php On 19 March 2010 08:53, Jochen Schultz jschu...@sportimport.de wrote: Btw., when you use file_get_contets, is there a good way to tell the script to stop recieving the file after let's say 2

Re: [PHP] Re: PHP in HTML code

2010-03-19 Thread Peter Lind
On 19 March 2010 10:17, Michael A. Peters mpet...@mac.com wrote: I don't care what people do in their code. I do not like released code with short tags, it has caused me problems when trying to run php webapps that use short tags, I have to go through the code and change them. So what

Re: [PHP] Need routine to tell me number of dimensions in array.

2010-03-16 Thread Peter Lind
in the second example. Regards Peter On 16 March 2010 15:46, Robert Cummings rob...@interjinn.com wrote: Richard Quadling wrote: On 15 March 2010 23:45, Daevid Vincent dae...@daevid.com wrote: Anyone have a function that will return an integer of the number of dimensions an array has

Re: [PHP] Need routine to tell me number of dimensions in array.

2010-03-16 Thread Peter Lind
, that isn't touched. Or maybe I've gotten this completely backwards ... Regards Peter On 16 March 2010 17:12, Robert Cummings rob...@interjinn.com wrote: Peter Lind wrote: This is one example where references actually decrease memory usage. The main reason is the recursive nature

Re: [PHP] ldap_bind() connectivity

2010-03-15 Thread Peter Lind
You might want to check what the function outputs with: var_dump($ldapbind); after the call to ldap_bing(). That way you'll know what actually got returned from the function. On 15 March 2010 09:54, Ashley M. Kirchner ash...@pcraft.com wrote: Thanks to Jochem Mass for helping earlier to the

Re: [PHP] Change displayed file name to download

2010-03-14 Thread Peter Lind
You can set the name to display as you see fit, just change $filename to your liking right before the header() call. If you just want to cut the path, use basename($filename) Regards Peter On 14 March 2010 21:29, Php Developer pdevelo...@rocketmail.com wrote: Hi, I'm using the following code

[PHP] Using ArrayObject

2010-03-09 Thread Peter van der Does
What is the advantage of using ArrayObject to build a Registry class? -- Peter van der Does GPG key: E77E8E98 IRC: Ganseki on irc.freenode.net Twitter: @petervanderdoes WordPress Plugin Developer Blog: http://blog.avirtualhome.com Forums: http://forums.avirtualhome.com Twitter: @avhsoftware

[PHP] Registry class question.

2010-02-26 Thread Peter van der Does
) { return $this-_settings[$key]; } The question is what the pros and cons are compared to setting a new property with the value, like: storeSetting($key,$value) { $this-$key = $value; } and then instead of calling getSetting, you just use $this-Registry-property -- Peter van der Does GPG key

Re: [PHP] Stored Proc - Date not inserting into the Record

2010-02-25 Thread Peter
Change the input argument type as a varchar instead of date Ex: CREATE definer=`do...@`` PROCEDURE `Insert_OHC_Sun`(theDate VARCHAR(50),theDateRaw INT) surly it will work - Peter Don Wieland wrote: I nave 2 stored procedures: DROP PROCEDURE IF EXISTS `Insert_OHC_Sun`; DELIMITER $$ CREATE

Re: [PHP] Stored Proc - Date not inserting into the Record

2010-02-25 Thread Peter
FYI Please Pass your input within quotes $db-query(CALL Insert_OHC_Sun(*'*{$nDate}*'*,{$cDate})); surly it will work - Peter Don Wieland wrote: I nave 2 stored procedures: DROP PROCEDURE IF EXISTS `Insert_OHC_Sun`; DELIMITER $$ CREATE definer=`do...@`` PROCEDURE `Insert_OHC_Sun`(theDate

[PHP] Re: logic operands problem

2009-12-07 Thread Peter Ford
believe a programmer has never heard of that! (page==1 XOR page==2) AND page==3 -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http

[PHP] Re: Class not returning value

2009-11-25 Thread Peter Ford
the processing fails. -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Does PHP block requests?

2009-11-20 Thread Peter Ford
at least) give the same result. For reference, the server is Apache 2.2.10 on a SuSE linux 11.1 box using mod_php5 and mpm_prefork - is that part of the problem, and is there an alternative? -- Peter Ford phone: 01580 89 Developer fax

Re: [PHP] Lightweight web server for Windows?

2009-11-19 Thread Peter Ford
to be the first thing that goes on old laptops. They make really good low-power servers for stuff like DNS or even firewalling (as long as you can plug in enough network cards), but only when on mains power :( -- Peter Ford phone: 01580 89 Developer

[PHP] How to call DLL in Javascript

2009-11-17 Thread Peter
{ var myobject; myobject = new ActiveXObject(feedback.dll); }catch(e){ alert(e.description); return false; } } /script/head body input type=button value=Call the DLL onClick=comEventOccured() /body /html Regards Peter. -- PHP General Mailing List (http://www.php.net

[PHP] How to call a vc++ dll from a HTML form

2009-11-17 Thread Peter
? Please provide me your valuable inputs to solve this issue. Regards Peter Nathan Rixham wrote: Peter wrote: Hi All, I want to call dll in javascript I tried the following script, but i got the error message 'ActiveXObject is undefined' (Note : i have the feedback.dll in the same path only

[PHP] Re: fread() memory problems

2009-11-16 Thread Peter Ford
thought a vague idea might be better than nothing! -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] Multilingual website, texts in external JavaScriptproblem

2009-11-10 Thread Peter Ford
leledumbo wrote: I don't see why you can't use inline script in XHTML 1.0 Strict Because I don't know about CDATA, thanks. Glad to be of service! As another regular contributor to this list often points out, there's always something new to learn :) -- Peter Ford

Re: [PHP] Multilingual website, texts in external JavaScript problem

2009-11-09 Thread Peter Ford
here /*]]*/ /script That seems to validate fine in XHTML 1.0 Strict for me... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http

Re: [PHP] Spam opinions please

2009-10-23 Thread Peter Ford
://www.ashleysheridan.co.uk Unfortunately, it might also confound someone who doesn't speak the language. Admittedly, they would probably already be struggling with the rest of the site... I guess locale-dependent captchas are a possibility. -- Peter Ford phone: 01580

[PHP] Re: Fun with XSLT

2009-10-22 Thread Peter Ford
of the 'umbongo' template (only) 'f course, this is not tested, but I have used this idea in working code -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing

[PHP] Re: Fun with XSLT

2009-10-22 Thread Peter Ford
/ /xsl:template xsl:template match='{$choice}'xsl:apply-templates//xsl:template /xsl:stylesheet EoXSL $xslt = new DOMDocument(); $xslt-loadXML($xslScript); // ... etc... ? -- Peter Ford phone: 01580 89 Developer fax: 01580 893399

Re: [PHP] Spam opinions please

2009-10-20 Thread Peter van der Does
itself: http://blog.avirtualhome.com/2009/10/08/stop-spammers-in-your-htaccess/ -- Peter van der Does GPG key: E77E8E98 IRC: Ganseki on irc.freenode.net Twitter: @petervanderdoes WordPress Plugin Developer Blog: http://blog.avirtualhome.com Forums: http://forums.avirtualhome.com Twitter

[PHP] Re: avoid Denial of Service

2009-10-09 Thread Peter Ford
:) -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: php/mysql Query Question.

2009-09-16 Thread Peter Ford
... It's should be a simple operation to write a wrapper function to put HTML around the results. There might even be a PEAR extension or PHPClasses class to do it (I haven't looked yet) -- Peter Ford phone: 01580 89 Developer fax

Re: [PHP] Return XML attribute in DOM

2009-09-08 Thread Peter Ford
it incorrectly. I think I'm drowning in the deep end =/ Could you advise Gamesmaster ? It's a method on DomElement: http://uk3.php.net/manual/en/function.domelement-get-attribute.php and you need to tell it which attribute to get... :) -- Peter Ford phone: 01580 89

Re: [PHP] IRC and English

2009-09-02 Thread Peter Ford
(who couldn't even spell his own name consistently), without any more neologisms creeping in. -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List

Re: [PHP] CodeWorks 09

2009-09-02 Thread Peter Ford
NORTH WEST?? Seattle or Portland Oregon area would be great! Or even in the rest of the world - PHP is bigger than just the USA :) -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd

Re: [PHP] Re: unset() something that doesn't exist

2009-08-27 Thread Peter Ford
was at university - he had more flying hours than I had lived and flown just about everything with wings. A superb instructor, but far too much of a livewire to be a manager... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft

Re: [PHP] SESSIONS lost sometimes

2009-08-20 Thread Peter Ford
. -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Form Spam

2009-08-20 Thread Peter van der Does
it during the processing of the post. A second idea is to check the IP of the visitor during the POST process, with something like stopforumspam or project honey pot. If you want more info let me know. -- Peter van der Does GPG key: E77E8E98 IRC: Ganseki on irc.freenode.net Blog: http

[PHP] is there any way to get realpath cache hit ratio of php?

2009-08-11 Thread Peter Wang
hi, Is there any way to get realpath cache hit ratio of php? realpath_cache_size integer Determines the size of the realpath cache to be used by PHP. This value should be increased on systems where PHP opens many files, to reflect the quantity of the file operations performed.

[PHP] Is there any considerations for not putting php scripts in tmpfs?

2009-08-10 Thread Peter Wang
Hi php-general, sorry if it is a wrong lists for this question. I have read many articles/messages about using tmpfs store temp files, for example, php session data, smarty compied templates and so on. An obvious reason for that is: it doesn't matter about data loss caused by machine

Re: [PHP] Is there any considerations for not putting php scripts in tmpfs?

2009-08-10 Thread Peter Wang
hi,thanks for your reply. On Mon, Aug 10, 2009 at 9:54 PM, Richard Quadling rquadl...@googlemail.comwrote: 2009/8/10 Peter Wang ptr.w...@gmail.com: Hi php-general, sorry if it is a wrong lists for this question. I have read many articles/messages about using tmpfs store temp files

[PHP] Re: Clean break.

2009-08-03 Thread Peter Ford
will happily parse your format, so something like $tmp = date_create($theParts[0]); $theDate = $tmp-format(d/m/Y); $theTime = $tmp-format(h:i:s); should do it -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft

[PHP] Re: file upload question

2009-08-03 Thread Peter Ford
, and then *move* it back if the new version doesn't verify. That seems pretty safe to me... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread Peter Ford
fileinfo... Having said that, with file -i on my system, Word documents are 'application/msword' and Excel files are 'application/octet-stream' -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd

Re: [PHP] Broken IF behavior? (Changing the branch changes the evaluation)

2009-07-29 Thread Peter Ford
; } Anyway, the !$Ret branch is being executed because the fetch operation will return NULL (or FALSE or something equivalent) when there are no results. -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft

[PHP] Re: newbie question - php parsing

2009-07-23 Thread Peter Ford
if you wrote it that way, especially if it was in some kind of loop. Note that I prefer to keep HTML separate from PHP as much as possible because it helps me to read it and helps my editor check my syntax and HTML structure better... -- Peter Ford phone: 01580 89

[PHP] Re: Undefined Index ...confusion

2009-07-23 Thread Peter Ford
MyTable WHERE Foo='Bar'); -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [GD] Image errors

2009-07-15 Thread Peter Ford
/1.0 500 File is not an allowed image type'); -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] [GD] Image errors

2009-07-15 Thread Peter Ford
( $this-updir . $id . '.png' ); } hey, look, just 2 lines! But it doesn't convert the image from whatever came in to a JPEG output, which is what the OP's code appears to be trying to do (and possibly ought to work...) -- Peter Ford phone: 01580 89

[PHP] Re: Scope woe

2009-06-30 Thread Peter Ford
otherObject { private $firstobject; function __construct() { $this-firstobject = $GLOBALS['firstobject']; } static function messwithotherthings () { $this-firstobject-propertycontainingobject-methodinsidethatobject(); } } -- Peter Ford

Re: [PHP] Re: Scope woe

2009-06-30 Thread Peter Ford
, and is reasonable to the OOP purists... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] I've some doubts if I should go with 5.2 or go alreadywith 5.3 (for a course)

2009-06-23 Thread Peter Ford
... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Echo result in a loop on each instance

2009-06-23 Thread Peter Ford
/correct to do this? call flush() after each echo to flush the buffer to the client. That should work... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General

[PHP] Re: accessing level above $_SERVER['DOCUMENT_ROOT']

2009-06-19 Thread Peter Ford
have used dirname($_SERVER[DOCUMENT_ROOT]), but in a define, that's not going to work. I think you're stuck with your inelegance... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst

Re: [PHP] populate form input option dropdown box from existing data

2009-06-18 Thread Peter Ford
']}' $sel{$row['category']}/optionbr /; } Unless the code is seriously performance critical, I still think variable interpolation is nicer to read than all those quotes and commas, and it keeps the HTML structure together better... Good luck -- Peter Ford phone: 01580

[PHP] Re: aesthetic beauty in conception, execution

2009-06-18 Thread Peter Ford
important, you know... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Search/Replace in entire database?

2009-06-15 Thread Peter Ford
the database, at least with respect to the product names... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

[PHP] Re: Dynamic Titles

2009-06-12 Thread Peter Ford
{$config[HTTP_SERVER]}help.php: according to whether you like interpolation in quotes or not. I recommend finding a development environment or editor that does syntax highlighting - that would catch all of these problems before you even save the file. -- Peter Ford phone

[PHP] Re: Any conflict with $_POST when 2 users concurrently submitting the same form using POST method?

2009-06-10 Thread Peter Ford
not mean that it is shared by separate requests - it is not even shared by requests in the same session. It just means that it is already declared and you don't need to use the global keyword to access it in your PHP pages. -- Peter Ford phone: 01580 89 Developer

Re: [PHP] Anyone know whats the best way to learn PHP

2009-06-01 Thread Peter van der Does
down and reading books, it's by actually programming/speaking the language. -- Peter van der Does GPG key: E77E8E98 IRC: Ganseki on irc.freenode.net Blog: http://blog.avirtualhome.com Forums: http://forums.avirtualhome.com Jabber ID: pvanderd...@gmail.com GetDeb Package Builder http

[PHP] PHP class question

2009-05-21 Thread Peter van der Does
framework_class { $var core; // PHP4 constructor function A { $this-core = new core(); $this-core-go(); } } The question I have, is this a good solution, is it the only solution or are there different ways to tackle this? As you might see it needs to run in PHP4. -- Peter van der Does GPG

Re: [PHP] Re: PHP class question

2009-05-21 Thread Peter van der Does
to be an extension of the framework class. -- Peter van der Does GPG key: E77E8E98 IRC: Ganseki on irc.freenode.net Blog: http://blog.avirtualhome.com Forums: http://forums.avirtualhome.com Jabber ID: pvanderd...@gmail.com GetDeb Package Builder http://www.getdeb.net - Software you want for Ubuntu -- PHP

[PHP] Re: Parsing of forms

2009-05-18 Thread Peter Ford
:) ) -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Software to read/write Excel to CD?

2009-05-15 Thread Peter Ford
links are to satellites... (expensive). I suspect that a USB key is a better option (and more physically portable) than a UFB CD. But why write an Excel spreadsheet - why not save the data in something more portable like CSV that ExCel and read and write to once you are back at base? -- Peter

Re: [PHP]Cannot output the same data from text file in PHP

2009-05-14 Thread Peter Ford
as $line_num = $line) { echo $line.\n; } echo/td/tr/table; ? -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe

[PHP] When is __destruct called on an object in $_SESSION ?

2009-05-14 Thread Peter Ford
. Any ideas about working around that? -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] When is __destruct called on an object in $_SESSION ?

2009-05-14 Thread Peter Ford
Stuart wrote: 2009/5/14 Peter Ford p...@justcroft.com: I'm sure I've seen something about this before, but I can't find it: I'm creating a file which needs to live for the duration of a session, and ONLY the duration of the session. I made a little call which holds the name of the file

Re: [PHP] Re: Trying to create a colortable - what am I missing here?

2009-05-12 Thread Peter Ford
a truecolor image 4096 pixels square is going to take a LOT of memory, and it will take a while to download to the client, AND it is 4096 pixels square! That's a fair bit bigger than most screens... I suspect the OP is going to have to rethink this... -- Peter Ford

Re: [PHP] Can not read write file from Desktop

2009-05-12 Thread Peter Ford
(which they probably are not, unless the web server is configured to keep them safe) -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http

Re: [PHP] How to deal with identical fields in db

2009-05-06 Thread Peter Ford
how it works? Cheers, tedd It always surprises me how many people need to have database normalisation explained to them - it seems obvious to me... (and tedd, clearly!) -- Peter Ford phone: 01580 89 Developer fax: 01580

Re: [PHP] How to deal with identical fields in db

2009-05-06 Thread Peter Ford
tedd wrote: At 3:14 AM -0700 5/6/09, Michael A. Peters wrote: Peter Ford wrote: tedd wrote: (and I added in some extra bits...) You need to normalize. Authors should have an unique id in an authors table. The authors table has all the specific information about authors, but not the books

[PHP] Re: graphical integrated development environment recommendations?

2009-05-05 Thread Peter Ford
that way inclined), and it's free. -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] object literals

2009-05-01 Thread Peter Ford
, but PHP doesn't have a object literal syntax AFAIK. You could use JSON, $foo = json_decode('{a:1,b:3}'); but I guess that's not much better than Richard's suggestion. -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft

[PHP] Re: error in printer_open function

2009-04-28 Thread Peter Ford
Network The ; at the start of the configuration line in php.ini is a comment character... Remove that, restart the web server, and you might see things working better. -- Peter Ford phone: 01580 89 Developer fax: 01580

[PHP] Multiple return statements in a function.

2009-04-23 Thread Peter van der Does
='Not Array'; } return $return; } Example of the other method: function check($a) { if ( is_array( $a ) ) { return ('Array'); } else { return ('Not Array'); } } What is your take? And is there any benefit to either method? -- Peter van der Does GPG key: E77E8E98 Blog: http

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-14 Thread Peter Ford
, and -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Larger fonts...

2009-04-08 Thread Peter Ford
designed. Replacing them with just words is not very good - it makes them all different sizes, which messes up the layout. I could remove the shaded background and see if that helps. Other points I will work on. Cheers -- Peter Ford phone: 01580 89 Developer

Re: [PHP] Larger fonts...

2009-04-08 Thread Peter Ford
, Before you get slated by the list, I'm guessing you meant to send this to someone else? (It came to me via the PHP-General Mailing List. Tom 2009/4/8 Peter Ford p...@justcroft.com mailto:p...@justcroft.com Patrick, The reason you think the fonts are too small is that you have

[PHP] Re: PHP class or functions to manipulate PDF metadata?

2009-04-07 Thread Peter Ford
O. Lavell wrote: Peter Ford wrote: O. Lavell wrote: [..] Any and all suggestions are welcome. Thank you in advance. So many people ask about manipulating, editing and generally processing PDF files. In my experience, PDF is a write-once format - any manipulation should have been done

<    1   2   3   4   5   6   7   8   9   10   >