[PHP] Re: for the security minded web developer - secure way to login?

2009-02-16 Thread Colin Guthrie
'Twas brillig, and Per Jessen at 16/02/09 13:49 did gyre and gimble: Colin Guthrie wrote: Yeah the cheap CA's are IMO actually a problem. I (personally) think we should have a new system for this scenario: http:// = totally insecure https:// = secure and to a reasonable degree of

[PHP] Re:

2009-02-16 Thread Colin Guthrie
'Twas brillig, and Eric Butera at 16/02/09 20:01 did gyre and gimble: On Mon, Feb 16, 2009 at 2:58 PM, Colin Guthrie wrote: 'Twas brillig, and Richard Heyes at 16/02/09 15:04 did gyre and gimble: Those reply lines are funny. =) Can't take credit as I saw someone else wi

[PHP] Re: inset data to multiple tables

2009-02-16 Thread Colin Guthrie
;SQL Injection Attacks". You should look into using the function mysql_real_escape_string() to escape all your inputs. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Co

[PHP] Re: ssh2_tunnel

2009-02-17 Thread Colin Guthrie
you can access your webserver via "http://private.office.com/";. If you wanted to access the office web server on your local machine you would do: ssh -L 8080:private.office.com:80 m...@my.office.com Then you would point your browser at: http://localhost:8080/ And you should see your of

[PHP] Re: XSLTProcessor help

2009-02-17 Thread Colin Guthrie
hicle: Hellooo Works fine. Are you sure you are not doing something odd in the calling code? e.g. make sure you are calling transformToXML() properly. Perhaps slap all your files somewhere so we can download and test for you. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/

[PHP] Re: Unique User Hashes

2009-02-18 Thread Colin Guthrie
airly easy to guess ;) Of course this may not be appropriate in this circumstance. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] Pul

[PHP] Re: linux sha1sum .vs php sha1

2009-03-20 Thread Colin Guthrie
, echo a.dat will echo the file *name* a.dat not it's contents. You probably want to use "cat" instead. 3. You care redirecting (>) rather than piping (|). So waht you really want is: cat a.dat | sha1sum (the -t is not needed). You can also do: echo -n "1234567

[PHP] Re: PHP task manager

2009-03-31 Thread Colin Guthrie
ng you can get involved with? Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hac

[PHP] Re: Two very useful PHP functions

2009-04-30 Thread Colin Guthrie
out knowing an API function. Also, most of the cases that you would use these functions are with input from GET args and the like. Most frameworks provides wrappers for this with handy ways to get the defaults etc. So overall, I can't see this becoming a core PHP feature. Col -- Co

[PHP] Re: PHP6 return by reference deprecation

2009-05-02 Thread Colin Guthrie
private constructor and which enforces the use of the getInstance() method. This is a very common design pattern, and is ideally suited to this use case. HTHs Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/]

[PHP] Re: PHP6 return by reference deprecation

2009-05-02 Thread Colin Guthrie
'Twas brillig, and Larry Garfield at 02/05/09 20:00 did gyre and gimble: On Saturday 02 May 2009 9:30:09 am Colin Guthrie wrote: 'Twas brillig, and Paul M Foster at 02/05/09 06:07 did gyre and gimble: If this is going away, how do you return things by reference, so as to ensure a s

[PHP] Re: Paypal and Php

2009-05-02 Thread Colin Guthrie
interact with PayPal? Proposal and discussion page is here for the overall Zend_Payment concept: http://framework.zend.com/wiki/display/ZFPROP/Zend_Payment+-+Vadim+Gabriel But check the zend framework general mailing list archive for better information. Col -- Colin Guthrie gmane(at

[PHP] Re: SHOULD I NOT USE "ELSE" IN IF STATEMENTS....?

2009-06-09 Thread Colin Guthrie
in the opposite, it's the same amount of tracking to look through the code itself. As with everything in programming style, this mostly comes down to personal preference. So just stick with a style you like :) People get almost as emotive about this topic as top-posting on mailing lists

