RE: [PHP] checking local file size

2008-12-16 Thread John Pillion
> > I already downloaded that, thanks. How do I apply it is my question. > > There's no documentation for the installation of it, that I see > > 'Course it is :) > > http://www.php.net/manual/en/install.pecl.php > > Linked from here: http://pecl.php.net/doc/index.php > I tried installing

Re: [PHP] Can PHP be used to snatch images cross-domain?

2008-12-16 Thread Chris
Rob Gould wrote: Brilliant! Now why do all these other scripts I've found make it look so hard?? http://wiki.dreamhost.com/index.php/CURL curl can handle timeouts much better (file_get_contents will timeout when the server on the other end says so). it can also tell you if a 404 is returned

Re: [PHP] Secure uploads tutorial

2008-12-16 Thread Tim Starling
Peter Ford wrote: > tedd wrote: > >> I can't imagine evil code still working after someone resizes the file. >> >> > > Yeah, but the uploaded OpenOffice Writer doc won't look too good either... :) > > I prefer to move files to an off-line store, run them through a unix 'file' > command (wit

Re: [PHP] Can PHP be used to snatch images cross-domain?

2008-12-16 Thread Rob Gould
Brilliant! Now why do all these other scripts I've found make it look so hard?? http://wiki.dreamhost.com/index.php/CURL Take a look at the last script on that site. I suppose it's because of all the error-handling. That last "downloader class" looks promising, through I'm not sure how to pa

Re: [PHP] Secure uploads tutorial

2008-12-16 Thread Tim Starling
tedd wrote: > At 11:45 PM +1100 12/16/08, Tim Starling wrote: >> I thought the list might be interested in a tutorial for secure >> web-based file uploads that I just wrote: >> >> http://tstarling.com/blog/2008/12/secure-web-uploads/ >> >> -- Tim Starling > > Tim: > > That's a good read -- thanks -

Re: [PHP] Can PHP be used to snatch images cross-domain?

2008-12-16 Thread Robert Cummings
On Tue, 2008-12-16 at 21:29 -0500, Rob Gould wrote: > If I have a php script on my own server, can it be used to snatch a JPEG > image off of another server on a different domain and upload it to my server? > For example, could I provide an URL to an image on another server and a path > on my o

[PHP] Can PHP be used to snatch images cross-domain?

2008-12-16 Thread Rob Gould
If I have a php script on my own server, can it be used to snatch a JPEG image off of another server on a different domain and upload it to my server? For example, could I provide an URL to an image on another server and a path on my own server in which to place it? I know in the world of Ajax

Re: [PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-16 Thread Robert Cummings
On Wed, 2008-12-17 at 02:03 +0100, Jochem Maas wrote: > > or just: > > mysql_query("UPDATE test SET mykey=UUID()"); > > can't see any reason to go down the 'loop the dataset and roll your > own much less random, much more likely to collide, unique value' road. Not terribly random: 7e55a4d0-1d31

Re: [PHP] Phpmyadmin password

2008-12-16 Thread Chris
It flance wrote: Hi, I lost phpmyadmin password. Is there anyway to recover it? ask phpmyadmin: http://www.phpmyadmin.net/home_page/support.php -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

Re: [PHP] Phpmyadmin password

2008-12-16 Thread Micah Gersten
It flance wrote: > Hi, > > I lost phpmyadmin password. Is there anyway to recover it? > > Thank you > > PHPMyAdmin uses MySQL's internal authentication. Log into your MySQL server and reset your password. http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html Thank you, Micah Gers

[PHP] Phpmyadmin password

2008-12-16 Thread It flance
Hi, I lost phpmyadmin password. Is there anyway to recover it? Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-16 Thread Jochem Maas
supp...@trafficregenerator.com schreef: >> On Monday, December 15, 2008 7:29 PM, gould...@mac.com wrote: >> ... > > error_reporting(E_ALL); > ini_set('error_reporting', E_ALL); > ini_set('display_startup_errors','1'); > ini_set('display_errors','1'); > > > function dec2base($dec) > { > $digit

Re: [PHP] checking local file size

2008-12-16 Thread Chris
In short, what next? http://pecl.php.net/package/uploadprogress I already downloaded that, thanks. How do I apply it is my question. There's no documentation for the installation of it, that I see 'Course it is :) http://www.php.net/manual/en/install.pecl.php Linked from here: http:/

RE: [PHP] checking local file size

2008-12-16 Thread John Pillion
>> "Bojan Tesanovic" > wrote in message >> news:>... >>> Well you need to know the TMP file name that has been in progress of >>> upload, it is usually at /tmp folder >> >> I know how to get that... >> >>> also you need to know the actual size of file uploading, there is an >>> extension for

Re: [PHP] checking local file size

2008-12-16 Thread Chris
John Pillion wrote: "Bojan Tesanovic" wrote in message news:... Well you need to know the TMP file name that has been in progress of upload, it is usually at /tmp folder I know how to get that... also you need to know the actual size of file uploading, there is an extension for PHP that

Re: [PHP] checking local file size

2008-12-16 Thread John Pillion
"Bojan Tesanovic" wrote in message news:... > Well you need to know the TMP file name that has been in progress of > upload, it is usually at /tmp folder I know how to get that... > also you need to know the actual size of file uploading, there is an > extension for PHP that will give you

Re: [PHP] runtime access to static variable

2008-12-16 Thread Micah Gersten
Jack Bates wrote: > How do I access a static variable when I do not know the name of the > class until runtime? > > I have the following example PHP: > > ket% cat test.php > > class Test > { > public static > $STEPS = array( > 'foo', > 'bar'); > } > > $className = 'Test'; > > va

Re: [PHP] Good PHP book?

2008-12-16 Thread Ashley Sheridan
On Tue, 2008-12-16 at 17:44 -0500, Daniel Brown wrote: > On Tue, Dec 16, 2008 at 17:30, Ashley Sheridan > wrote: > >> > > These stones? http://xkcd.com/505/ > > That's fantastic, Ash. I haven't seen that one. I'm CC'ing Tedd > directly on that. > > -- > > http://www.parasane.net/ > dani

Re: [PHP] Good PHP book?

2008-12-16 Thread Daniel Brown
On Tue, Dec 16, 2008 at 17:30, Ashley Sheridan wrote: >> > These stones? http://xkcd.com/505/ That's fantastic, Ash. I haven't seen that one. I'm CC'ing Tedd directly on that. -- http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.

Re: [PHP] Good PHP book?

2008-12-16 Thread Robert Cummings
On Tue, 2008-12-16 at 22:30 +, Ashley Sheridan wrote: > On Tue, 2008-12-16 at 17:22 -0500, Robert Cummings wrote: > > On Tue, 2008-12-16 at 22:21 +, Ashley Sheridan wrote: > > > On Tue, 2008-12-16 at 16:11 -0600, Jay Moore wrote: > > > > Daniel Brown wrote: > > > > > On Tue, Dec 16, 2008 at

Re: [PHP] Good PHP book?

2008-12-16 Thread Ashley Sheridan
On Tue, 2008-12-16 at 17:22 -0500, Robert Cummings wrote: > On Tue, 2008-12-16 at 22:21 +, Ashley Sheridan wrote: > > On Tue, 2008-12-16 at 16:11 -0600, Jay Moore wrote: > > > Daniel Brown wrote: > > > > On Tue, Dec 16, 2008 at 17:04, Jay Moore wrote: > > > >> Floppies hold 1.4 megs now? Mine

Re: [PHP] Good PHP book?

2008-12-16 Thread Daniel Brown
On Tue, Dec 16, 2008 at 17:22, Robert Cummings wrote: > > Cue Tedd and his stones in 3... 2... 1... Rocks[TM]. -- http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Good PHP book?

2008-12-16 Thread Robert Cummings
On Tue, 2008-12-16 at 22:21 +, Ashley Sheridan wrote: > On Tue, 2008-12-16 at 16:11 -0600, Jay Moore wrote: > > Daniel Brown wrote: > > > On Tue, Dec 16, 2008 at 17:04, Jay Moore wrote: > > >> Floppies hold 1.4 megs now? Mine don't and they're even dual-sided. :( > > > > > > Jay, > > >

Re: [PHP] Good PHP book?

2008-12-16 Thread Robert Cummings
On Tue, 2008-12-16 at 17:07 -0500, Daniel Brown wrote: > On Tue, Dec 16, 2008 at 17:04, Jay Moore wrote: > > > > Floppies hold 1.4 megs now? Mine don't and they're even dual-sided. :( > > Jay, > > Throw out your 62K and 5.25" floppies and get with the 1980's, > brother. It's all about

Re: [PHP] Good PHP book?

2008-12-16 Thread Ashley Sheridan
On Tue, 2008-12-16 at 16:11 -0600, Jay Moore wrote: > Daniel Brown wrote: > > On Tue, Dec 16, 2008 at 17:04, Jay Moore wrote: > >> Floppies hold 1.4 megs now? Mine don't and they're even dual-sided. :( > > > > Jay, > > > > Throw out your 62K and 5.25" floppies and get with the 1980's, >

Re: [PHP] Good PHP book?

2008-12-16 Thread Daniel Brown
On Tue, Dec 16, 2008 at 17:11, Jay Moore wrote: > > Ok. Let me back them up to these reel-to-reel tapes quick, just in case. Just be careful that you don't get the Michaelangelo or Friday The 13th viruses especially if you're converting over on a C-64 1541 drive. -- http://www.parasan

Re: [PHP] Good PHP book?

2008-12-16 Thread Jay Moore
Daniel Brown wrote: On Tue, Dec 16, 2008 at 17:04, Jay Moore wrote: Floppies hold 1.4 megs now? Mine don't and they're even dual-sided. :( Jay, Throw out your 62K and 5.25" floppies and get with the 1980's, brother. It's all about the 3.5" "hard" disks now. They're radical! Ok.

Re: [PHP] Good PHP book?

2008-12-16 Thread Daniel Brown
On Tue, Dec 16, 2008 at 17:04, Jay Moore wrote: > > Floppies hold 1.4 megs now? Mine don't and they're even dual-sided. :( Jay, Throw out your 62K and 5.25" floppies and get with the 1980's, brother. It's all about the 3.5" "hard" disks now. They're radical! -- http://www.parasane.

Re: [PHP] Good PHP book?

2008-12-16 Thread Jay Moore
Robert Cummings wrote: On Tue, 2008-12-16 at 13:50 -0600, Jay Moore wrote: Ps. That was a lame attempt at humour... I extract and distill knowledge from the Internet and save myself from having to buy books. I hear they have that on computers now. I should check it out one of these days. Ma

Re: [PHP] Good PHP book?

2008-12-16 Thread Robert Cummings
On Tue, 2008-12-16 at 13:50 -0600, Jay Moore wrote: > > Ps. That was a lame attempt at humour... I extract and distill knowledge > > from the Internet and save myself from having to buy books. > > > I hear they have that on computers now. I should check it out one of > these days. Maybe I'll b

[PHP] Re: runtime access to static variable

2008-12-16 Thread Nathan Rixham
Jack Bates wrote: How do I access a static variable when I do not know the name of the class until runtime? I have the following example PHP: ket% cat test.php class Test { public static $STEPS = array( 'foo', 'bar'); } $className = 'Test'; var_dump($className::$STEPS); k

[PHP] Re: runtime access to static variable

2008-12-16 Thread Nathan Rixham
Jack Bates wrote: How do I access a static variable when I do not know the name of the class until runtime? I have the following example PHP: ket% cat test.php class Test { public static $STEPS = array( 'foo', 'bar'); } $className = 'Test'; var_dump($className::$STEPS); k

Re: [PHP] runtime access to static variable

2008-12-16 Thread ceo
Try this, maybe: ($className)::$STEPS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] runtime access to static variable

2008-12-16 Thread Jack Bates
How do I access a static variable when I do not know the name of the class until runtime? I have the following example PHP: ket% cat test.php http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-16 Thread support
On Monday, December 15, 2008 7:29 PM, gould...@mac.com wrote: I have a mySQL database with 700,000 records in it, which are presently keyed with an "auto-increment" field. What I'd like to do is create another field with a field where each and every record number has a unique keyvalue. Exampl

Re: [PHP] checking local file size

2008-12-16 Thread Bojan Tesanovic
Well you need to know the TMP file name that has been in progress of upload, it is usually at /tmp folder also you need to know the actual size of file uploading, there is an extension for PHP that will give you this info but you need to compile it , on my cars site for uploading images I am

Re: [PHP] Secure uploads tutorial

2008-12-16 Thread Ashley Sheridan
On Tue, 2008-12-16 at 16:02 +, Peter Ford wrote: > tedd wrote: > > I can't imagine evil code still working after someone resizes the file. > > > > Yeah, but the uploaded OpenOffice Writer doc won't look too good either... :) > > I prefer to move files to an off-line store, run them through a

[PHP] checking local file size

2008-12-16 Thread John P
I know this isn't a php question (though I'm using PHP for the server side... does that count?). I'm hoping though that some of you guys are just as experienced in ajax as you are PHP, because I can't find any good ajax forums. you can respond to me personally if needed, to keep it off the php

Re: [PHP] Good PHP book?

2008-12-16 Thread Brendon Van Heyzen
Web Database Applications with PHP & MySQL, PHP in action, and php.net --Brendon On Dec 14, 2008, at 5:33 PM, jeffery harris wrote: Hi guys/gals. I'm a first time user. Does anyone know of a good php book? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p

Re: [PHP] Re: Create unique non-autoincrement key for700,000records?

2008-12-16 Thread Ashley Sheridan
On Tue, 2008-12-16 at 09:56 +0100, Ondrej Kulaty wrote: > Sorry you are right. He said he wants each row to have an unique ID so > AutoIncId+timestamp will satisfy it, But still i think that adding > microseconds timestamp is better because it will be harder for potential > hacker to guess. > --

Re: [PHP] Good PHP book?

2008-12-16 Thread Jay Moore
Ps. That was a lame attempt at humour... I extract and distill knowledge from the Internet and save myself from having to buy books. I hear they have that on computers now. I should check it out one of these days. Maybe I'll buy a book. -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] Good PHP book?

2008-12-16 Thread Robert Cummings
On Tue, 2008-12-16 at 13:41 -0600, Jay Moore wrote: > Richard Heyes wrote: > I learned from PHP For Dummies. > >>> The title of that book isn't doing itself any favours... :-) > >>You'd be surprised. The "For Dummies" series is one of the > >> best-selling franchises in mainstream publish

Re: [PHP] FPDF Printing Ideas?

2008-12-16 Thread Dan Shirah
On Tue, Dec 16, 2008 at 2:32 PM, wrote: > > Just generate a much larger PDF with all the pages they asked for and call > it done. > :-) I don't think I can do it that way unfortunately. They will be printing 100-300 records in bulk...the amount of time it would take to generate one giant PDF f

Re: [PHP] Good PHP book?

2008-12-16 Thread Jay Moore
Richard Heyes wrote: I learned from PHP For Dummies. The title of that book isn't doing itself any favours... :-) You'd be surprised. The "For Dummies" series is one of the best-selling franchises in mainstream publishing history. Still, calling your audience dumb is generally regarded as

Re: [PHP] FPDF Printing Ideas?

2008-12-16 Thread ceo
Just generate a much larger PDF with all the pages they asked for and call it done. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] FPDF Printing Ideas?

2008-12-16 Thread Dan Shirah
Hello all, I'm looking for some suggestions. I'm writing a new application that generates PDF's on the fly with FPDF. Basically I have a search page where you can search for customer records. Once your search has returned the records you can then click on a link which will send the record_id to

Re: [PHP] dynamic forms

2008-12-16 Thread ceo
If you have their ID when you generate the HTML FORM, there is no need for anything as exotic as Ajax... //get their $ID //query the DB using $ID to get $whatever echo "", htmlentities($whatever), ""; If you don't know their ID until the interact with other form elements, then, yeah, go

RE: [PHP] dynamic forms

2008-12-16 Thread Jay Blanchard
[snip] I would like to create a from that will pull and display information based on a user's ID from a postgresql database into a textarea on the form, before the submit button is clicked. Are there some tutorials on how to use PHP to dynamically display information on a form as the form is being

[PHP] dynamic forms

2008-12-16 Thread Marc Fromm
I would like to create a from that will pull and display information based on a user's ID from a postgresql database into a textarea on the form, before the submit button is clicked. Are there some tutorials on how to use PHP to dynamically display information on a form as the form is being fill

Re: [PHP] custom php.ini

2008-12-16 Thread John Pillion
""Daniel Brown"" wrote in message news:... > I'm not certain about their configuration, but does DreamHost have > AllowOverrides turned on in their httpd.conf? > > If so, just place a full php.ini file in your root web directory > (not just the line for uploads_tmp_dir, but an entire

Re: [PHP] custom php.ini

2008-12-16 Thread Daniel Brown
On Tue, Dec 16, 2008 at 11:39, John P wrote: > Hello all, > > In short, I'm trying to set my uploads_tmp_dir variable, as my hosting > provider has it set ot the default NULL (I'm using dreamhost). > [snip!] > > any pointers? You won't be able to modify the upload_tmp_dir option, as it's PHP_

[PHP] custom php.ini

2008-12-16 Thread John P
Hello all, In short, I'm trying to set my uploads_tmp_dir variable, as my hosting provider has it set ot the default NULL (I'm using dreamhost). I tried setting my own php.ini as instructed exactly on their wiki (http://wiki.dreamhost.com/PHP.ini) but doing so causes PHP to essentially die. p

Re: [PHP] Good PHP book?

2008-12-16 Thread Richard Heyes
>>> I learned from PHP For Dummies. >> >> The title of that book isn't doing itself any favours... :-) > >You'd be surprised. The "For Dummies" series is one of the > best-selling franchises in mainstream publishing history. Still, calling your audience dumb is generally regarded as being "a

Re: Re: [PHP] Good PHP book?

2008-12-16 Thread Daniel Brown
Forwarded back to the list, Mario. Please hit "Reply-All" to keep it on the list. On Tue, Dec 16, 2008 at 11:44, Kastner Mario wrote: > I also read the "for dummies" book when i started with php. It gives me a > simple intro which power is behind php. My first application was a ftp client

Re: [PHP] Good PHP book?

2008-12-16 Thread Daniel Brown
On Tue, Dec 16, 2008 at 11:25, Richard Heyes wrote: >> I learned from PHP For Dummies. > > The title of that book isn't doing itself any favours... :-) You'd be surprised. The "For Dummies" series is one of the best-selling franchises in mainstream publishing history. -- http://www.parasa

Re: [PHP] Good PHP book?

2008-12-16 Thread Richard Heyes
> I learned from PHP For Dummies. The title of that book isn't doing itself any favours... :-) -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org (Updated December 5th) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

Re: [PHP] Good PHP book?

2008-12-16 Thread jordan
> Ashley Sheridan a écrit : >> On Sun, 2008-12-14 at 16:33 -0600, jeffery harris wrote: >>> Hi guys/gals. I'm a first time user. Does anyone know of a good php >>> book? >>> >>> >>> >> I tend to trust O'Reilly books a lot for all things programming, >> although I learnt largely with 'PHP, Apache,

Re: [PHP] Secure uploads tutorial

2008-12-16 Thread Peter Ford
tedd wrote: > I can't imagine evil code still working after someone resizes the file. > Yeah, but the uploaded OpenOffice Writer doc won't look too good either... :) I prefer to move files to an off-line store, run them through a unix 'file' command (with a mime-type magic file) to get the mime-

Re: [PHP] Secure uploads tutorial

2008-12-16 Thread tedd
At 11:45 PM +1100 12/16/08, Tim Starling wrote: I thought the list might be interested in a tutorial for secure web-based file uploads that I just wrote: http://tstarling.com/blog/2008/12/secure-web-uploads/ -- Tim Starling Tim: That's a good read -- thanks -- but it's more of an article tha

Re: [PHP] XML Get Value of Node DOMXPath

2008-12-16 Thread Rob Richards
Stephen Alistoun wrote: Hello all, Need help to get the value of the node. We know how to get the value of the city , item and itemPrice nodes below. How do we get the value of NumberOfRooms? $hotelElements = $xpath->query( '', $searchReponseElement );

[PHP] Secure uploads tutorial

2008-12-16 Thread Tim Starling
I thought the list might be interested in a tutorial for secure web-based file uploads that I just wrote: http://tstarling.com/blog/2008/12/secure-web-uploads/ -- Tim Starling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Create unique non-autoincrement key for700,000records?

2008-12-16 Thread Robert Cummings
On Tue, 2008-12-16 at 09:56 +0100, Ondrej Kulaty wrote: > Sorry you are right. He said he wants each row to have an unique ID so > AutoIncId+timestamp will satisfy it, But still i think that adding > microseconds timestamp is better because it will be harder for potential > hacker to guess. I a

Re: [PHP] Re: Create unique non-autoincrement key for700,000records?

2008-12-16 Thread Ondrej Kulaty
Sorry you are right. He said he wants each row to have an unique ID so AutoIncId+timestamp will satisfy it, But still i think that adding microseconds timestamp is better because it will be harder for potential hacker to guess. -- S pozdravem Ondøej Kulatý - Winternet s.r.

Re: [PHP] Re: Create unique non-autoincrement key for 700,000records?

2008-12-16 Thread Robert Cummings
On Tue, 2008-12-16 at 09:21 +0100, Ondrej Kulaty wrote: > I think he knows how to use it, he didn't show us a certain example where > and how he wants to use it, i just posted the way how i do generate an > unique identifier, if he use the first mentioned way - > AutoIncID+unix_timestamp - there

Re: [PHP] Re: Create unique non-autoincrement key for 700,000records?

2008-12-16 Thread Ondrej Kulaty
I think he knows how to use it, he didn't show us a certain example where and how he wants to use it, i just posted the way how i do generate an unique identifier, if he use the first mentioned way - AutoIncID+unix_timestamp - there can be a collision, when two users will attempt to perform thi

[PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-16 Thread franzemmanuel
Hi Rob, You can also use the PHP fonction Uniqid : md5(uniqid(rand(),true)); http://fr3.php.net/manual/en/function.uniqid.php Have a nice day. Zeuf Rob Gould a écrit : I have a mySQL database with 700,000 records in it, which are presently keyed with an "auto-increment" field. What I'd li