php-general Digest 5 Apr 2007 18:43:01 -0000 Issue 4717

2007-04-05 Thread php-general-digest-help
php-general Digest 5 Apr 2007 18:43:01 - Issue 4717 Topics (messages 252074 through 252096): SimpleXML end of element/tag error 252074 by: Don Don 252075 by: JM Guillermin DOMDocument::schemaValidate() - libxml_get_errors() 252076 by: Sébastien WENSKE 252078

[PHP] SimpleXML end of element/tag error

2007-04-05 Thread Don Don
I am using simple xml to parse an xml file, the program parses the file and produces an error at the end of the foreach loop when it reaches the end of the tag, it tries to look for an element/tag when there is none and produces an error Call to a member function attributes() on a non-object

Re: [PHP] SimpleXML end of element/tag error

2007-04-05 Thread JM Guillermin
And with : foreach ($xml as $cs) { . } ?? jm - Original Message - From: Don Don [EMAIL PROTECTED] To: PHP List php-general@lists.php.net Sent: Thursday, April 05, 2007 10:32 AM Subject: [PHP] SimpleXML end of element/tag error I am using simple xml to parse an xml file, the

Re: [PHP] Mail function

2007-04-05 Thread Shafiq Rehman
Hi, What i understand is, you have written a new function for sending emails. Are you passing all the variables to that function? If not, you have to pass. or you can use my function ?php // function declaration, This function can send only HTML emails function sendMail ($toEmail, $subject,

[PHP] DOMDocument::schemaValidate() - libxml_get_errors()

2007-04-05 Thread Sébastien WENSKE
Hello all, (sorry for my bad english) I've this script, it checks an XML file with an XSD file. it reports errors in the XML with line number, but i've large XML file (up to 560MB) and the line number doesn't exceed 65535. for upper lines he return always 65535. An idea ? Thx in advance.

Re: [PHP] Audio CAPTCHA review request

2007-04-05 Thread Tijnema !
I often wondered why simple CAPTCHA's like Type the number seven four three, or What is the sum of two plus three?, or Spell cat, or Spell two wouldn't work? Certainly, one can create a routine coupled a dB to randomly produce thousands of different combinations of simple questions. Likewise, a

Re: [PHP] DOMDocument::schemaValidate() - libxml_get_errors()

2007-04-05 Thread Tijnema !
On 4/5/07, Sébastien WENSKE [EMAIL PROTECTED] wrote: Hello all, (sorry for my bad english) I've this script, it checks an XML file with an XSD file. it reports errors in the XML with line number, but i've large XML file (up to 560MB) and the line number doesn't exceed 65535. for upper lines he

Re: [PHP] Audio CAPTCHA review request

2007-04-05 Thread tedd
At 3:28 PM +0200 4/5/07, Tijnema ! wrote: I often wondered why simple CAPTCHA's like Type the number seven four three, or What is the sum of two plus three?, or Spell cat, or Spell two wouldn't work? Certainly, one can create a routine coupled a dB to randomly produce thousands of different

Re: [PHP] Audio CAPTCHA review request

2007-04-05 Thread Jason Pruim
On Apr 5, 2007, at 10:08 AM, tedd wrote: That's a good point. Not only should a captcha be accessible by sighted, visually impaired, deaf-blind, cognitive impaired, and other disabilities not mentioned, but also deal with all languages as well. It certainly sounds impossible, but

[PHP] advice on sql injection/XSS prevention

2007-04-05 Thread Bing Du
Hi, I'm not an experienced PHP developer. We're hosting a content management system that allow authorized people to add PHP contents. Their PHP coding levels varies. Some are very security sensitive, but some are not. I want to know if PHP has any ready-to-use funtion to validate form input

Re: [PHP] Audio CAPTCHA review request

2007-04-05 Thread tedd
At 3:39 PM +0200 4/5/07, Tijnema ! wrote: Yes, but using a too hard protection where it isn't needed makes people irritated and they will hate your site. If you're using more then 1 CAPTCHA program on a simple board for example. But if you have a site like the NSA, yes, then it wouldn't be very

Re: [PHP] DOMDocument::schemaValidate() - libxml_get_errors()

