php-general Digest 6 May 2006 04:33:49 -0000 Issue 4112

2006-05-05 Thread php-general-digest-help
php-general Digest 6 May 2006 04:33:49 - Issue 4112 Topics (messages 235652 through 235672): Re: Showing an image outside of the web folder 235652 by: Rabin Vincent Re: Echo a value from an arrays position 235653 by: Eric Butera Re: php and ssl 235654 by: Eric

Re: [PHP] User confirmation questions?

2006-05-05 Thread Rabin Vincent
On 5/5/06, William Stokes [EMAIL PROTECTED] wrote: In PHP is it possible to generate windows style question boxes and get the users choice back? Or do I need javascript or something else for that? For example if a user hits a button in form I could ask for his confirmation for the action. Like

Re: [PHP] User confirmation questions?

2006-05-05 Thread William Stokes
OK Rabin Vincent [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] On 5/5/06, William Stokes [EMAIL PROTECTED] wrote: In PHP is it possible to generate windows style question boxes and get the users choice back? Or do I need javascript or something else for that? For example if a

Re: [PHP] Mail and hotmail

2006-05-05 Thread Angelo Zanetti
Peter Lauri wrote: I do set the headers now, but still the email is not delivered to Hotmail. This is the headers that I set: X-Sender: [EMAIL PROTECTED] From: DWS Asia [EMAIL PROTECTED] Date: Thu, 04 May 2006 22:04:23 +0700 Subject: What is this? 2 the subject of your email! -- PHP General

RE: [PHP] Mail and hotmail

2006-05-05 Thread Peter Lauri
:) And that was my subject for the test mail I sent :) It was just a coincidence. What values can Importance have? $headers = X-Sender: .$this-myFrom. .$this-myFromEmail..$eol; $headers .= From: .$this-myFrom. .$this-myFromEmail..$eol; $headers .= Date: .date(r).$eol; $headers .= Subject:

[PHP] Smarty error

2006-05-05 Thread Nirmalya Lahiri
Dear all, I wrote this script using Smarty template,which gives a syntax error .. syntax error: unrecognized tag: (Smarty_Compiler.class.php, line 436) I wrote a javascript block in template file,where I use '{'. This '{' acctually shows the problem. How can I solve this problem?

Re: [PHP] Avoiding user refresh of pages with forms

