[PHP] Re: phpDesigner 2008?

2008-11-18 Thread Peter Ford
trying to get debugging to work. I've just got a development release of Netbeans 6.5 and the PHP support is really quite good now (I wasn't impressed with the 6.1 version I tried). I've used various incarnations of Netbeans (since about 3.5) for Java, and I've always liked it... I

Re: [PHP] Netbeans 6.5 WAS: phpDesigner 2008?

2008-11-28 Thread Peter Ford
ipse plugins?!? >> Seriously? That's $150 at best) >> >> Daevid. >> http://www.daevid.com <http://daevid.com> >> >> > I've installed it but have yet to use it. I am having a good time with > APTANA Studio, though there is a learning curve >

Re: [PHP] Parsing XML

2008-12-01 Thread Peter Ford
read in as an include. Or better yet, if you use the XSL classes, you can register PHP functions and then call them within your XSL directly. That could potentially handle the validation you required, and even do the database inserts. I'm looking into using something like that on a

Re: [PHP] A MySQL Question

2008-12-09 Thread Peter Ford
nction doesn't say who's doing the creating, it just checks for >> the existence of the universe. > > Lol, I agree, the function bigbang() doesn't need to be implemented (or it > could be empty if it needs to be there for this line to work), because by > definition,

Re: [PHP] Re: Poll of Sorts: Application Frameworks--Zend, Cake etc

2008-12-12 Thread Peter Ford
all documented by the VirtualBox people) and the server is visible just like it was a real machine... So I can take this machine around, and (without needing any network connection) show off the app in IE, Firefox, Opera or Chrome without having to run IIS. Well, I thought it was cool, anyway :( -- 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] Secure uploads tutorial

2008-12-16 Thread Peter Ford
tecting IE users from malicious code - if they care then they shouldn't be using IE, and if they don't care they shouldn't be on the internet. Tim's efforts do seem to be a bit of overkill... -- Peter Ford phone: 01580 89 Developer

Re: [PHP] Couple of beginner questions

2009-01-12 Thread Peter Ford
ly beautiful web sites AND really elegant code libraries. But then the dot-com thing all fell over and it was too expensive for most people to pay for three teams and a couple of managers just to build a web shop... -- Peter Ford phone: 01580 89 Developer

[PHP] Re: "use strict" or similar in PHP?

2009-02-27 Thread Peter Ford
WHERE username=$1'; $params = Array('pete'); $result = pg_query_params($sql,$params); That way you get the safest handling of values without any tedious messing about with manually escaping strings. I suspect that under the hood it actually prepares a statement and then executes it

[PHP] Re: preg_match and dates

2009-03-02 Thread Peter Ford
ons you can deal with those by hand. As for your expectation of a museum: the reputation of "dusty old rooms full of stuff" is not entirely un-earned, so I wouldn't expect their databases to be spotless! -- 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] whoami explanation