2007-04-05 Thread JM Guillermin
If the error occure after the line 65535, libxml_get_errors() returns 65535. Maybe this can help you Sébastien : Class: LibXMLError Properties (Read-Only): (int) level (int) code (int) column (string) message (string) file (int) line jm -

Re: [PHP] advice on sql injection/XSS prevention

2007-04-05 Thread Zoltán Németh
I think it is generally a Bad Idea to allow users to submit code into your system... you would be better off if you would provide some pseudo-coding possibilities which would allow them to insert certain functionalities into their content - with you providing the real code running behind and

Re: [PHP] Audio CAPTCHA review request

2007-04-05 Thread Robert Cummings
On Thu, 2007-04-05 at 10:19 -0400, tedd wrote: At 3:39 PM +0200 4/5/07, Tijnema ! wrote: Yes, but using a too hard protection where it isn't needed makes people irritated and they will hate your site. If you're using more then 1 CAPTCHA program on a simple board for example. But if you have a

Re: [PHP] Audio CAPTCHA review request

2007-04-05 Thread tedd
At 3:39 PM +0200 4/5/07, Tijnema ! wrote: Still, I don't see any way that a computer could make the difference between a user and a computer. Because some computers can't be smarter then others. It's only the way they're programmed. Tijnema Tijnema: You may very well be correct. I've often

Re: [PHP] Audio CAPTCHA review request

2007-04-05 Thread tedd
At 10:25 AM -0400 4/5/07, Robert Cummings wrote: However, I like my dot captcha (been fixed for IE 5 IE 6) , see: http://sperling.com/examples/dot-captcha/index.php As you can see, it's only for sighted users. My mouse is broken and I couldn't navigate to it using my keyboard! :B

Re: [PHP] Audio CAPTCHA review request

2007-04-05 Thread Tijnema !
On 4/5/07, tedd [EMAIL PROTECTED] wrote: At 10:25 AM -0400 4/5/07, Robert Cummings wrote: However, I like my dot captcha (been fixed for IE 5 IE 6) , see: http://sperling.com/examples/dot-captcha/index.php As you can see, it's only for sighted users. My mouse is broken and I couldn't

Re: [PHP] Audio CAPTCHA review request

2007-04-05 Thread Robert Cummings
On Thu, 2007-04-05 at 16:52 +0200, Tijnema ! wrote: On 4/5/07, tedd [EMAIL PROTECTED] wrote: At 10:25 AM -0400 4/5/07, Robert Cummings wrote: However, I like my dot captcha (been fixed for IE 5 IE 6) , see: http://sperling.com/examples/dot-captcha/index.php As you can see,

[PHP] Debugging Extensions (APD, etc.)

2007-04-05 Thread Daniel Brown
Does anyone have any experience using engine-level debuggers and/or extensions in PHP? I installed the PECL module APD just a moment ago, and haven't even used it yet, because I wanted to see if anyone here has a better suggestion. I'd like something that will track which functions are being

Re: [PHP] Debugging Extensions (APD, etc.)

2007-04-05 Thread Eric Butera
On 4/5/07, Daniel Brown [EMAIL PROTECTED] wrote: Does anyone have any experience using engine-level debuggers and/or extensions in PHP? I installed the PECL module APD just a moment ago, and haven't even used it yet, because I wanted to see if anyone here has a better suggestion. I'd like

Re: [PHP] Audio CAPTCHA review request

2007-04-05 Thread jochem
tedd wrote: However, I'm not convinced that all sound methodologies can be resolved as simply as that. For example -- your method looks for pauses/high points and then capsulizes segments for comparison against known sounds. That's OK, but what if there is other meaning in the sound?

Re: [PHP] Audio CAPTCHA review request

2007-04-05 Thread Tijnema !
What can you do to make audio captcha's harder? Add more voice! This is exactly what google has done on their updated audio captcha. This really helps, you need a much more fine grained and larger voice model to trancribe that. I still think it is doable, but the amount of training work that is

[PHP] PDF: error

2007-04-05 Thread Mário Gamito
Hi, I've managed to make the PDF download system work. But when it opens in acrobat reader, i get the error you can see in: http://www.gamito.org/fucked-pdf-2.jpg The code follows my signature. Any help would be appreciated. Warm Regards -- :wq! Mário Gamito -- ?php session_start(); if

Re: [PHP] PDF: error