2006-05-05 Thread Satyam
- Original Message - From: Richard Lynch [EMAIL PROTECTED] To: John Wells [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Friday, May 05, 2006 3:27 AM Subject: Re: [PHP] Avoiding user refresh of pages with forms On Thu, May 4, 2006 6:37 am, John Wells wrote: On 5/3/06, Satyam

Re: [PHP] Smarty error

2006-05-05 Thread Nirmalya Lahiri
Dear all, I solved the problem using {literal}{/literal} tag. Thanks every one, who gives me tips to solve the error. --Nirmalya Nirmalya Lahiri [EMAIL PROTECTED] wrote: Dear all, I wrote this script using Smarty template,which gives a syntax error .. syntax error: unrecognized

Re: [PHP] Polymorphism [was] [Fwd: Re: [PHP] Parents constructor]

2006-05-05 Thread Tony Marston
Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Wed, May 3, 2006 9:17 am, Jochem Maas wrote: BUT there is a fourth form of polymorphism - one I would argue if the most common form when speaking about polymorphism with respect to programming, namely the ability to

Re: [PHP] Quotation marks considered harmful

2006-05-05 Thread Anthony Ettinger
doesn't php have something like qq// and q// in perl? qq = double quote interpolation q = single quote (no interpolation) the delimiteer / can be any character you'd like. or, like stated previously, use a heredoc. or smarty-template engine. On 5/4/06, Richard Lynch [EMAIL PROTECTED] wrote:

Re: [PHP] causing HTTP error status

2006-05-05 Thread Nic
Richard Lynch [EMAIL PROTECTED] writes: On Thu, May 4, 2006 8:50 am, Nic wrote: I'm having trouble with setting HTTP error status from PHP4. The PHP docs say that if I have this : Directory /mydir WILD GUESS!!! Try it with full pathname to /mydir, or perhaps without the leading '/'

Re: [PHP] causing HTTP error status

2006-05-05 Thread Rabin Vincent
On 5/5/06, Nic [EMAIL PROTECTED] wrote: But /mydir/some.php doing: header(HTTP/1.1 404 Rubbish!!!) _never_ causes the error document to be picked up. That's right. Apache's not going to take action based on the headers you generate in your PHP script. These headers are just going to go to

Re: [PHP] causing HTTP error status

2006-05-05 Thread Nic
Hi Rabin Rabin Vincent [EMAIL PROTECTED] writes: On 5/5/06, Nic [EMAIL PROTECTED] wrote: But /mydir/some.php doing: header(HTTP/1.1 404 Rubbish!!!) _never_ causes the error document to be picked up. That's right. Apache's not going to take action based on the headers you generate in

Re: [PHP] causing HTTP error status

2006-05-05 Thread M. Sokolewicz
Nic wrote: Hi Rabin Rabin Vincent [EMAIL PROTECTED] writes: On 5/5/06, Nic [EMAIL PROTECTED] wrote: But /mydir/some.php doing: header(HTTP/1.1 404 Rubbish!!!) _never_ causes the error document to be picked up. That's right. Apache's not going to take action based on the headers you

Re: [PHP] Quotation marks considered harmful

2006-05-05 Thread M. Sokolewicz
thank god PHP doesn't have qq// and q//, it's one of the few things I can't stand in Perl (along with the 100 different ways of calling the same variable (@var, $var, %var, etc.). Just use a standard delimiter with standard, normal, quotes. It's really not that hard. Anthony Ettinger wrote:

Re: [PHP] set_error_handler() fails

2006-05-05 Thread icy
Richard Lynch wrote: It's possible that you have mistaken whatever set_error_handler returns for no previous error handler for NULL... Are you using === NULL or is_null() to test? If not, I suspect it's really returning FALSE or '' and what you think is an error condition is, in fact, not an

Re: [PHP] What editor do you use?

2006-05-05 Thread David Robley
Miles Thompson wrote: At 03:35 PM 5/4/2006, John Nichel wrote: Nicolas Verhaeghe wrote: I am currently looking for a good PHP editor for Windows. I know, the question must have been asked so many times, but I thought I could ask it again now that a few editors have evolved, others have

Re: [PHP] set_error_handler() fails

2006-05-05 Thread chris smith
On 5/5/06, icy [EMAIL PROTECTED] wrote: Richard Lynch wrote: It's possible that you have mistaken whatever set_error_handler returns for no previous error handler for NULL... Are you using === NULL or is_null() to test? If not, I suspect it's really returning FALSE or '' and what you think

Re: [PHP] set_error_handler() fails

2006-05-05 Thread icy
chris smith wrote: What does your code look like? I just realized that when called a second time, set_error_handler() returns my custom error handler but it is never triggered. Code looks like this: ?php if (set_error_handler('core_error_handler', E_ALL) === NULL)

[PHP] Re: causing HTTP error status

2006-05-05 Thread Nic
M. Sokolewicz [EMAIL PROTECTED] writes: The meaning of the paragraph is indeed your only other meaning I can attribute to it. And no, Apache does not automatically set it (ok, not *always*... there's a lot of magic going on behind the screens). Oh. Ok. Thanks. Nic -- PHP General Mailing

Re: [PHP] set_error_handler() fails

2006-05-05 Thread Martin Alterisio \El Hombre Gris\
icy escribió: chris smith wrote: What does your code look like? I just realized that when called a second time, set_error_handler() returns my custom error handler but it is never triggered. Code looks like this: ?php if (set_error_handler('core_error_handler', E_ALL) === NULL)

[PHP] Re: Quotation marks considered harmful

2006-05-05 Thread John Wells
On 5/4/06, John Hicks [EMAIL PROTECTED] wrote: Why not develop a language syntax that has distinct open and close string delimiters? I consider HEREDOC to be the answer to that kind of prayer. For quick one-liners I find it overkill, but I felt so freed when I discovered it for creating large

Re: [PHP] Test URL length please (Pretty much 0T)

2006-05-05 Thread tedd
At 1:36 PM -0700 5/4/06, Ryan A wrote: Hi again, Kindly save the below code as t.php and run it in as many browsers/servers you can, then click on each of the links and tell me if you run into any problems. (Basically, I am checking to see how many characters we can have in a URL that the

Re: [PHP] What editor do you use?

2006-05-05 Thread Wolf
Editpad Classic 3.5.3 And it's postcardware... :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Maximum URL length (Pretty much 0T)

2006-05-05 Thread tedd
At 2:31 PM -0700 5/4/06, Chris W. Parker wrote: Ryan A mailto:[EMAIL PROTECTED] on Thursday, May 04, 2006 1:18 PM said: Thanks for replying, thats an idea, but was hoping people from this list could reply with their experiences because my local server might be different from production

Re: [PHP] Array Sorting

2006-05-05 Thread tedd
On Thu, May 4, 2006 10:20 am, James Nunnerley wrote: What I'm not sure about doing is sorting by say Size or Date? There's several different examples of date sorts here: http://www.weberdev.com/AdvancedSearch.php?searchtype=titlesearch=date+sortSubmit1.x=0Submit1.y=0 HTH's tedd --

Re: [PHP] Smarty error

2006-05-05 Thread John Nichel
Nirmalya Lahiri wrote: Dear all, I wrote this script using Smarty template,which gives a syntax error .. syntax error: unrecognized tag: (Smarty_Compiler.class.php, line 436) I wrote a javascript block in template file,where I use '{'. This '{' acctually shows the problem. How can

Re: [PHP] User confirmation questions?

2006-05-05 Thread tedd
At 8:58 AM +0300 5/5/06, William Stokes wrote: Hello, In PHP is it possible to generate windows style question boxes and get the users choice back? Or do I need javascript or something else for that? For example if a user hits a button in form I could ask for his confirmation for the action.

[PHP] Rhumb Lines

2006-05-05 Thread Leonard Burton
HI All, I need to calculate Rhumb Lines in an application and have not found a good formula for doing such. Does anyone know of an existing Class/Function that will calculate Rhumb Lines? Thanks and Be Well, -- Leonard Burton, N9URK [EMAIL PROTECTED] The prolonged evacuation would have

Re: [PHP] Paged Results Set in MySQL DB with one result

2006-05-05 Thread Edward Vermillion
On May 4, 2006, at 11:16 PM, Jochem Maas wrote: Richard Lynch wrote: On Thu, May 4, 2006 10:15 am, Edward Vermillion wrote: On May 4, 2006, at 4:16 AM, Richard Lynch wrote: On Wed, May 3, 2006 6:57 pm, Jochem Maas wrote: ... Yes. Usually. Mostly sometimes. For something like a Forum

[PHP] Showing an image outside of the web folder

2006-05-05 Thread James Nunnerley
I'm creating a file manager application, from which I want the user to be able to edit/view files. On the text side of things, it's pretty easy, however from the image side of things, I'm not sure how to allow the user to view files outside of the web folder. Doing a readfile ($file_location)

[PHP] heredoc question

2006-05-05 Thread Al
How can I include place holders for variables in a heredoc such that after the heredoc is declared, I can assign the variables? I have a config file with a heredoc string declared. I'd like to keep the include config.inc at the top of my page. Down in the page, when I call the heredoc

Re: [PHP] Showing an image outside of the web folder

2006-05-05 Thread John Nichel
James Nunnerley wrote: I'm creating a file manager application, from which I want the user to be able to edit/view files. On the text side of things, it's pretty easy, however from the image side of things, I'm not sure how to allow the user to view files outside of the web folder. Doing a

Re: [PHP] heredoc question

2006-05-05 Thread John Nichel
Al wrote: How can I include place holders for variables in a heredoc such that after the heredoc is declared, I can assign the variables? I have a config file with a heredoc string declared. I'd like to keep the include config.inc at the top of my page. Down in the page, when I call the

Re: [PHP] Rhumb Lines

2006-05-05 Thread Miles Thompson
At 11:01 AM 5/5/2006, Leonard Burton wrote: HI All, I need to calculate Rhumb Lines in an application and have not found a good formula for doing such. Does anyone know of an existing Class/Function that will calculate Rhumb Lines? Thanks and Be Well, -- Leonard Burton, N9URK [EMAIL

[PHP] Re: Showing an image outside of the web folder

2006-05-05 Thread Barry
James Nunnerley schrieb: I'm creating a file manager application, from which I want the user to be able to edit/view files. On the text side of things, it's pretty easy, however from the image side of things, I'm not sure how to allow the user to view files outside of the web folder. Doing a

Re: [PHP] heredoc question

2006-05-05 Thread Paul Novitski
At 07:40 AM 5/5/2006, Al wrote: How can I include place holders for variables in a heredoc such that after the heredoc is declared, I can assign the variables? Al, Escape the $'s in your heredoc expression so that the variable names remain and aren't evaluated, then eval() the whole

Re: [PHP] User confirmation questions?

2006-05-05 Thread Rabin Vincent
On 5/5/06, tedd [EMAIL PROTECTED] wrote: At 8:58 AM +0300 5/5/06, William Stokes wrote: Hello, In PHP is it possible to generate windows style question boxes and get the users choice back? Or do I need javascript or something else for that? For example if a user hits a button in form I could

Re: [PHP] Showing an image outside of the web folder

2006-05-05 Thread Rabin Vincent
On 5/5/06, James Nunnerley [EMAIL PROTECTED] wrote: Doing a readfile ($file_location) outputs the binary... can someone point me in the direction of being able to translate that binary into a viewable image file? Drop the appropriate content-type header: header('Content-type: image/png');

Re: [PHP] Echo a value from an arrays position

2006-05-05 Thread Eric Butera
On 5/4/06, Brad Bonkoski [EMAIL PROTECTED] wrote: Will this also work with an associative array? If this is what he is talking about, I tried it and it does not work I put this together though and it works, not sure if it is the *best* way though... ?php $colors =

Re: [PHP] php and ssl

2006-05-05 Thread Eric Butera
On 5/4/06, Schalk [EMAIL PROTECTED] wrote: Greetings All, I am currently implementing a form for a client that will run over https. Now, all is good and well except, for some reason when the form loads in IE the lock in the status bar displays for a short while and then goes away, it is fine

Re: [PHP] Rhumb Lines

2006-05-05 Thread Paul Scott
On Fri, 2006-05-05 at 11:44 -0300, Miles Thompson wrote: What an interesting problem. You might have better luck on a GIS or ocean racing list. Have you tried this: http://en.wikipedia.org/wiki/Rhumb_line I could do something like this using PostGIS and PHP, but a pure PHP solution is

Re: [PHP] heredoc question

2006-05-05 Thread Robert Cummings
On Fri, 2006-05-05 at 10:40, Al wrote: How can I include place holders for variables in a heredoc such that after the heredoc is declared, I can assign the variables? I have a config file with a heredoc string declared. I'd like to keep the include config.inc at the top of my page.

Re: [PHP] heredoc question

2006-05-05 Thread Dave Goodchild
Or just use str_replace On 05/05/06, John Nichel [EMAIL PROTECTED] wrote: Al wrote: How can I include place holders for variables in a heredoc such that after the heredoc is declared, I can assign the variables? I have a config file with a heredoc string declared. I'd like to keep the

Re: [PHP] User confirmation questions?

2006-05-05 Thread tedd
At 9:38 PM +0530 5/5/06, Rabin Vincent wrote: On 5/5/06, tedd [EMAIL PROTECTED] wrote: At 8:58 AM +0300 5/5/06, William Stokes wrote: Hello, In PHP is it possible to generate windows style question boxes and get the users choice back? Or do I need javascript or something else for that? For

Re: [PHP] User confirmation questions?

2006-05-05 Thread Rabin Vincent
On 5/5/06, tedd [EMAIL PROTECTED] wrote: At 9:38 PM +0530 5/5/06, Rabin Vincent wrote: On 5/5/06, tedd [EMAIL PROTECTED] wrote: At 8:58 AM +0300 5/5/06, William Stokes wrote: Hello, In PHP is it possible to generate windows style question boxes and get the users choice back? Or do I need

Re: [PHP] heredoc question

2006-05-05 Thread Al
Robert Cummings wrote: On Fri, 2006-05-05 at 10:40, Al wrote: How can I include place holders for variables in a heredoc such that after the heredoc is declared, I can assign the variables? I have a config file with a heredoc string declared. I'd like to keep the include config.inc at the

Re: [PHP] php and ssl [SOLVED]

2006-05-05 Thread Schalk
Eric Butera wrote: On 5/4/06, Schalk [EMAIL PROTECTED] wrote: Greetings All, I am currently implementing a form for a client that will run over https. Now, all is good and well except, for some reason when the form loads in IE the lock in the status bar displays for a short while and then

Re: [PHP] User confirmation questions?

2006-05-05 Thread tedd
Perhaps I didn't fully understand the question. A confirmation dialog box, no -- but, a confirmation, yes. If he wants a dialog box, then a simple js alert will do. OK, no dialog box, but how could we get a confirmation from the user for something by switching stylesheets? Do you mean

Re: [PHP] Rhumb Lines

2006-05-05 Thread Paul Scott
On Fri, 2006-05-05 at 19:16 +0200, Paul Scott wrote: I could do something like this using PostGIS and PHP, but a pure PHP solution is probably going to be a tad slow with real geometries. Sorry about replying to my own post, but here is a postgis solution supplied off the PostGIS list

Re: [PHP] PHP Upgrade Question

2006-05-05 Thread Tom Ray
On 05.03.2006 at 20:34:20, Eric Butera [EMAIL PROTECTED] wrote: Ok so I can't find apxs on the server at all, even though the 4.3.4phpinfo claims to have been configured with --with-apxs2=/usr/sbin/apxs2-prefork. I did some search via google and I reconfigured using --enable-cli and

RE: [PHP] What editor do you use?

2006-05-05 Thread Nicolas Verhaeghe
-Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Thursday, May 04, 2006 1:54 PM To: Nicolas Verhaeghe Cc: 'Jay Blanchard'; 'PHP-General' Subject: RE: [PHP] What editor do you use? On Thu, 2006-05-04 at 16:39, Nicolas Verhaeghe wrote: [snip] I am currently

[PHP] Re: User confirmation questions?

2006-05-05 Thread Chuck Anderson
William Stokes wrote: Hello, In PHP is it possible to generate windows style question boxes and get the users choice back? Or do I need javascript or something else for that? For example if a user hits a button in form I could ask for his confirmation for the action. Like Do you Really

Re: [PHP] adding objects to spl.php because it doesn't appear to be there

2006-05-05 Thread chris smith
On 5/6/06, jonathan [EMAIL PROTECTED] wrote: I'm not really sure where to post this but when I run phpunit, it is throwing an error because Class 'InvalidArgumentException' not found. It looks like this is supposed to be in spl.php but I'm not sure how to add this. Is it possible to just

Re: [PHP] adding objects to spl.php because it doesn't appear to be there

2006-05-05 Thread jonathan
a sample phpunit. the issue is that this class doesn't seem to be in my spl (which I don't really use and am not sure how to upgrade). thanks, jonathan On May 5, 2006, at 4:38 PM, chris smith wrote: On 5/6/06, jonathan [EMAIL PROTECTED] wrote: I'm not really sure where to post this but

Re: [PHP] Test URL length please (Pretty much 0T)

2006-05-05 Thread Ryan A
Ryan: http://xn--ovg.com/t.php In Safari 2.0.3, FireFox 1.5.0.2, IE 5.2, Mozilla 1.83a I could run 8168 characters (f-click) without any problems. But, Opera 8.5 failed. However, when I increased it to 8169 characters (g-click) they all failed. HTH's tedd PS: Mac OS-X

Re: [PHP] What editor do you use?

2006-05-05 Thread Ólafur Waage
Nicolas Verhaeghe wrote: -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Thursday, May 04, 2006 1:54 PM To: Nicolas Verhaeghe Cc: 'Jay Blanchard'; 'PHP-General' Subject: RE: [PHP] What editor do you use? On Thu, 2006-05-04 at 16:39, Nicolas Verhaeghe wrote:

[PHP] hosting reselling

2006-05-05 Thread John Taylor-Johnston
Kind of off-topic. My current ISP has problems with quality control: especially offering php 5 mysql. Also rates keep going up per account. Reselling is beginning to look very interesting. Anyone have any recommendations for a reseller where I can host 5 sites myself with very low bandwidth