2009-03-04 Thread Peter Ford
for FILE in $LIST do cp $FILE $FILE.bak done to make a backup copy of each of the files. In PHP, something like should do much the same thing (if permissions etc. allow...) Note that in both of these examples, filenames with spaces in them will blow the whole thing up :( -- Peter

Re: [PHP] Web Development/Application Analysis

2009-03-20 Thread Peter Ford
... Me: ... that you never sent to me ... Boss: Oh. 2 Goes like this: Boss: How long will it take to code that up then? Me: An hour. Boss: Really? Me: No, a year. Boss: Eh? Me: Actually, somewhere between the two, I suspect... Boss wanders off, tearing out some more of the little hair remain

Re: [PHP] XML data extraction

2009-04-02 Thread Peter Ford
t; > > www.willandy.co.uk > Oh, I thought of another one: Write some XSL to turn you XML into SQL. Write some code to run that SQL. HTH Pete -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft Internation

Re: [PHP] XML data extraction

2009-04-02 Thread Peter Ford
is a very vague question, and this list is not normally well disposed to writing people's programs for them, especially when they look like college assignments. Cheers Pete -- Peter Ford phone: 01580 89 Developer fax: 01580 8933

[PHP] Re: Button id's - firefox and IE different ?

2009-04-02 Thread Peter Ford
ifferent delete buttons act on their respective bits of the form. Or: bite the bullet and use javascript onclick events to set a hidden field which signals what the action is supposed to be in the back end. -- Peter Ford phone: 01580 89 Developer

[PHP] Re: Button id's - firefox and IE different ?

2009-04-02 Thread Peter Ford
Peter Ford wrote: > Angus Mann wrote: >> Hi all. >> >> I want to have several delete buttons with just one form, and depending on >> which button is pressed, one of several items is deleted. >> >> So I need multiple submit buttons for 1 form, each displaying

Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread Peter Ford
eed an ID for each of the inputs then you'll have to generate a unique one for each. To the rest of the list: I'm not too happy about having stuff inside the [] either - is that some syntax I've missed or is it just wrong? -- Peter Ford phone: 0158

Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread Peter Ford
Peter Ford wrote: > Michael A. Peters wrote: >> Shaun Thornburgh wrote: >>> Hi, >>> >>> We are getting errors when trying to vaildate our HTML due to the [ >>> character when using Post Arrays: >>> >>> Line 173, Column 65: >>

[PHP] Re: Java applet clearing session variables?

2009-04-03 Thread Peter Ford
cess to, or does not attempt to access, the cookie that carries the session ID. You may have to prime the applet with the session ID somehow before it runs so that it can generate a PHP_SESSIONID (or whatever it is) cookie to send back to PHP... -- Peter Ford ph

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

2009-04-06 Thread Peter Ford
t I found so far is PDFTK (http://www.pdfhacks.com/pdftk/) which is a command-line tool that you could presumably call with exec or whatever... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd.,

[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 experienc

[PHP] Larger fonts...

2009-04-08 Thread Peter Ford
need to be properly 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: 01

Re: [PHP] Larger fonts...

2009-04-08 Thread Peter Ford
te: > Pete, > 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 mailto:p...@justcroft.com>> > > Patrick, > > The reason you

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

2009-04-14 Thread Peter Ford
tandard-compliant mode in IE7. At least then I only have to worry about the JavaScript incompatibilities, and the table model, and the event model, and -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft Intern

[PHP] Re: error in printer_open function

2009-04-28 Thread Peter Ford
file > > and write a sim ple page as- > > > > > > Prabal Cable 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 w

Re: [PHP] object literals

2009-05-01 Thread Peter Ford
. Eg: > > $foo = createObject(array('key' => 'value')); > > It's not great, 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 no

[PHP] Re: graphical integrated development environment recommendations?

2009-05-05 Thread Peter Ford
Netbeans: works on Windows or Linux (or OSX, if you're that way inclined), and it's free. -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Maili

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

2009-05-06 Thread Peter Ford
hat has the book's id and look up > each author via their author id. > > Do you see 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... (a

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

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

2009-05-12 Thread Peter Ford
creating 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
ed in as root unless one is doing a short-lived system maintenance task: certainly one should not doing development work there... I know it sounds dictatorial, but it's (part-way to) best practice... Those config files should be in something like /etc/apache/extra, perhaps, if they are not safe i

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

2009-05-14 Thread Peter Ford
a PHP problem, but a HTML problem: First, HTML compresses white space into just one space, so all of those leading spaces on line 2 are lost. Second, you are (probably) displaying using a proportionally-spaced font, so the narrow pipeline characters take up less width than the let

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

2009-05-14 Thread Peter Ford
n the session: I was then expecting TFR::__destruct() to only be called when the session was closed, with either a timeout, or a session_destroy() call. But it looks like the object destructor is called at the end of every page. Any ideas about working around that? -- Peter Ford

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

2009-05-14 Thread Peter Ford
Stuart wrote: > 2009/5/14 Peter Ford : >> 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. >>

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

2009-05-15 Thread Peter Ford
that the only com 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

[PHP] Re: Parsing of forms

2009-05-18 Thread Peter Ford
x27;d missed a [] on the name is the answer. As I like to say in other areas of life (especially to my children), "stop whining and get on with it!" ( sorry :) ) -- 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] formatting - design question

2009-06-05 Thread Peter Ford
t" site. >> >> Cheers, >> >> tedd >> >> > If only it were that simple. > When one is developing, one is always changing. And even when you're > finally "live and on the air", you will still be changing or else your > site will die

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

2009-06-10 Thread Peter Ford
of $_POST in its own bit of memory. The two posts can happen at the same time and they will still be completely independent. The fact that $_POST is called "superglobal" does not mean that it is shared by separate requests - it is not even shared by reque

[PHP] Re: Dynamic Titles

2009-06-12 Thread Peter Ford
RVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; > > Cheers Also the line: case "$config[HTTP_SERVER]help.php" : probably won't work very well : should be either case $config[HTTP_SERVER].'help.php': or case "{$config[HTTP_SERVER

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

2009-06-15 Thread Peter Ford
tty time-consuming - sorry! Then make a business case for the project of normalising the database, at least with respect to the product names... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd.,

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

2009-06-18 Thread Peter Ford
echo "", $row['category'], ""; } } More succinctly: while ( $row = mysql_fetch_assoc($results) ) { $sel = in_array($row['id'], $selected) ? "selected='selected'":""; echo "{$row['category']}&qu

[PHP] Re: aesthetic beauty in conception, execution

2009-06-18 Thread Peter Ford
lis pas Française... I18N - it's 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 unsubsc

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

2009-06-19 Thread Peter Ford
x27;, $_SERVER{"DOCUMENT_ROOT'].'/../logs'); > > it works but I think it's not good solution. or at least - it's not nice > solution :-) > > suggestions? > > afan > > Outside of a define, you could have used dirname($_SERVER["DO

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
g > - garbage collector to handle cyclic references > - PHAR > - goto > > Cheers, > Rob. I read that last bit as PHAR togo Need coffee... -- Peter Ford phone: 01580 89 Developer fax: 01580 89

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

2009-06-23 Thread Peter Ford
thought ob_start > does this but I have tried it and not getting what I want. > > Is there some other way/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

[PHP] Re: Scope woe

2009-06-30 Thread Peter Ford
tobject = $GLOBALS['firstobject']; } static function messwithotherthings () { $this->firstobject->propertycontainingobject->methodinsidethatobject(); } } -- 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] Re: Scope woe