2007-04-05 Thread Tijnema !
On 4/5/07, Mário Gamito [EMAIL PROTECTED] wrote: Hi, I've managed to make the PDF download system work. But when it opens in acrobat reader, i get the error you can see in: http://www.gamito.org/fucked-pdf-2.jpg The code follows my signature. Any help would be appreciated. Warm Regards --

Re: [PHP] PDF: error

2007-04-05 Thread Stut
Mário Gamito wrote: $data = readfile($full); The readfile function does not return the contents of the file. I suggest you RTFM: http://php.net/readfile -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Idea/Suggestion for PHP App

2007-04-05 Thread straderb
Hey... I am new to the list so please forgive me if I say anything that might have already been discussed. So here we go... OK I am attempting to start a new application using PHP. I have started and stoped this application now 2 times cause I get moving then I stop realizing I should have

Re: [PHP] Mail function

2007-04-05 Thread Zhimmy Kanata
Hi, Tried it...but it didn't work...Not sure why. I am using a respectable ISP and they are looking at the problem although they tend to take their time. I figure I must not be passing the variable. I will post my entire code. For all those that help again thank you. ?php

Re: [PHP] PDF: error

2007-04-05 Thread Mário Gamito
Hi, Where did you get the $data variable? as filesize($data) would return false here, and that's not a good value for the Content-Length header :) Sorry, bad Copy Paste. I get it from: $data = readfile($full); Result in the browser is: %PDF-1.4 %âãÏÓ 351 0 obj endobj xref 351 434

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread Eric Butera
On 4/5/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hey... I am new to the list so please forgive me if I say anything that might have already been discussed. So here we go... OK I am attempting to start a new application using PHP. I have started and stoped this application now 2 times

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread afan
first step is: take a paper and pen and start drawing your app structure in blocks. once you finished your app on the paper start drawing db structure. start coding after you have the solution for every situation. :D -afan Hey... I am new to the list so please forgive me if I say anything

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread Robert Cummings
On Thu, 2007-04-05 at 21:36 +0200, [EMAIL PROTECTED] wrote: first step is: take a paper and pen and start drawing your app structure in blocks. once you finished your app on the paper start drawing db structure. start coding after you have the solution for every situation. You're kidding

Re: [PHP] PDF: error

2007-04-05 Thread Tijnema !
On 4/5/07, Stut [EMAIL PROTECTED] wrote: Mário Gamito wrote: $data = readfile($full); The readfile function does not return the contents of the file. I suggest you RTFM: http://php.net/readfile -Stut I wanted to say that :P. it outputs the file directly to the browser, and returns the

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread straderb
Eric Butera wrote .. On 4/5/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hey... I am new to the list so please forgive me if I say anything that might have already been discussed. So here we go... OK I am attempting to start a new application using PHP. I have started and stoped this

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread afan
On Thu, 2007-04-05 at 21:36 +0200, [EMAIL PROTECTED] wrote: first step is: take a paper and pen and start drawing your app structure in blocks. once you finished your app on the paper start drawing db structure. start coding after you have the solution for every situation. You're kidding

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread Børge Holen
On Thursday 05 April 2007 21:36, [EMAIL PROTECTED] wrote: first step is: take a paper and pen and start drawing your app structure in blocks. once you finished your app on the paper start drawing db structure. start coding after you have the solution for every situation. This sounds like the

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread Eric Butera
On 4/5/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Eric Butera wrote .. On 4/5/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hey... I am new to the list so please forgive me if I say anything that might have already been discussed. So here we go... OK I am attempting to start a new

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread Paul Novitski
At 4/5/2007 12:06 PM, [EMAIL PROTECTED] wrote: OK I am attempting to start a new application using PHP. I have started and stoped this application now 2 times cause I get moving then I stop realizing I should have done this work before hand and in a differant way. I was wondering does anyone

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread tg-php
I think you're probably doing what almost all of us have done. Get an idea, see PHP as a potential solution and decided to just dive right in. I don't think many people start out in a classroom style Hello World situation and build slowly onto that. I'm sure other people have better starter

Re: [PHP] DOMDocument::schemaValidate() - libxml_get_errors()

