[PHP] Re: Accessing the 'media' attribute in php

2008-12-03 Thread Colin Guthrie
entries" each with 5 mini-pages and you add a print version you are changing the number from 5 to 6, not 5000 to 6000. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contrib

[PHP] Re: Convert .docx /.pdf file to .txt

2008-12-06 Thread Colin Guthrie
conds on google I found: http://sourceforge.net/project/showfiles.php?group_id=235455 If it works or not I have no idea! 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

[PHP] Re: converting a vid with ffmpeg - howto do progress bars?

2008-12-10 Thread Colin Guthrie
- with the cron job/daemon approach you can control how many jobs are performed at the same time and thus limit the load. Just some thoughts. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandri

[PHP] Re: Foreign Keys Question

2008-12-11 Thread Colin Guthrie
... all the course they've attended, all the instructors who have taught them etc. keeps things nice and tidy without having to put the structure in your code all over the place. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://

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

2008-12-11 Thread Colin Guthrie
erver, basically I want to know which is easiest? LOL... Personally I'm a ZF fan, but each to their own. 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.ma

[PHP] Re: Foreign Keys Question

2008-12-11 Thread Colin Guthrie
'Twas brillig, and Chris at 12/12/08 01:20 did gyre and gimble: Micah Gersten wrote: Colin Guthrie wrote: The ON DELETE CASCADE option is key here... "DELETE FROM students where student_id=1" will remove all traces of that student from the db... all the course they'

[PHP] Re: How serialize DOMDocument object?

2008-12-12 Thread Colin Guthrie
p and __wakup functions that essentially do the save/load for you. 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

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

2008-12-12 Thread Colin Guthrie
s I'm poked with a pointy stick!) but I hear good things. 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 Hacke

[PHP] Re: Foreign Keys Question

2008-12-12 Thread Colin Guthrie
o NULL). All three are useful in different contexts. I use them extensively to ensure good data integrity. The trade off on extra load on insert/update is IMO well worth it. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.trib

[PHP] Re: Foreign Keys Question

2008-12-12 Thread Colin Guthrie
activated" Facebook accounts etc. to realise that hiding or disabling data is not enough in many cases. Food for thought! Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contribut

[PHP] Re: ACL Framework / Library

2008-12-24 Thread Colin Guthrie
ks, Feris Zend has their ACL as part of the framework http://framework.zend.com/manual/en/zend.acl.html +1 on that one. Remember that you don't need to use the whole framework... you can just pick out the Zend_Acl stuff easily enough. Col -- Colin Guthrie gmane(at)coli

[PHP] Re: MERRY XMAS

2008-12-24 Thread Colin Guthrie
'Twas brillig, and Jay Blanchard at 24/12/08 12:07 did gyre and gimble: [snip] ...greetings from around the world [/snip] Merry Chrismakwanzica! Happy Festivus! Indeed. Happy Annual Gift Giving Day (when it comes!) to one and all. Col -- Colin Guthrie gmane(at)colin.guthr.ie

[PHP] Re: Zend framework

2008-12-24 Thread Colin Guthrie
ly when you are trying to retro fit it to an existing project). But if you just spend a few days reading through the manual you'll be totally fine. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source

[PHP] Re: Unique Object Instance ID..?

2009-01-10 Thread Colin Guthrie
extension php-uuid. The other way of doing it would be to insert a row into a database row with an auto-increment field and use the value of that auto-incrment field as your identifier (SELECT LAST_INSERT_ID() in mysql or via the db layers API). HTHs Col -- Colin Guthrie gmane(at

[PHP] Re: FirePHP -- pretty cool

2009-01-11 Thread Colin Guthrie
deoffs. If you really want it to be efficient, you can format your code in such a way that a script would process your files and comment out all the log calls. Depends whether it's worth the effort to do this really! Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.i

[PHP] Re: Zend Framework...where to start? -- do

2009-01-15 Thread Colin Guthrie
quot; (remember "better" != "raw performance") for you. Col PS FWIW, I have adopted Zend_Framework and while some of the paradigms don't fully suit me I have extended and adapted them to make it work very well for me. -- Colin Guthrie gmane(at)coli

[PHP] Re: [PROJECT HELP] - JotBug - A Project Management & Issue Tracker written 100% with Zend Framework

2009-01-28 Thread Colin Guthrie
t too much invested in Trac (and the plugins I wrote) to jump ship right now. I wish you all the best of luck tho', and I'll monitor this to see what progress you make :) Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.t

[PHP] Re: Throwing an exception seems to defeat output buffering

2009-02-03 Thread Colin Guthrie
flushed (displayed). If you don't want any output, make sure your catch block first calls ob_end_clean() before it exits. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandri

[PHP] Re: APC problem with PHP

2009-02-11 Thread Colin Guthrie
solid threading wise. It has various locking mechanisms that you can compile in to APC, including filelocks, IPC semaphores, spinlocks and pthread mutexes. So while I don't want to comment inaccurately, I suspect that APC is pretty solid in this area. Col -- Colin Guthrie gmane(at)coli

[PHP] Re: spl_object_hash not hashing unqiue objects BUG

2009-02-12 Thread Colin Guthrie
-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies You should report the bug: http://bugs.php.net/ Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contri

[PHP] Re: spl_object_hash not hashing unqiue objects BUG

2009-02-12 Thread Colin Guthrie
'Twas brillig, and Jochem Maas at 12/02/09 12:47 did gyre and gimble: Colin Guthrie schreef: 'Twas brillig, and Nick Cooper at 12/02/09 11:38 did gyre and gimble: Outputs: a1: 09d264fcececf51c822c9382b40e3edf a2: 45701af64172cbc2a33069dfed73fd07 a3: 09d264fcececf51c822c9382b

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

2009-02-15 Thread Colin Guthrie
individual manages to get a secure certificate for a domain they do not own they could then use some form of DNS hijacking (e.g. via an open wireless network or similar) to perform some pretty convincing phishing scams. So it's not just about the cert. It's the trust that goes with it. Co

[PHP] Re: XSLTProcessor help

2009-02-16 Thread Colin Guthrie
that you are outputting XML-derived data... eg. try putting this before your : omit-xml-declaration="yes"/> Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributo

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

2009-02-16 Thread Colin Guthrie
'Twas brillig, and Michael A. Peters at 16/02/09 00:10 did gyre and gimble: Colin Guthrie wrote: 'Twas brillig, and German Geek at 15/02/09 22:32 did gyre and gimble: Please enlighten me why it is so expensive? Is it maybe just the hassle of setting it up? The whole thing is a

[PHP] Re:

2009-02-16 Thread Colin Guthrie
'Twas brillig, and Richard Heyes at 16/02/09 15:04 did gyre and gimble: ... Sorry, should've mentioned, I'm talking about PHP6. Not heard about it but I'd like it. Short tags are evil but the thing is pretty handy so having a Col -- Colin Guthrie gmane(at

[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[0].lang;user_input = > selectBox.opt

[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 DIFFERENTLY NEXT TIME!!!". So t

[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

  1   2   3   4   5   6   >