2009-06-30 Thread Peter Ford
iningObject->methodInsideThatObject(); } } I think that works, and is reasonable to the OOP purists... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP Gene

Re: [PHP] [GD] Image errors

2009-07-15 Thread Peter Ford
ontent-type: image/jpeg'); imagejpeg($immagine,null,100); imagedestroy($immagine); break; } } header('HTTP/1.0 500 File is not an allowed image type'); -- Peter Ford phone: 01580 89 Developer fax: 01580

Re: [PHP] [GD] Image errors

2009-07-15 Thread Peter Ford
t_type( $this->updir . $id . > '.png' ) ); > readfile( $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 (

[PHP] Re: newbie question - php parsing

2009-07-23 Thread Peter Ford
e because it helps me to read it and helps my editor check my syntax and HTML structure better... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mail

[PHP] Re: Undefined Index ...confusion

2009-07-23 Thread Peter Ford
$resource = pg_query("SELECT ID, Foo FROM MyTable WHERE Foo='Bar'"); $data = pg_fetch_all($resource) gives me an array $data of rows like $data[0]['id'] = '1' $data[0]['foo'] = 'Bar' To make sure $data[] has fields named ID

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

2009-07-29 Thread Peter Ford
but when there's no content, you see no result... It always looks odd to me to have empty if branches - why do you not just write if ($Ret) { return $Ret; } Anyway, the !$Ret branch is being executed because the fetch operation will return NULL (or FALSE or something equivalent) when th

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

2009-07-30 Thread Peter Ford
cel document. > > thnx, > Christoph Have you tried using 'file -i' from the command line: after all you are looking for a MIME type with your fileinfo... Having said that, with file -i on my system, Word documents are 'application/msword' and Excel files are '

[PHP] Re: Clean break.

2009-08-03 Thread Peter Ford
e full text for this part looks like: > > 10.0.0.1 - - [21/Jul/2009:00:00:47 -0300] ... more stuff here > > Anyway, any help would be appreciated. > > thanks. As far as I can tell from a brief test, date_create will happily parse your format, so something like

[PHP] Re: file upload question

2009-08-03 Thread Peter Ford
as).. > > is that my only option? any suggestions? I'd suggest you *copy* the old file (if it exists) to archive anyway, and then *move* it back if the new version doesn't verify. That seems pretty safe to me... -- Peter Ford phone: 01580 89333

Re: [PHP] SESSIONS lost sometimes

2009-08-20 Thread Peter Ford
gets one. As far as PHP knows, requests from different tabs with the same PHPID cookie are requests from the same place in the same session. To get a different session you need a different instance of the browser - that's the way browsers have been coded to work. It's not too hard with Fir

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

2009-08-27 Thread Peter Ford
but avoid the management duties. I had the pleasure of meeting one of these chaps when I 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

Re: [PHP] IRC and English

2009-09-02 Thread Peter Ford
are two lengthy: "of", "an", "to", "it" (etc.) Words that are too lengthy: "antidisestablishmentarianism", "internationalisation" and that other one that begins with "flocci..." something Sorry tedd :) +1 on hating l33tsp34k and txtspk thoug