2007-04-05 Thread Sébastien WENSKE
Yes it's exactly the error, see the output : DOMDocument::schemaValidate() Generated Errors! Error 1871: Element 'EcheanceRMC': This element is not expected. in file:///D%3A/wamp/www/XML%20Validator/xml/Edit4.xml on line 33326 - that's right Error 1871: Element 'EcheanceRMC': This element is

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread Robert Cummings
On Thu, 2007-04-05 at 21:59 +0200, [EMAIL PROTECTED] wrote: On Thu, 2007-04-05 at 21:36 +0200, [EMAIL PROTECTED] wrote: first step is: take a paper and pen and start drawing your app structure in blocks. once you finished your app on the paper start drawing db structure. start coding

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread Zoltán Németh
2007. 04. 5, csütörtök keltezéssel 16.23-kor Robert Cummings ezt írta: On Thu, 2007-04-05 at 21:59 +0200, [EMAIL PROTECTED] wrote: On Thu, 2007-04-05 at 21:36 +0200, [EMAIL PROTECTED] wrote: first step is: take a paper and pen and start drawing your app structure in blocks. once you

RE: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread Warren Vail
I would also encourage plagiarism (something that you can do with open source, well, within reason). Download and install other peoples solutions, look at their code, and figure out what worked for them and what didn't. You not only get new ideas, but will pick up on techniques that the author

Re: [PHP] PHP textbook suggestions?

2007-04-05 Thread Zoltán Németh
2007. 04. 5, csütörtök keltezéssel 12.52-kor Chris Lott ezt írta: Looking for suggestions for a PHP textbook for an Intro to Web Programming class that will be using PHP5 and MySQL. This is a first-semester course, so no programming experience required. It would be nice to have a text that

[PHP] PHP textbook suggestions?

2007-04-05 Thread Chris Lott
Looking for suggestions for a PHP textbook for an Intro to Web Programming class that will be using PHP5 and MySQL. This is a first-semester course, so no programming experience required. It would be nice to have a text that adhered to (what I see as) good practice using quotation marks... i.e.

Re: [PHP] DOMDocument::schemaValidate() - libxml_get_errors()

