php-general Digest 17 Dec 2008 09:08:28 -0000 Issue 5850

2008-12-17 Thread php-general-digest-help
php-general Digest 17 Dec 2008 09:08:28 - Issue 5850 Topics (messages 284682 through 284720): Re: Secure uploads tutorial 284682 by: Ashley Sheridan 284714 by: Tim Starling 284716 by: Tim Starling Re: checking local file size 284683 by: Bojan Tesanovic

Re: [PHP] Good PHP book?

2008-12-17 Thread Lupus Michaelis
Daniel Brown a écrit : You'd be surprised. The For Dummies series is one of the best-selling franchises in mainstream publishing history. Best-selling are not a proof of quality. -- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org -- PHP General Mailing List

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

2008-12-17 Thread Jan Kaštánek
Chris: curl can handle timeouts much better (file_get_contents will timeout when the server on the other end says so). If you use stream context, you can set timeout to file_get_contents() as well. -- toby http://toby.cz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] checking local file size

2008-12-17 Thread John Pillion
I tried installing it like the documentation said... but I got the following errors. I contacted the hosting service (dreamhost) and they said they don't provide support for pecl, though they do support perl. Anyone? -- $ pecl install uploadprogress Failed to download

Re: [PHP] error flashing on redirect

2008-12-17 Thread Stut
2008/12/17 Terion Miller webdev.ter...@gmail.com: I am working on the login script I have been troubling over, and when I hit submit it throws an error and even though I have error reporting E_All on because its on a redirect or something I can see the error for only a split second so I can't

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

2008-12-17 Thread Robert Cummings
On Wed, 2008-12-17 at 11:32 +0100, Jochem Maas wrote: sometimes less is more (although oddly more is never less ;-) What about when more is black holes? hmm. I guess that would depend on which side of the event horizon you were at. :-) Is there conservation of reality across the

Re: [PHP] Good PHP book?