[PHP] Re: Periodic Actions in PHP?

2009-06-13 Thread Colin Guthrie
ient is pulling periodically so it's the client that sets the timer. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http:/

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

2009-06-23 Thread Colin Guthrie
hen perhaps spend two or three sessions at the end covering the newer stuff from PHP 5.3. That's probably the way I'd go, and you can give people some prior warning to try and get a PHP 5.3 install up and running for the x'th week of the course. Col -- Colin Guthrie gmane(at

[PHP] Re: Progressbar

2009-06-25 Thread Colin Guthrie
ogress bar for file upload built in. http://www.framework.zend.com/manual/en/zend.file.html#zend.file.transfer.introduction.uploadprogress HTHs Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mand

[PHP] Re: 2 ifs embedded? (RESOLVED)

2009-08-01 Thread Colin Guthrie
7;) == true empty(0) == true empty('0') == true empty(1) == false empty(2) == false empty('foo') == false I suspect you were just being bitten by a misconception of what empty() was supposed to do when you passed certain values to it. isset() and empty() are subtly different. Co

[PHP] Re: Dan Brown

2009-08-04 Thread Colin Guthrie
e now bobbing around downstairs. I hope they've gone to Silicon Heaven. Sad news indeed. Col PS Oh yeah and congrats on the whole baby thing too although it's hardly the most poignant story :p -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogi

[PHP] Re: Array

2009-08-10 Thread Colin Guthrie
ivate", ); Ahh someone else who always puts a closing , on the end of array definitions to cut down on VCS diff/patch churn. Excellent :) Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: M

[PHP] Re: Upgrading to PHP5.2.x

2009-08-11 Thread Colin Guthrie
ly working system. HTHs Col. -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Ha

[PHP] Re: Is select_db necessary?

2009-08-12 Thread Colin Guthrie
ify it once in your bootstrap/connection code? Thus doing tests on other dbs etc. is a pretty simple switch of the connection code. Also telling the db engine what database you want to use in every query is not, IMO, leaving the selection in the the database's hands. Just curious as to the

[PHP] Re: Is select_db necessary?

2009-08-13 Thread Colin Guthrie
matching/replacing, concatenation or whatever). So perhaps it depends on your view point and preconceptions and we're both coming at the "flexible" and "offloading" arguments with different starting views. Anyway, I only asked out of curiosity which I thin

[PHP] Re: Domain Search

2007-01-09 Thread Colin Guthrie
Marcelo Ferrufino Murillo wrote: > I have to make a domain search so I don´t know if there is an API or > something that could help me in this o if you know how I could make this. Should just be a matter of spewing out the results of the command "whois mydomain.com". There may be a specific PHP

[PHP] Re: Domain Search

2007-01-09 Thread Colin Guthrie
Jochem Maas wrote: > without getting into the specifics of what the OP might be looking for, > I'd like to add that I think the above should (?) use escapeshellarg() rather > than escapeshellcmd() although escapeshellcmd() will, AFAICT from the docs, > also keep you safe in the current example. In

[PHP] Re: whois Domain??

2007-01-09 Thread Colin Guthrie
Marcelo Ferrufino Murillo wrote: > Hi ereryone I need to do an script into a web page to know if a domain is > registered so I don´t know how to send a query to "internic" or what I have > to do to get this. > > Thank you, I hope your help. You've already asked this question earlier today and peo

[PHP] Re: web analytics