2007-04-05 Thread JM Guillermin
It seems to be something like that, maybe try to find additional informations on the LibXMLError class. good luck. jm - Original Message - From: Sébastien WENSKE [EMAIL PROTECTED] To: JM Guillermin [EMAIL PROTECTED]; Tijnema ! [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent:

[PHP] Re: PHP textbook suggestions?

2007-04-05 Thread Timothy Murphy
Chris Lott wrote: Looking for suggestions for a PHP textbook for an Intro to Web Programming class that will be using PHP5 and MySQL. This is a first-semester course, so no programming experience required. It would be nice to have a text that adhered to (what I see as) good practice using

Re: [PHP] PHP textbook suggestions?

2007-04-05 Thread Tijnema !
On 4/5/07, Zoltán Németh [EMAIL PROTECTED] wrote: 2007. 04. 5, csütörtök keltezéssel 12.52-kor Chris Lott ezt írta: Looking for suggestions for a PHP textbook for an Intro to Web Programming class that will be using PHP5 and MySQL. This is a first-semester course, so no programming experience

Re: [PHP] DOMDocument::schemaValidate() - libxml_get_errors()

2007-04-05 Thread Tijnema !
On 4/5/07, Sébastien WENSKE [EMAIL PROTECTED] wrote: Yes it's exactly the error, see the output : DOMDocument::schemaValidate() Generated Errors! Error 1871: Element 'EcheanceRMC': This element is not expected. in file:///D%3A/wamp/www/XML%20Validator/xml/Edit4.xml on line 33326 - that's right

Re: [PHP] Audio CAPTCHA review request

2007-04-05 Thread tedd
At 10:59 AM -0400 4/5/07, Robert Cummings wrote: If you're gonna do this, you probably need to remove a little piece in your security, which isn't wanted of course :) I'm just playing devil's advocate... (my mouse isn't really broken) this is about accessibility after all :) Cheers, Rob.

[PHP] PHP Mail function

2007-04-05 Thread Zhimmy Kanata
For whatever reason I can't pass the variable $email into the mail function to make it send me an email..can anyone help? Here is my code ?php require(config.php); require(functions.php); //echo some styles to spice it up... echo style body { background: #131313;

Re: [PHP] Audio CAPTCHA review request

2007-04-05 Thread Robert Cummings
On Thu, 2007-04-05 at 18:14 -0400, tedd wrote: Rob: Okay, nothing wrong with playing devil's advocate. I open to discussion. Note, that some of my blind testers report that there are ways for them to move a mouse -- but I haven't a clue as to how they do it or what they see. However,

Re: [PHP] PDF: error

2007-04-05 Thread Jochem Maas
you code is *still* borked in pretty much the same way it was to begin with ... ?php session_start(); if (isset($_SESSION['email'])) { if (isset($_GET['file'])) { $file = basename($_GET['file']); $full = '/var/www/'.$file; if

[PHP] Using /index.php/this/that/343/3 style links but having a prob!

2007-04-05 Thread Mike Shanley
Hi, I'm trying to make friends with search-engines, but I'm having a problem. When I use my links (right now, I've only got the forums on my site up), they take me to the right place, however, the browser only displays part of the url... for instance:

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread Jochem Maas
lets see if I can add anything useful (you be the judge)... 1. aim high, you only learn when you push yourself beyond what you can already do. 2. take/make notes as you go, don't try to keep everything in your head :) 3. occasionally cut a few corners when you've bitten off more than you can

Re: [PHP] PHP textbook suggestions?

2007-04-05 Thread itoctopus
I beg to differ with everyone who said there's no difference between the single quote and double quote. Although the double quote is much more flexible, the single quote is better, as there will be no evaluation of the string for potential variables inside the string. And Chris, about the book,

Re: [PHP] PHP textbook suggestions?

2007-04-05 Thread Jochem Maas
Chris Lott wrote: Looking for suggestions for a PHP textbook for an Intro to Web Programming class that will be using PHP5 and MySQL. This is a first-semester course, so no programming experience required. It would be nice to have a text that adhered to (what I see as) good every that

Re: [PHP] Using /index.php/this/that/343/3 style links but having a prob!

2007-04-05 Thread Jochem Maas
Mike Shanley wrote: Hi, I'm trying to make friends with search-engines, but I'm having a problem. When I use my links (right now, I've only got the forums on my site up), they take me to the right place, however, the browser only displays part of the url... like in the addressbar? using

Re: [PHP] Using /index.php/this/that/343/3 style links but having a prob!

2007-04-05 Thread Mike Shanley
like in the addressbar? using IE by any chance? .. I don't see this in firefox. Oddly enough, I'm using firefox and having the problem. Curious. dunno, long night? short addressbar? if in doubt view the source luke. I keep going over the source. I have the $CALL array being printed

Re: [PHP] Using /index.php/this/that/343/3 style links but having a prob!

2007-04-05 Thread Jochem Maas
Mike Shanley wrote: like in the addressbar? using IE by any chance? .. I don't see this in firefox. Oddly enough, I'm using firefox and having the problem. Curious. dunno, long night? short addressbar? if in doubt view the source luke. I keep going over the source. I have the

[PHP] HELP with mail()

2007-04-05 Thread Zhimmy Kanata
I created the following email program from a email function that I know works in another program. When I create a simple form page listed below and submit it. It echos the $email and the $username and it writes it to the page. So it is finding the variables within the transfering url in

[PHP] Re: advice on sql injection/XSS prevention

2007-04-05 Thread Manuel Lemos
Hello, on 04/05/2007 11:17 AM Bing Du said the following: Hi, I'm not an experienced PHP developer. We're hosting a content management system that allow authorized people to add PHP contents. Their PHP coding levels varies. Some are very security sensitive, but some are not. I want to

[PHP] Re: advice on sql injection/XSS prevention

2007-04-05 Thread Manuel Lemos
Hello, on 04/05/2007 11:17 AM Bing Du said the following: Hi, I'm not an experienced PHP developer. We're hosting a content management system that allow authorized people to add PHP contents. Their PHP coding levels varies. Some are very security sensitive, but some are not. I want to

[PHP] I want to pass Sub Window the value with PHP and JavaScript.

2007-04-05 Thread Napura
Hello I say Napura. In the code shown below no with PHPJavaScript Hajime.php passes it to kekka.php. For a href='Javascript:xsubmit($k)' though the data of no extends without trouble _ blank target = is added. Data cannot be received though new Sabwindow opens when assuming a