2008-12-17 Thread Robert Cummings
On Wed, 2008-12-17 at 10:47 +, Richard Heyes wrote: Floppies hold 1.4 megs now? Mine don't and they're even dual-sided. :( What are Floppies? Is it a reference to a particular male problem? If so, then I want to know what dual sided means? Cheers, Rob. -- http://www.interjinn.com

RE: [PHP] checking local file size

2008-12-17 Thread David Robley
John Pillion wrote: 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

Re: [PHP] Phpmyadmin password

2008-12-17 Thread VamVan
Yeah I felt the same. It should be config.inc.php. Well I dont think its in clear text though (alteast in the latest version). May be u can do a bowl fish encryption of your new custom password and reset it in the file. Thanks, V On Wed, Dec 17, 2008 at 9:01 AM, Jim Lucas li...@cmsws.com wrote:

Re: [PHP] error flashing on redirect

2008-12-17 Thread ceo
Change php.ini (or .htacces or ini_set) so that display_errors is OFF and log_errors is ON and log them to some file you do this to, all day, every day: tail -f /var/log/httpd/error_log You'll definitely need this as you get more complex site interaction, particularly with Ajax calls that

[PHP] error flashing on redirect

2008-12-17 Thread Terion Miller
I am working on the login script I have been troubling over, and when I hit submit it throws an error and even though I have error reporting E_All on because its on a redirect or something I can see the error for only a split second so I can't catch it to figure it out (does this make sense?) how

Re: [PHP] Curl with asp pages....

2008-12-17 Thread shiplu
On Wed, Dec 17, 2008 at 6:28 AM, ioannes ioan...@btinternet.com wrote: shiplu wrote: On Sun, Dec 7, 2008 at 8:22 AM, ioannes ioan...@btinternet.com wrote: shiplu wrote: When you are dealing with curl, anything can be done as long as its a HTTP request.Its all about sending HTTP headers

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

2008-12-17 Thread tedd
At 9:23 PM -0500 12/16/08, Robert Cummings wrote: I haven't come accross UUID() before. It looks time based to me. Yeah, it stops the nine month thing. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List

Re: [PHP] Good PHP book?

2008-12-17 Thread David Robley
Daniel Brown wrote: On Tue, Dec 16, 2008 at 17:11, Jay Moore jaymo...@accu-com.com 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

[PHP] Printing

2008-12-17 Thread Dan Shirah
Hello all, Could someone please point me in the right direction for printing files through PHP? I already have my application setup so that it creates documents and saves them to a folder. How would I go about printing all of the files in the folder via PHP? I've looked into the Print

Re: [PHP] Printing

2008-12-17 Thread Bastien Koert
On Wed, Dec 17, 2008 at 2:57 PM, Dan Shirah mrsqua...@gmail.com wrote: Hello all, Could someone please point me in the right direction for printing files through PHP? I already have my application setup so that it creates documents and saves them to a folder. How would I go about printing

Re: [PHP] Printing

2008-12-17 Thread Jason Pruim
On Dec 17, 2008, at 2:57 PM, Dan Shirah wrote: Hello all, Could someone please point me in the right direction for printing files through PHP? I already have my application setup so that it creates documents and saves them to a folder. How would I go about printing all of the files

RE: [PHP] Printing

2008-12-17 Thread Jay Blanchard
[snip] Could someone please point me in the right direction for printing files through PHP? I already have my application setup so that it creates documents and saves them to a folder. How would I go about printing all of the files in the folder via PHP? I've looked into the Print functions in

Re: [PHP] Printing

2008-12-17 Thread Dan Shirah
Do you want to print this on your office printer or on the website users printer? If you are looking for away to print it on their printer, why not just grab all the files that need to be printed, make a PDF of it, and then use the browsers print feature? -- Jason Pruim

Re: [PHP] Printing

2008-12-17 Thread Dan Shirah
Does it save them to a folder on the server? Or does it save them on the client? If it is on the server then the server would have to send the docs to a printer queue. If it is on the client PHP cannot really do anything about. PHP cannot force the client to print but it could send the

Re: [PHP] Printing

2008-12-17 Thread Bastien Koert
On Wed, Dec 17, 2008 at 3:16 PM, Dan Shirah mrsqua...@gmail.com wrote: Do you want to print this on your office printer or on the website users printer? If you are looking for away to print it on their printer, why not just grab all the files that need to be printed, make a PDF of

[PHP] Missing namespaceURI after importNode()

2008-12-17 Thread Tim Lind
Hi I am importing a node into a new document so that I can perform an XSL transformation on just that node. This works sometimes, however, I've come into the following problem, where the namespaceURI is there on the node but doesn't make it through the importNode() to the next document.

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

2008-12-17 Thread Jochem Maas
Robert Cummings schreef: 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

Re: [PHP] Printing

2008-12-17 Thread Dan Shirah
You can't, the best you can do is send the PDF down and let the user choose to do with it what they will -- Bastien So you think I should try and look into a way to have FPDF append each document to the already created document, and once all pages have been added to the PDF force it

Re: [PHP] Printing

2008-12-17 Thread Dan McCullough
I did something similar, but it was some work I did for a company and the application was an internal application that used PHP and a Java applet to send the file to a workers local printer since it cant be accomplished by PHP itself. On Wed, Dec 17, 2008 at 3:30 PM, Dan Shirah

Re: [PHP] Good PHP book?

2008-12-17 Thread David Robley
Lupus Michaelis wrote: Daniel Brown a écrit : You'd be surprised. The For Dummies series is one of the best-selling franchises in mainstream publishing history. Best-selling are not a proof of quality. Viz: Windows Version xx.x Cheers -- David Robley Windows: XT emulator

Re: [PHP] Good PHP book?

2008-12-17 Thread Richard Heyes
Floppies hold 1.4 megs now? Mine don't and they're even dual-sided. :( What are Floppies? Is it a reference to a particular male problem? -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org (Updated December 5th) -- PHP General Mailing List

Re: [PHP] Secure uploads tutorial

2008-12-17 Thread tedd
At 1:55 PM +1100 12/17/08, Tim Starling wrote: There are some file types, such as .png and .wav, where that approach is not at all secure. The file command will tell you that the file is image/png, but IE 6 will detect it as text/html and run scripts in it. Oh, I see the problem (I think). I

Re: [PHP] Good PHP book?

2008-12-17 Thread Richard Heyes
Sounds like you need Self Esteem for Dummies. Lol. It's not a question of self-esteem, more based on the number of non-starter businesses I've attempted to start. -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org (Updated December 5th) -- PHP General

Re: [PHP] Phpmyadmin password

2008-12-17 Thread Jim Lucas
Micah Gersten wrote: 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

Re: [PHP] Good PHP book?

2008-12-17 Thread Ashley Sheridan
On Wed, 2008-12-17 at 13:13 -0500, Robert Cummings wrote: On Wed, 2008-12-17 at 10:47 +, Richard Heyes wrote: Floppies hold 1.4 megs now? Mine don't and they're even dual-sided. :( What are Floppies? Is it a reference to a particular male problem? If so, then I want to know what

[PHP] Re: Missing namespaceURI after importNode()

2008-12-17 Thread Nathan Rixham
Tim Lind wrote: Hi I am importing a node into a new document so that I can perform an XSL transformation on just that node. This works sometimes, however, I've come into the following problem, where the namespaceURI is there on the node but doesn't make it through the importNode() to the

Re: [PHP] Good PHP book?

2008-12-17 Thread Nathan Rixham
Ashley Sheridan wrote: On Wed, 2008-12-17 at 13:13 -0500, Robert Cummings wrote: On Wed, 2008-12-17 at 10:47 +, Richard Heyes wrote: Floppies hold 1.4 megs now? Mine don't and they're even dual-sided. :( What are Floppies? Is it a reference to a particular male problem? If so, then I

[PHP] Read/decode barcodes from an image

2008-12-17 Thread Adam Randall
I'm amazed that this either doesn't exist, or is hard to find. I basically am looking for a way to read in an image into PHP, or shell out to something on the Linux side, and determine, and see if it has a barcode in it or not. If it does, I need to decode the barcode so that I can identify the

Re: [PHP] Good PHP book?

2008-12-17 Thread Matty Sarro
When you really want to learn a language, I find it useful to have a book that teaches you the language, and then a book for reference. Head First PHP is a GREAT starter book, especially if you're the type whose eyes glaze over when you're presented with walls of text. Its easy to read and very

Re: [PHP] Read/decode barcodes from an image

2008-12-17 Thread Robert Cummings
On Wed, 2008-12-17 at 14:56 -0800, Adam Randall wrote: I'm amazed that this either doesn't exist, or is hard to find. I basically am looking for a way to read in an image into PHP, or shell out to something on the Linux side, and determine, and see if it has a barcode in it or not. If it does,

[PHP] Re: Read/decode barcodes from an image

2008-12-17 Thread Nathan Rixham
Adam Randall wrote: I'm amazed that this either doesn't exist, or is hard to find. I basically am looking for a way to read in an image into PHP, or shell out to something on the Linux side, and determine, and see if it has a barcode in it or not. If it does, I need to decode the barcode so that

Re: [PHP] Re: Read/decode barcodes from an image

2008-12-17 Thread Ashley Sheridan
On Thu, 2008-12-18 at 00:04 +, Nathan Rixham wrote: Adam Randall wrote: I'm amazed that this either doesn't exist, or is hard to find. I basically am looking for a way to read in an image into PHP, or shell out to something on the Linux side, and determine, and see if it has a barcode

[PHP] Re: Read/decode barcodes from an image

2008-12-17 Thread Al
If anything can do it, it'll be ImageMagick Adam Randall wrote: I'm amazed that this either doesn't exist, or is hard to find. I basically am looking for a way to read in an image into PHP, or shell out to something on the Linux side, and determine, and see if it has a barcode in it or not. If

Re: [PHP] Re: Read/decode barcodes from an image

2008-12-17 Thread Bastien Koert
On Wed, Dec 17, 2008 at 7:42 PM, Al n...@ridersite.org wrote: If anything can do it, it'll be ImageMagick Adam Randall wrote: I'm amazed that this either doesn't exist, or is hard to find. I basically am looking for a way to read in an image into PHP, or shell out to something on the Linux

Re: [PHP] Curl with asp pages....

2008-12-17 Thread Benjamin Hawkes-Lewis
Ashley Sheridan wrote: There is a slight difference in how ASP handles multiple form fields that share the same name (as well as SELECT MULTIPLE lists) such that ASP does not need (and should not use) square brackets in field names the way PHP does. Andrew I thought that square brackets were

[PHP] fread question

2008-12-17 Thread MikeP
Hello, I have been trying to use fread to open a file, but it always escapes special characters. How do I open afile without it modifying my original file: $_POST[$fname] = fread($fileHandle, $_POST[$fname.'_size']); I use this and get slashes everywhere.This kills my REGex that gets coded

[PHP] Re: runtime access to static variable

2008-12-17 Thread Jack Bates
this does beg the question why don't you know the classname at runtime.. seems to be a slight design flaw and may make sense for you to post the full problem (you must have chosen to implement this for a reason..) The full problem is: I started off with a DeployTask for deploying a new

Re: [PHP] fread question

2008-12-17 Thread Robert Cummings
On Wed, 2008-12-17 at 19:54 -0500, MikeP wrote: Hello, I have been trying to use fread to open a file, but it always escapes special characters. How do I open afile without it modifying my original file: $_POST[$fname] = fread($fileHandle, $_POST[$fname.'_size']); I use this and get

[PHP] Re: runtime access to static variable

2008-12-17 Thread Nathan Rixham
Jack Bates wrote: this does beg the question why don't you know the classname at runtime.. seems to be a slight design flaw and may make sense for you to post the full problem (you must have chosen to implement this for a reason..) The full problem is: I started off with a DeployTask for

[PHP] PHP Form email w/attachment

2008-12-17 Thread jeffery harris
I need to create a php form and mail it to a recipient (that I can do). My question is how do I create an area for a file (.doc, or .pdf) to be attached emailed along with other form data as well? -Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] PHP Form email w/attachment

2008-12-17 Thread Bastien Koert
On Wed, Dec 17, 2008 at 11:02 PM, jeffery harris jhar...@harris4interactive.com wrote: I need to create a php form and mail it to a recipient (that I can do). My question is how do I create an area for a file (.doc, or .pdf) to be attached emailed along with other form data as well? -Jeff

Re: [PHP] PHP Form email w/attachment

2008-12-17 Thread Kastner Mario
use a mailer class, for example phpmailer, to handle this. man i say emailing could be a very crazy job for an coder. thank god that some guys make it simple for us ;) http://sourceforge.net/projects/phpmailer I need to create a php form and mail it to a recipient (that I can do). My

Re: [PHP] PHP Form email w/attachment

2008-12-17 Thread jeffery harris
Thanks for the info! sweet!! Kastner Mario off...@unite-it.at wrote in message news:200812180603.34938.off...@unite-it.at... use a mailer class, for example phpmailer, to handle this. man i say emailing could be a very crazy job for an coder. thank god that some guys make it simple for us

Re: [PHP] Read/decode barcodes from an image

2008-12-17 Thread Adam Randall
Are you referring to a project, class, or just generally curious about what I'm asking? Barcode reader can be many things, including a scanning wand (not applicable to what I am looking for). On Wed, Dec 17, 2008 at 3:47 PM, Robert Cummings rob...@interjinn.com wrote: On Wed, 2008-12-17 at 14:56

Re: [PHP] Re: Read/decode barcodes from an image

2008-12-17 Thread Adam Randall
This completely internal, and highly sensitive. Also, the documents themselves will different every time likely as they can either be faxes with who knows what type of skewing/quality/orientation. I need to be able to read them and find out what the barcodes are, if any. Adam. On Wed, Dec 17,

Re: [PHP] Re: Read/decode barcodes from an image

2008-12-17 Thread Adam Randall
I would have thought so too, but haven't found anything yet. Maybe there is an answer there (I have Imagick installed for example). iText, a java utility, has the ability to write barcodes nicely to PDF, too bad that there's no some reverse there either. Adam. On Wed, Dec 17, 2008 at 4:42 PM, Al

Re: [PHP] Re: Read/decode barcodes from an image

2008-12-17 Thread Adam Randall
Yeah, I have played with JOCR/GOCR, but it seemed somewhat inaccurate. Does anyone have any examples of working with it in code so that I can figure out how to incorporate it into my solutions? Adam. On Wed, Dec 17, 2008 at 5:17 PM, Bastien Koert phps...@gmail.com wrote: On Wed, Dec 17, 2008 at

[PHP] Re: Missing namespaceURI after importNode()

2008-12-17 Thread Tim Lind
Nathan Rixham wrote: Tim Lind wrote: Hi I am importing a node into a new document so that I can perform an XSL transformation on just that node. This works sometimes, however, I've come into the following problem, where the namespaceURI is there on the node but doesn't make it through the

Re: [PHP] Re: Read/decode barcodes from an image

2008-12-17 Thread Yeti
Basic bar code detection is not that difficult. You set a couple of virtual lines over the images and crawl them pixel by pixel. Then you count the black/white changes and the density of each change. I could even think of doing this using GD if I had the time. On the other hand it can get pretty

Re: [PHP] Printing

2008-12-17 Thread clive
Dan Shirah wrote: Hello all, Could someone please point me in the right direction for printing files through PHP? On I project I recently worked on, I used php to read a template file (rtf) and makes some changes and then save it in a folder on the server. This was a windows machine and I