2007-01-11 Thread Colin Guthrie
Jochem Maas wrote: >> did you try it before? > > half the planet seems to be using it, works for them - I'm pretty > sure it'll work for you. I thnk the OP was referring to phpanalitics rather than Google Analytics which is what I think you are referring to? Col. -- PHP General Mailing List (h

[PHP] Re: colon in coma [was: Re: [PHP] Anyone would like to test my open source application http://sourceforge.net/projects/dfo/ ?]

2007-01-14 Thread Colin Guthrie
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-13 18:59:10 -0800: >> }, //<-- offending colon > > # [EMAIL PROTECTED] / 2007-01-14 04:49:10 +0100: >> ah ok i am sorry, you can just remove the , (the offending colon) > > Guyes, what were you doing during your biology classes? ;) LOL @ b

[PHP] Re: Forms and destroying values

2007-01-16 Thread Colin Guthrie
Beauford wrote: > Thanks, a little confusing there. You would think though that once the info > is transmitted by the browser it would be forgotten by the browser. Anyway, > I do have a work around, and since PHP can't do anything about what the > browser does, this will have to suffice. But a ref

[PHP] Re: better protection?

2007-01-17 Thread Colin Guthrie
Ross wrote: > If I protect folders via cpanel (HTTP auth) is this more secure than using > php code? Logically, it /could/ be more secure as it prevents access to any PHP code and thus any vulns in PHP itself. In practice tho', the login code and the small part of cpanel that the un-authed user

[PHP] Re: What makes a PHP expert

2007-01-18 Thread Colin Guthrie
Answer, "nothing", PHP doesn't need Makefiles as it's an interpreted language :p hahahaha Sorry, I'll get my coat. Col. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Need tool to graphically show all includes/requires

2007-01-20 Thread Colin Guthrie
Daevid Vincent wrote: > We have a fairly complex product that is all PHP based GUI. > > We're in need of some kind of "graphical tool" (web, stand alone, windows, > linux, osx whatever) that will take a directory tree, recursively traverse > all the files, look for 'includes' and 'requires' (and t

[PHP] Re: Parsing AJAX post data -- The Way

2007-01-25 Thread Colin Guthrie
Stut wrote: > M5 wrote: >> Just wondering what smart people do for parsing data sent by the >> Javascript XMLHTTP object--e.g., http.send("post",url,true)... >> >> In a normal form submit, the $_POST global nicely allocates form >> elements as array elements automatically. But with the AJAX way, th

[PHP] Re: two php.ini on the same server

2007-01-26 Thread Colin Guthrie
phpdevster wrote: > Hi > > i am trying to run two Apache server on the same machine and that is work > fine > > but the problem is how to create separate php.ini for each Apache server . > is that possible ?? It would be easy to do with a chrooted setup, but I'm sure there are other ways too. A

[PHP] Re: My objects eats too much (and weird!) memory

2007-01-27 Thread Colin Guthrie
Francisco M. Marzoa Alonso wrote: > AFAIK there's no other way to measure memory usage on PHP than this, if > you know something better it could be more constructive if you show it. The last time I looked I think the xdebug module allowed you to get the memory consumption of a given object in PHP.

[PHP] Re: Suggestions of GPL plugin-system?

2007-01-29 Thread Colin Guthrie
Ivo F.A.C. Fokkema wrote: > Hi guys, > > I've been developing a GPL PHP/MySQL app for some time now and I would > like to extend it with a module/plugin system. The idea would be that > people could add a directory in a plugin path that would contain a > bunch of PHP files extending the functional

[PHP] Re: file_get_contents

2007-02-06 Thread Colin Guthrie
Steven Macintyre wrote: > Hiya, > > I need to be able to read a file into a string - I have used the above > command and it works ... now ... I need to read a file into a string - that > requires a username and password to access the authentication is normal HTTP > basic realm > > Any ideas? $va

[PHP] Re: Open pop-up stylish window

2007-02-06 Thread Colin Guthrie
Chris Carter wrote: > Hi, > > I am looking for a way to open a preview window. This should be a seperate > pop-up but within the same page. The moment the user clicks for say "more > details »" .. this should not open a next page or a pop-up window but a > dhtml transparent window that has the sho

[PHP] Re: JS prompt -> php

2007-02-08 Thread Colin Guthrie
Ryan A wrote: > Quick question (and hopefully a simple one) > > I have a link on a page, when the client clicks that link it should > show them a JS prompt and ask for their name (so far I have done > this) > > When they write their name, I want that data to be sent to my php > script via AJAX (y

[PHP] Re: JS prompt -> php [become 0T]

2007-02-10 Thread Colin Guthrie
Ryan A wrote: > Hey Colin, > Thanks for replying. > > I guess this has sidelined from php a bit now... so have added a OT in the > subject line. > > Anyway, this is how I get the values from a select or a text box: > > var selectBox = document.forms

[PHP] Re: How to upload files up to 40MB with a html post form?

2007-02-14 Thread Colin Guthrie
Robert Cummings wrote: > On Wed, 2007-02-14 at 13:54 +0100, David Blanco wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Hola! >> >> Mauricio Muriel escribió: >> >>> How can I upload files up to 40MB with a html post form? (without a ftp >>> client) >>> >>> Please, remember >>> >>

[PHP] Re: PHP/PEAR

2007-02-14 Thread Colin Guthrie
Malcolm Pickering wrote: > Hello there, > > As a new user of PHP I am finding it extremely useful, very fast, and > rewarding. I was also delighted to find the already proven and > maintained extensions in PEAR. > > I have recently downloaded one of these extensions (HTML_Table) which > is provin

[PHP] Re: How to upload files up to 40MB with a html post form?

2007-02-14 Thread Colin Guthrie
Robert Cummings wrote: > On Wed, 2007-02-14 at 14:05 +0000, Colin Guthrie wrote: >> Robert Cummings wrote: >>> On Wed, 2007-02-14 at 13:54 +0100, David Blanco wrote: >>>> -BEGIN PGP SIGNED MESSAGE- >>>> Hash: SHA1 >>>> >>>&

[PHP] Re: How to call image from mySql to php file

2007-02-22 Thread Colin Guthrie
Kevin Waterson wrote: > This one time, at band camp, "Haydar TUNA" <[EMAIL PROTECTED]> wrote: > >> Hello, >>Firstly, your image table field should be BLOB field then you create >> a image file (for example image.php). in this file, if your application is >> more secure, you can control t

[PHP] Re: How to call image from mySql to php file

2007-02-22 Thread Colin Guthrie
Hi, Some points already given by others just reiterating: Chris Carter wrote: > $sno = $_REQUEST['sno']; $_REQUEST is dodgy - you don't know what makes it up (cookies, post, get etc.), only use it when it when you are sure. > $query="SELECT logos FROM table WHERE sno = '$sno'"; NEVER do this

[PHP] Re: PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Colin Guthrie
Martin Zvarík wrote: > I did a benchmark with and without caching to HTML file and it's like: > > 0.0031 sec (with) and 0.0160 sec (with database) > > I know these miliseconds don't matter, but it will have significant > contribution in high-traffic website, won't it? I would say yes. A good cac

[PHP] Re: how to retrieve pictures from postgreSQL DB

2007-02-25 Thread Colin Guthrie
tedd wrote: > That's the type of information you should store in your dB along with > the image. +1 Also you probably want to think about adding some cache related headers there too in order to stop web browsers hammering your server all the time. Col -- PHP General Mailing List (http://www.ph

[PHP] Re: Combining sound files

2007-02-25 Thread Colin Guthrie
tedd wrote: > Hi gang: > > I can combine two mp3 sound files together by simply: > > // load first > > $file = "a.mp3"; > $handle = fopen($file, "rb"); > $size = filesize($file); > $load = fread($handle, $size); > fclose($handle); > > // load second > > $file = "b.mp3"; > $handle = fopen($fil

[PHP] Re: Combining sound files

2007-02-25 Thread Colin Guthrie
tedd wrote: >> If you are using linux I'd just shell out to sox or similar. > > I don't know how to do that. http://uk.php.net/manual/en/ref.exec.php sox is a command line program that you can experiment with on the command line. >From it's man page: NAME SoX - Sound eXchange - The Swis

[PHP] Re: Combining sound files

2007-02-26 Thread Colin Guthrie
clive wrote: >> However, I can't do the same with .WAV files. Does anyone know a way >> to combine .WAV files similar to the way shown above? > > Can you not convert the wav files to mp3's then combine them? While I'm sure you could do this technically, the principle is wrong for so many reasons.

Re: [PHP] Re: how to retrieve pictures from postgreSQL DB

2007-02-26 Thread Colin Guthrie
Alain Roger wrote: > Sorry Colin, > > but what do you mean by "adding some cache related headers" ? > What is the idea behind that ? Well, PHP is a dynamic language and as such it tells web browsers (Firefox, Safari etc.) "DO NOT CACHE THIS PAGE, I MAY GENERATE IT DIF

[PHP] Re: Combining sound files

2007-02-26 Thread Colin Guthrie
tedd wrote: > I'll investigate what you suggest. I definitely think it's the right way to go. sox can also convert from mp3 to wav etc. as per Clive's suggestions too, so if you can use lame from the command line via PHP, there is no reason not to just use sox instead. > It was by accident that I

[PHP] Re: audio CAPTCHA - was Combining sound files

2007-02-26 Thread Colin Guthrie
tedd wrote: > PS: What does this have to do with php? Well... a good deal of the code > is php and a mix of a bunch of other stuff (we don't live in a vacuum) > -- so please permit me this indulgence. Personally, I think this would be quite easy to do in flash... tho' I don't really know flash, it

[PHP] Re: PHP shell_exec

2007-02-27 Thread Colin Guthrie
h wrote: > I have been using the shell_exec command to perform several server queries > quite succesfully i.e. analysing files systems by gettin ginformation > returned by df -kP (shell_exec('df -kP')). do any of you guts know if it is > possible to target a command like this on another server?

[PHP] Re: Extract printable text from web page using preg_match

2007-02-27 Thread Colin Guthrie
M5 wrote: > I am trying to write a regex function to extract the readable (visible, > screen-rendered) portion of any web page. Specifically, I only want the > text between the tags, excluding any

[PHP] Re: Extract printable text from web page using preg_match

2007-02-28 Thread Colin Guthrie
M5 wrote: > No, it's not a very good solution. Striptags will leave everything > within ,

[PHP] Re: Combining sound files

2007-02-28 Thread Colin Guthrie
tedd wrote: > I'm not sure I can or need to run exec, nor do I actually know how. I'll > deal with that later in my life. Go on, it's easy! http://uk2.php.net/manual/en/function.exec.php That said, depending on your hosting, you may be banned from exec. > For the moment, I can use a HEX Editor

[PHP] Re: Getting last record ID created from DB

2007-03-17 Thread Colin Guthrie
Philip Thompson wrote: > For auto increment values, you don't have to specify the id. For example: > > INSERT INTO t_users (f_name, l_name, e_mail, b_date, pic) > VALUES ('$f_name', '$l_name', '$e_mail', '$b_date', null); > > Then to find the latest entry: > > SELECT user_id FROM t_users ORDER B

[PHP] Re: Getting last record ID created from DB

2007-03-17 Thread Colin Guthrie
Mark wrote: >> select user_id from t_users where user_id = (select max(user_id) from >> t_users) >> > > It should be noted that that is the absolute 100% WRONG way to do it. If > your site has any concurrency, you will almost certainly get the wrong > user. I agree 100% that it is 100% wrong, but

[PHP] Re: close session when browser is closed

2007-03-23 Thread Colin Guthrie
Edward Vermillion wrote: >> Personally I think this does make sense. I fully expect the browser to >> maintain cookies "Until it is closed" -- If I have closed one tab that >> had set a cookie, re-opening that URL in a new window/tab should still >> cause the browser to send in my cookie. >> > >

[PHP] Re: combine empty and trim

2007-03-26 Thread Colin Guthrie
Stut wrote: > You could also do something like this... > > $_POST['_createcategory'] = > isset($_POST['_createcategory']) ? > trim($_POST['_createcategory']) : ''; > > if (empty($_POST['_createcategory'])) { > > Still not pretty but slightly better in that you can cleanse your data >

[PHP] Re: short open tags not working even if enabled - lighttpd + fastcgi

2007-03-27 Thread Colin Guthrie
Matt Arnilo S. Baluyos (Mailing Lists) wrote: > Hello everyone, > > I have a working lighttpd + fastcgi + PHP + eaccelerator installation. > I have also enabled short tags on the /usr/local/lib/php.ini but I'm > having problems with PHP not escaping the short tags. > > To better illustrate, my ph

[PHP] Re: PHP 5.2.1: Some scripts are being parsed, but most aren't

2007-03-28 Thread Colin Guthrie
Mario Guenterberg wrote: > On Wed, Mar 28, 2007 at 07:20:37AM -0500, Myron Turner wrote: >> It's hard to see how this could be a browser issue. Firefox does not >> parse the scripts. The scripts are parsed on the server, under Apache. >> The server outputs the result of the parsing and the bro

[PHP] Re: Firefox Extension (Firefox 2.x.x.x)

2007-03-28 Thread Colin Guthrie
Jim Lucas wrote: > Now, open a new tab, enter 'php date' I've been using this since FF implemented it. I have others too: "ggl" for google, "mysql" for mysql manual search etc. I know FF has a google search bar but it just takes up space when I can type "F6 + ggl something" pretty damn quick ;)

[PHP] Re: which CMS are you using and why?

2007-04-08 Thread Colin Guthrie
Fernando Cosso wrote: > Well that's the question. > I have to start a new project and I have to decide the CMS. > I have thought mambo will do, but looking at the documentation, it > disappointed me a little. > I need a documentation with examples of the objects, functions and all that > stuff. The

[PHP] Re: PHP4 vs PHP5

2007-04-08 Thread Colin Guthrie
Fernando Cosso wrote: > I'm sure Mambo is ready for php5. I personally prefer Joomla! which is a fork of Mambo from about a year or so ago. You may be happy with Mambo but I'd take a look at Jooma too as it may fit your needs better. It seems that the majority of community support is for Joomla an

[PHP] Re: SQL Source Control

2007-04-11 Thread Colin Guthrie
Richard Davey wrote: > Hi all, > > I know a lot of you use various means for PHP source control (CVS, SVN, > etc), which is all well and fine, but how do you manage source control > on your databases? > > Say you've got an upgrade to a site, all of the new PHP files are > controlled by SVN, so yo

[PHP] Re: SQL Source Control

2007-04-11 Thread Colin Guthrie
Zoltán Németh wrote: > yeah I have the same problem ;) > > I have two kind of SQL files: > 1) SQL of the complete, blank DB structure - I store it for each main > version (I should store it for each version if I wouldn't be so > lazy... ;) ) > 2) SQL instructions to upgrade from a DB version to an

[PHP] Re: Outlook task via email

2007-04-12 Thread Colin Guthrie
Chris Boget wrote: > I've done some searching on Google but haven't been able to come up with > anything helpful. Has anyone on the list done any work on sending an > Outlook Task as part of an email? Or does anyone know of a good > resource that shows how this can be done? I'm going to be using

[PHP] Re: free allocated memory: HOW ?

2007-04-13 Thread Colin Guthrie
Jochem Maas wrote: > yeah or exim, only I can't because it's one of the darn plesk servers - and > changing > out the mail server is not something I can do. I have recently escaped Pleskhog day. It's s refreshing - so happy to just be given an apache config and let loose!!! Col -- PHP

[PHP] Re: width and height of flash-files

2007-04-13 Thread Colin Guthrie
Tijnema ! wrote: > On 4/13/07, Heiko Sudar <[EMAIL PROTECTED]> wrote: >> hi, >> is there a way to get the width and the height of a flash movie >> via php? >> >> heiko >> > Have a look at this class: > http://www.phpclasses.org/browse/file/6443.html > > It parses the header of an SWF(Flash) file,

[PHP] Re: CSS vs. Tables OT

2007-04-17 Thread Colin Guthrie
Robert Cummings wrote: >> BTW, any web developer worth his or her salt with a reasonable amount of >> practice can make CSS layouts that resize as well as table based layouts >> everyday of the week. I will refer you to http://www.csszengarden.com/ > > Only with hacks. The hacks fix buggy browser

[PHP] Re: CSS vs. Tables OT

2007-04-18 Thread Colin Guthrie
Robert Cummings wrote: > No, it's old school, the only way to do complex layout in the past. At > least tables are backward and forward compatible. I would not say tables are forwards compatible. If you are a company (at least in the UK) and your website does not meet accessibility guidelines you

[PHP] Re: PHP excel capability

2007-04-18 Thread Colin Guthrie
Jonathan Kahan wrote: > Can PHP be used to generate an excel file that A) Contains Macros B) > Allows Graphics to be attached C) where cells can contain borders as > well as cells being merged. I know there is some PHP excel functionality > so i am assume basics like underlines, italics and i am ho

