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

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

[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] 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'); >

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] 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] 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] 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] 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

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] 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-

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

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

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 =/ >

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] 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] 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] 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

[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

[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

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 '

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

[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

[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

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 (

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] 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

[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

[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

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: 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

[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

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: 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.,

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

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: 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] 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

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. >>

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

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] 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] 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] 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

[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] 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: 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] 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

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

[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

[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] 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: 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

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: >>

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

[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

[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

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

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] 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

[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

[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

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

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] 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] 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] 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] 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 >

[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] It's Sunday, and I'm bored...

2008-11-10 Thread Peter Ford
evant to the original thread) when I commit code to the repository, it asks for a comment to attach to the commit. That's really useful (as I think Richard finds) when I come to do my timesheets, which is usually less often than my commits... Cheers Pete -- Peter Ford

[PHP] Re: PHP Dev Facts

2008-10-22 Thread Peter Ford
*Anything else you use frequently in you're PHP'ing that's worth > mentioning:* > > ps: I'm not asking for any kind of research project, just interested and > interested to know what's most common + might learn something/find some > new tools/toys! > &g

[PHP] Re: 1 last error to fix before the application is done!

2008-10-14 Thread Peter Ford
& isset($_SESSION['userInfo']['loggedIn'] && $_SESSION['userInfo']['loggedin'] == TRUE) { You can probably short-circuit some of that - for example if $_SESSION['userInfo']['loggedIn'] is only ever set to TRUE (and is not se

Re: [PHP] ASCII Captcha

2008-09-11 Thread Peter Ford
Anything else? Cheers, tedd why don't people just check for x/y co-ord's on an image submit instead? Not so good if you're using lynx, or if you're blind, I guess. -- Peter Ford phone: 01580 89 Developer fax: 0

Re: [PHP] Length of Exception text?

2008-09-09 Thread Peter Ford
You want the php.ini setting: log_errors_max_len It defaults to 1024 characters: presumably that includes the preamble giving you 1015 or so to play with. If you set it to zero then you get unlimited log messages. 'course that might fill your logs up a bit... -- Peter Ford

Re: [PHP] Google Chrome

2008-09-05 Thread Peter Ford
er to test on Wine or Mono? -Shawn Tried on Wine (version 0.9.60 on OpenSuse) and I could even get the downloader to start. To be fair, I've never really got anything to work on Wine... -- Peter Ford phone: 01580 89 Developer

Re: [PHP] Re: php File upload

2008-08-08 Thread Peter Ford
am or some such) and the actual size of the data sent in the request is therefore likely to be some fraction bigger than the file itself (like 33% bigger for base-64 encoding) -- Peter Ford phone: 01580 89 Developer fax: 01

[PHP] Re: RSS Feed using PHP/MySQL errors

2008-08-07 Thread Peter Ford
use one of: die("ERROR--CAN'T CONNECT TO SERVER"); die('ERROR--CAN\'T CONNECT TO SERVER'); die('ERROR--CANNOT CONNECT TO SERVER'); // English is a very powerful language!! and similar for the other message... There may be other error

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-08-01 Thread Peter Ford
string: e.g. $foo = 'You need to pay $dollars...'; compared with $foo = "You need to pay \$dollars..."; Again, it depends on you view of backslashes. -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justc

Re: [PHP] Code beautifier

2008-07-28 Thread Peter Ford
nstead, I would say But -- pause -- that didn't happen. So, I write it: But, that didn't happen. It's arguably more correct in this case to use ellipsis: But ... I could be wrong :) -- Peter Ford phone: 01580 89 Developer

Re: [PHP] Trailing Spaces Problem

2008-07-18 Thread Peter Ford
preg_split('/\s+/',$string); echo "1: ". $data[0] . " 2: " . $data[1] . " 3: " . $data[2] . " 4: " . $data[3] . " 5: " . $data[4] ?> Does that work for you? -- Peter Ford phone: 01580 89

[PHP] Re: Corrupted ZIP files (downloaded via a php script) : Internext Explorer 7

2008-07-17 Thread Peter Ford
t there is *nothing* output to the client before you start pushing the ZIP file out - that definitely leads to corruption of such things, although if you were sending data before changing the headers you would get an error message about that. What I can't understand is why is might work with

Re: [PHP] mkdir permission errors

2008-07-15 Thread Peter Ford
Wei, Alice J. wrote: From: Peter Ford [EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 7:28 AM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] mkdir permission errors Wei, Alice J. wrote: -Original Message- From: Peter Ford

Re: [PHP] mkdir permission errors

2008-07-15 Thread Peter Ford
Wei, Alice J. wrote: From: Peter Ford [EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 7:28 AM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] mkdir permission errors Wei, Alice J. wrote: -Original Message- From: Peter Ford [mailto:[EMAIL PROTECTED] Sent: Tuesday, July

Re: [PHP] mkdir permission errors

2008-07-15 Thread Peter Ford
Wei, Alice J. wrote: -Original Message- From: Peter Ford [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 4:06 AM To: php-general@lists.php.net Subject: Re: [PHP] mkdir permission errors Wei, Alice J. wrote: Hi, Rob: I forgot to mention that I have been using yum install. I

Re: [PHP] mkdir permission errors

2008-07-15 Thread Peter Ford
ging permissions in /var - where is your web root?! It looks like your PHP code has the /usr/local/apache/htdocs path hard-coded, when your web files are actually in /var/something... -- Peter Ford phone: 01580 89 Developer fax: 015

[PHP] Re: Logic sought

2008-07-10 Thread Peter Ford
ne know if Apache can do such a thing? In a Java environment, I used a session object which cleaned up such folders when it was garbage-collected... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft Interna

[PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Peter Ford
randa, but it's raining horizontally at the moment and my keyboard hates being wet. I'm using Lucida Sans for code these days - I finally figured that it didn't really have to be a fixed-width font, since I couldn't find one that wasn't ugly. -- Peter Ford

Re: [PHP] how to create a slide show using PHP5

2008-07-08 Thread Peter Ford
e new image was a background image, which was being copied up to the foreground... and I had caching disabled (I was on my development system and hacking some annoying IE/JS problems) so the copying-up was forcing a reload from source... Not broken after all. Faith restored. All is well. --

Re: [PHP] substr?

2008-06-19 Thread Peter Ford
Jim Lucas wrote: Peter Ford wrote: Frank Arensmeier wrote: 17 jun 2008 kl. 22.14 skrev Jim Lucas: Jason Pruim wrote: Hi everyone, I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip

Re: [PHP] substr?

2008-06-18 Thread Peter Ford
o, 'cos it's been uploaded before your script runs) then you should do a bit more checking before accepting it. The Unix/Linux "file" command can help here. Not perfect, but still... You could also Virus-scan the file before accepting it. All depends on whether your cust

[PHP] Re: Scripts slowing down?

2008-05-13 Thread Peter Ford
see if there are any messages written around the time that yourt script runs. Don't always assume that it is your code that is wrong (that's what managers are for) -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 J

Re: [PHP] Re: A Little Something.

2008-05-13 Thread Peter Ford
s that make me laugh) and tend to choose what products I buy based on my own research, rather than what a marketing droid thinks I need to buy. Anyway, this is waaay off-topic: it was right from the start - sorry everyone :( I'll keep my pet peeves private from now on ..

Re: [PHP] Re: A Little Something.

2008-05-12 Thread Peter Ford
Stut wrote: On 12 May 2008, at 09:39, Peter Ford wrote: tedd wrote: Hi gang: This is what I did this morning: http://webbytedd.com/bb/tribute/ It speaks for itself. Cheers, tedd tedd, Nothing to do with the subject matter, but I noticed because it is one of your more simple pages: I get a

[PHP] Re: A Little Something.

2008-05-12 Thread Peter Ford
sandboxes) 'course, there are many sites that make the same call to urchinTracker(), and many many worse errors... Cheers Pete -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurs

  1   2   >