Re: [PHP] CodeWorks 09

2009-09-02 Thread Peter Ford
we run out or the price goes >> up! >> >> For more information and to register, you can go to http://cw.mtacon.com. >> Hope to see you there! >> >> -Elizabeth >> > > Is their anything like this in the Pacific NORTH WEST?? > > Se

Re: [PHP] Return XML attribute in DOM

2009-09-08 Thread Peter Ford
""); > } > echo(""); > > __ > > I'm replacing hasAttributes() with getAttribute() but its throwing me an > error, I'm probably using it incorrectly. > I think I'm drowning in the deep end =/ >

[PHP] Re: php/mysql Query Question.

2009-09-16 Thread Peter Ford
ysql_ functions figured that the user could sort out making HTML from the data returned... 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

[PHP] Re: avoid Denial of Service

2009-10-09 Thread Peter Ford
advance. > > Unplug the network cable :) -- 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: Fun with XSLT

2009-10-22 Thread Peter Ford
; $xmlDom->load('some_document_that_has_an_umbongo_tag.xml'); echo $xslt->transformToXML($xmlDom); you should get the results of the 'umbongo' template (only) 'f course, this is not tested, but I have used this idea in working code -- Peter Ford

[PHP] Re: Fun with XSLT

2009-10-22 Thread Peter Ford
> string for a variable ? > > Any ideas ? > > Thanks Gamesmaster, > Matt > Despite my other post, of course you can generate the XSL on the fly: http://www.w3.org/1999/XSL/Transform";> EoXSL $xslt = new DOMDocument(); $xslt->

Re: [PHP] Spam opinions please

2009-10-23 Thread Peter Ford
e. > > Thanks, > Ash > http://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-

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