[PHP] Re: Emergency! Performance downloading big files

2009-12-02 Thread Colin Guthrie
sult I found on this issue which explains it a bit. http://codeutopia.net/blog/2009/03/06/sending-files-better-apache-mod_xsendfile-and-php/ Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Lin

[PHP] Re: Enforce a constant in a class.

2010-01-25 Thread Colin Guthrie
n other methods you want to provide in the base class. I don't see why constants specifically are needed here. Rather than using reflection you can just use instanceof or similar to tell if a given object implements the interface or simply use the interface name as a type specifier on an argum

[PHP] Re: Uninstalling PHP?

2010-02-28 Thread Colin Guthrie
likely want to pass it through "sudo" first. e.g. sudo ./apachectl graceful. You should be prompted for you *user* password. If you user is allowed to administer the machine, you should become root temporarily and run the command. If you run several sudo commands in relatively quick s

[PHP] Re: I need a fresh look at storing variables in MySQL

2010-03-15 Thread Colin Guthrie
rything that needs escaping and no logic for the "is it or is it not already escaped" leaks into this layer. (I appreciate strip tags and htmlspecialchars are not the same and my general usage may not apply to a pure striptags usage). > at any rate, strip_tags() doesn't belong

[PHP] Logical reason for strtotime('east') and strtotime('west') returning valid results?

2010-04-05 Thread Colin Guthrie
928) The last one is valid! But the other two appear to do much the same thing... Can anyone think of why this would be valid results before I report this to the relevant authorities? Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www

[PHP] Re: Logical reason for strtotime('east') and strtotime('west') returning valid results?

2010-04-06 Thread Colin Guthrie
ity? Yeah, that's why I said "the relevant authorities". I couldn't remember off-hand where it came from so figured I'd not blame "PHP" just yet :p Cheers Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http:

[PHP] session data

2010-06-01 Thread Colin Finnis
I'm having a problem with session data. I have a login setup which holds the user ID and password in the session data once the user has initially logged in. When the user goes to a new page or accesses a pop up window the users session data is validated against a list of IDs and passwords held o

[PHP] Re: php array in different OS

2010-07-23 Thread Colin Guthrie
o is something like: ini_set('memory_limit', '50M'); and you'll be fine. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http:/

[PHP] Re: PHP images server

2010-08-05 Thread Colin Guthrie
ecessary stuff to generate it and upload to AWS, then carry on. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaud

[PHP] Re: Including files on NFS mount slow with APC enabled

2010-08-17 Thread Colin Guthrie
Is this a > bug? I don't know the internals of APC but that smells like a bug to me. Can you post the bug number here if you report one? Cheers Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Op