2009-11-09 Thread Peter Ford
Inline javascript here /*]]>*/ 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 (

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

[PHP] Re: fread() memory problems

2009-11-16 Thread Peter Ford
ngs would be involved for that, but no-one else has responded so I thought a vague idea might be better than nothing! -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP Genera

Re: [PHP] Lightweight web server for Windows?

2009-11-19 Thread Peter Ford
at always seems 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: 0158

[PHP] Does PHP block requests?

2009-11-20 Thread Peter Ford
on of course - not much use!) Different browsers (Firefox, IE, Chrome 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

Re: [PHP] Does PHP block requests?

2009-11-20 Thread Peter Ford
Ford, Mike wrote: >> -Original Message- >> From: Peter Ford [mailto:p...@justcroft.com] >> Sent: 20 November 2009 15:18 >> To: php-general@lists.php.net >> Subject: [PHP] Does PHP block requests? >> >> I have a tricky problem. >> >> I&

[PHP] Re: Class not returning value

2009-11-25 Thread Peter Ford
s->responseArray; > } > private function sendWithCurl($url, $postData) { > if (!is_resource($this->connection_handle)) { >// Try to create one >if (!$this->connection_handle = curl_init()) { > trigger_error('Could not start new CURL instance'); >

[PHP] Re: logic operands problem

2009-12-07 Thread Peter Ford
e for any help! > > Merlin Surely what you need is xor (exclusive-or) I can't 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 Just

[PHP] PHP + PostgreSQL: pg_query not returning the expected result for this (edge) case:

2013-02-06 Thread Peter Ford
&& pg_numrows($result)) { echo pg_numrows($result).PHP_EOL; echo pg_fetch_result($result, 0, 0).PHP_EOL; ) ?> Tells me there that although the $result resource is valid, there are no rows and therefore no result to fetch (PHP Warning: pg_fetch_result(): Unable to

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Peter Ford
igit.php An important note: This function expects a string to be useful, so for example passing in an integer may not return the expected result. However, also note that HTML forms will result in numeric strings and not integers. See also the types section of the manual. -- Jim Integers can be n

Re: [PHP] Re: Preferred Syntax

2011-12-14 Thread Peter Ford
ime, and mix various styles, as long as it's readable! Cheers Pete -- Peter Ford, Developer phone: 01580 89 fax: 01580 893399 Justcroft International Ltd. www.justcroft.com Justcroft House, High Street, Staplehurst, Kent TN12 0AH United Kin

Re: [PHP] Is it possible to restart Windows Apache (service) on a PHP script?

2007-10-22 Thread Peter Ford
You could try using exec to set up an "AT" job with a short delay which will then run 'net apache restart' - I'm not a total windows guru so I can't give you the exact recipe... Something like exec('AT 12:00 "net apache restart"'); Check the documentation on the AT command... One possible extra

Re: [PHP] Benchmarking check to see if array key is set

2007-11-08 Thread Peter Ford
Ford, Mike wrote: > On 06 November 2007 12:57, Christoph Boget wrote: > >> Consider the following test code: > > [...snip...] > >> Running that I found that >> >> if( isset( $myArray[$key] )) >> >> is faster than >> >> if( array key exists( $key, $myArray )) >> >> is faster than >> >> if( $myAr

[PHP] Re: PHP ide?

2007-11-08 Thread Peter Ford
Hulf wrote: > Just wondering if anyone uses an IDE and if so what ones? > > Ta, > > H. Quanta+, with KDESVN for version management... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP ide?

2007-11-12 Thread Peter Ford
I've tried to use Eclipse PDT, and it's just generally horrible - the All-in-one has no Subversion support and no SSH support for deploying to the server properly. The debugging support worked well on the windows version, but I couldn't get it to work from Linux (with the same web server...) And th

Re: [PHP] PHP ide?

2007-11-13 Thread Peter Ford
Lester Caine wrote: > Peter Ford wrote: >> I've tried to use Eclipse PDT, and it's just generally horrible - the >> All-in-one >> has no Subversion support and no SSH support for deploying to the server >> properly. The debugging support worked well on the wind

Re: [PHP] [NEWBIE GUIDE] For the benefit of new members

2007-11-16 Thread Peter Ford
> > I was all ready to jump on Point #6 to disagree until I read the > next paragraph, updating that with the correct information. PHP can > find out the OS of the system on which the browser is running. > Strictly speaking, PHP can only find out what the browser tells it - that includes th

Re: [PHP] overloading members. aghhh!!!

2007-11-20 Thread Peter Ford
Jochem Maas wrote: > Kiketom wrote: >> Hi all. >> Yesterday i have looking for the overloading members >> >> Member overloading >> void __set ( string name, mixed value ) >> mixed __get ( string name ) >> >> As an example i put this code: >> >> class foo >> { >> private $ID; >> private $Nam

Re: [PHP] shared memory access - shmod_open

2007-12-07 Thread Peter Ford
Richard Lynch wrote: > On Thu, December 6, 2007 2:44 am, Rolf_ wrote: >> I have a problem working with shmop_open() in a Solaris environment. >> The >> following cli-script works fine, except shmod_open returns a warning >> 'unable >> to attach or create shared memory segment': >> >> > $sem = "/tmp

Re: [PHP] Assign variable to a block of html code

2007-12-20 Thread Peter Ford
You could just swap all the double quotes in the HTML tags for single quotes - that would work in this instance... $myblokvar = " ... "; Or perhaps a HereDoc syntax: $myblokvar = << ... EndOfMyHTMLBlock; Then you don't need to worry about what quotes you use, and if you start putting stuff

[PHP] Re: Can't find .php3 files

2008-01-09 Thread Peter Ford
Jim wrote: > I'm sure this is a FAQ but I can't seem to come up with the right search > keys to dig it out. > I'm trying to help a friend migrate his application to php 5 from > another system. The problem seems to be that he references files > (require, include, etc) that have a .php3 extension,

Re: [PHP] Exception thrown without a stack frame

2008-01-25 Thread Peter Ford
Jochem Maas wrote: > Jochem Maas schreef: >> I'm getting exceptions thrown without a stackframe. I understand what >> this >> means but not how it can happen given the following: >> >> 1. *every* frontend script on the site is wrapped in a try/catch block >> 2. I have set an exception handler to du

Re: [PHP] Anyone else doing PHP on Symbian?

2008-02-06 Thread Peter Ford
Paul Scott wrote: > On Tue, 2008-02-05 at 13:29 -0500, Daniel Brown wrote: >> Still debating what >> device I'll get next, but I want to use it as a mobile server myself. >> I had been working on a bound-for-trash PDA doing the same a while >> back, but with what we'll refer to as "limited result

[PHP] Re: XSLTProcessor without validation

2008-02-15 Thread Peter Ford
Siegfried Gipp wrote: > Hi, > > i still got no answer. Maybe i did not see it, altough i'm trying to read any > single post. But may be i overlooked it due to high traffic. So now i have > set up a filter (hopefully) copying answers to another folder. > > Here is the question: Is it possible to

[PHP] Re: Create collections of objects

2008-02-15 Thread Peter Ford
ded) condition, indexed by the element Id (useful for making HTML lists, for example). In fact, I have a base class which implements this by class introspection - filling the properties of objects which extend it by mapping them to the database fields... -- 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] Re: Create collections of objects

2008-02-15 Thread Peter Ford
Emilio Astarita wrote: > Peter Ford <[EMAIL PROTECTED]> writes: > >> Emilio Astarita wrote: >>> Hi people, >>> >> A static method should still be able to set values of private members. I do >> something like: >> ... >> > > Thank

Re: [PHP] Sending XML to MSIE7

2008-02-15 Thread Peter Ford
e URL, to be certain... That seems to work - IE7 sees the xml-stylesheet PI and doesn't then try to mangle the XML in it's own special way. Only problem is the extra hit on the server to get the XSLT... :( -- Peter Ford phone: 01580 89 Developer

Re: [PHP] Re: temporary error

2008-02-25 Thread Peter Ford
g me then fine. > > But the truth is it is harming all of us. Do we really want our > children taught about a magical sky-god who insists on genital > mutilation at birth? Do we want influences into our governments that > inhibit natural advances in modern scien

Re: [PHP] Transferring files between computers using php

2008-03-07 Thread Peter Ford
new directories sshfs B:/path_to_where_the_file_ismount_point_for_B sshfs C:/path_to_where_the_file_goes mount_point_for_C # Copy the file across: repeat this step every few seconds (cron job?) cp mount_point_for_B/the_file_to_copy mount_point_for_C # Unmount the SSHFS mounts when you'

[PHP] Re: fwrite/fclose troubles

2008-03-20 Thread Peter Ford
ay you were constructing the file name: interpolating the variables in a string is slightly less efficient than concatenating the bits together, and there are possible gotchas when using the $this->variable structure in a string like that. An alternative syntax is to escape the variables with

[PHP] Re: Pattern etc to reduce duplicated validation?

2008-03-27 Thread Peter Ford
d value for bar in class foo'); } } } // = Script = $var = $_POST['var']; $foo = new foo(); try { $foo->setBar($var); } catch (Exception $e) { echo 'An error occurred: ',$e->getMessage(),"\n"; } Take a look at http://www.php.net/manual/en/language.exc

Re: [PHP] Re: optimilize web page loading

2008-03-27 Thread Peter Ford
,$foo; is actually the fastest, because the strings are not concatenated before output. I think that was the overall summary - I can't locate the original post to verify (or attribute) but it's in this list somewhere... Cheers -- Peter Ford phone: 015

Re: [PHP] Re: optimilize web page loading

2008-03-28 Thread Peter Ford
Eric Butera wrote: On Thu, Mar 27, 2008 at 12:41 PM, Peter Ford <[EMAIL PROTECTED]> wrote: Jason Pruim wrote: > > On Mar 27, 2008, at 11:05 AM, Shawn McKenzie wrote: >> Al wrote: >>> Good point. I usually do use the single quotes, just happened to key

[PHP] Re: putting variables in a variable

2008-03-28 Thread Peter Ford
nd the src attribute to avoid those ugly backslashes ... $body .=" "; Might be better in this case to use heredoc syntax ... $body .<< EndOfChunk; -- Peter Ford phone: 01580 89 Developer fax: 015

Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Peter Ford
View Generated Source tool which will show you what Firefox thinks your page actually looks like after the JS has run... 2. Check that the TD you are loading with content is actually inside the tags - otherwise the inputs won't be included in the request/post variables... Cheers Pete -- Pe

Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-09 Thread Peter Ford
Peter Ford wrote: Mark Weaver wrote: Ryan S wrote: Hey everyone, A bit of a puzzle here, dont know if this is a JS problem or PHP or FF or just me. (My money is on the last one :p ) Here's what I am trying to do: In a form I have a listbox with the values 1-5, and unde

  1   2   >