[PHP] Re: tutorial failure

2010-08-19 Thread Colin Guthrie
es (especially your apache configuration) then you really do need to sit down and learn how everything works and how things fit together. As you're presumably just starting out, I'd recommend sticking to the basics, install task-lamp and then go from there. HTHs Col --

[PHP] Re: tutorial failure

2010-08-20 Thread Colin Guthrie
command line. There is no such thing as "installing php" - you install which system you want: command line (php-cli), apache module (apache-mod_php) or cgi (php-cgi). I work with LAMP stacks on various flavours servers and I find the Mandriva one to be very, very well thought out, and

[PHP] Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
es I've missed? Is there some cunning, cleverness that eludes me? Are there any problems with the above approach? Would a caching proxy ultimately cause problems for some users (i.e. storing a cache for page 1 and page 2 of the same listing but with different randomisations)? And if s

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
..32 as my seed, then I still get the same net result as a 32 column table. If I just change my "seed offset" then I get the same result as re-generating my random data tables. >From an operational perspective, RAND(seed) is certainly easier. I'll certainly look into th

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
this actually result in SEO penalties? Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
'Twas brillig, and Andrew Ballard at 20/08/10 15:04 did gyre and gimble: > On Fri, Aug 20, 2010 at 9:31 AM, Colin Guthrie wrote: >> Speaking of SEO, that was one of our concerns about randomising listings >> too. What impact do you think such randomised listings will have on

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
t;thing" names for some clients. This allowed our clients to keep a solid control over it and make sure that the name were relevant and accurate! Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source:

[PHP] Re: Bitwise NOT operator?

2010-08-20 Thread Colin Guthrie
actual fact you are working with a 32-bit number. If you did $bin = 2; $notbin = ~$bin & 3; Then this should get the results you want. The bitwise & 3 bit essentially limits things to a 2-bit number. (3 in binary is represented by 1's for the two LSBs and 0's for all oth

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
'Twas brillig, and Andrew Ballard at 20/08/10 15:55 did gyre and gimble: > On Fri, Aug 20, 2010 at 10:19 AM, Colin Guthrie wrote: >> The customer is always right -> in his own mind (even if not in his RIGHT >> mind) <- after all! > > Corrected that for you. ;-)

[PHP] Re: Bitwise NOT operator?

2010-08-25 Thread Colin Guthrie
n fact represented by whatever the variable type is. In this case it's a 32 bit integer number. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.m

[PHP] Re: daemon

2010-10-07 Thread Colin Guthrie
x27;s what I do too. Of course systemd will change everything "initscript" related, but I don't expect it to hit production servers for a while. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/]

[PHP] Re: Looking for an open-source project

2010-10-25 Thread Colin Guthrie
'Twas brillig, and Mert Oztekin at 25/10/10 13:23 did gyre and gimble: > I am looking for an open-source project to help and make some fun. Anyone has > suggestions? How about helping out Zend Framework, adding useful classes for various Service integrations etc.? Col -- Colin Gu

[PHP] Re: Apache mod_pagespeed

2010-11-04 Thread Colin Guthrie
r using it than doing all this stuff myself. That said, it's often nice to think about these things rather and learn about the consequences than just blunder on and hope for the best. This module will result in a bit of "dumbing down" of devs, but that's not to say I

[PHP] Re: Apache mod_pagespeed

2010-11-04 Thread Colin Guthrie
ystems :s I'll take the build process for a spin at some point, but they really do need to make it more streamlined. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contribut

[PHP] Re: Under which distribution(s) is PHP developed, compiled, and tested?

2010-12-15 Thread Colin Guthrie
has released RHEL 6 which supports PHP 5.3 > CentOS has not released even a beta 6 version yet that supports PHP 5.2+ The *official* RPMs for CentOS 5.5 are PHP 5.1.6 but there are plenty third party repos where never versions are made available. e.g. http://iuscommunity.org/getting-started/ HT

[PHP] Re: Flexible application plugin architecture, is this possible?

2011-01-04 Thread Colin Guthrie
stantiate" function, but > does it have any similar mechanism that would work to automatically > load alternate classes, or have a class dynamically overload > itself during runtime? Well difference techniques require different approaches, but certainly a factory approach is likely the

[PHP] "public static" or "static public"?

2011-01-28 Thread Colin Guthrie
OK, so it's a Friday hence a random debate What is preferred for class methods? class foo { static public function bar(){} public static function wibble(){} } ?? All methods are valid, but are some more valid than others? :p Checking ZF: [colin@jimmy Zend (working)]$ cgrep &q

<    1   2   3   4   5   6   7   >