RE: [PHP] Case-Insensitive include on linux.

2006-01-10 Thread Albert
Mathijs wrote: > Is there a way to have include() be case-insensitive? Linux file systems are case sensitive. The include() and require() functions try to open the file specified. If you enter the wrong case the file system will return that the file does not exist. Albert -- No virus found in th

[PHP] Case-Insensitive include on linux.

2006-01-10 Thread Mathijs
Hello there, Is there a way to have include() be case-insensitive? This would be very handy. Thx in advanced. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Speed

2006-01-10 Thread Peter Lauri
Best group member, Assume that I save data about an object and it has 10.000 observations of the object stored in a MySQL database. I want calculate the average value of a column, is it faster done by using PHP on the result array or using the MySQL function to do that? /Peter

RE: [PHP] PHP and SOAP newbie questions

2006-01-10 Thread Weber Sites LTD
I'm not experienced with WSDL but I can see it's in use here : http://www.weberdev.com/ViewArticle/439 Maybe it can help... Sincerely berber Visit the Weber Sites Today, To see where PHP might take you tomorrow. PHP code examples : http://www.weberdev.com PHP Web Logs : http://www.web

[PHP] Re: Maps and plotting data

2006-01-10 Thread Raj Shekhar
Adrian Bruce <[EMAIL PROTECTED]> writes: > Has anyone used any of the php mapping classes that are available? > (Image_GIS etc) I would like to create dynamic maps and plot data > i.e. postcodes on them like you do in applications like map-point. I > am not quite sure if there is any php scripts

Re: [PHP] Floating numbers truncating to two digits without rounding

2006-01-10 Thread Anas Mughal
Oh, yes, Gerry has provided very useful links. You could definetly look into using something like: printf( "%.2f", $x ); -- Anas Mughal On 1/10/06, Gerry Danen <[EMAIL PROTECTED]> wrote: > > sprintf creates a string ready for you to manipulate. So does > number_format. Pick whatever is best

[PHP] PHP CGI Variables

2006-01-10 Thread Tim Traver
Hi all, ok, I want to re-post this so that more people might see it, cause there has to be an answer somewhere... When using the GCI version of PHP with apache, I need to be able to set some of the php_admin_values that normally get set in the php.ini file on the fly... Since I am not usin

Re: [PHP] PHP and SOAP newbie questions

2006-01-10 Thread Angelo Zanetti
Hi Jay, I've used nuSOAP and its pretty good. Perhaps you want to check out the nuSOAP mailing list: Nusoap-general mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nusoap-general This is the guys site who started nuSOAP (I think), there is alot of info and links t

Re: [PHP] Floating numbers truncating to two digits without rounding

2006-01-10 Thread Gerry Danen
sprintf creates a string ready for you to manipulate. So does number_format. Pick whatever is best for your purpose. See http://uk2.php.net/manual/en/function.sprintf.php and http://uk2.php.net/manual/en/function.number-format.php for more info. Gerry On 1/10/06, Mark Steudel <[EMAIL PROTECTED]

[PHP] Re: problem with currency signs

2006-01-10 Thread Satyam
Instead of using arbitrary numbers for currencies, use the ISO standard 3 letter codes: http://en.wikipedia.org/wiki/ISO_4217 The currency symbol by itself does not identify the currency. Many countries use the $ sign to represent whatever their currency might be so that by itself says very l

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jake Gardner
Jochem: Your method is long, probably takes more time to run, and is therefore inefficient in this circumstance. There is a time and place for a good solid reusable function, or even a class. Of course things could go wrong when using mySQL connections, but things can always go wrong. Bringing pe

Re: [PHP] Sending mail with php-

2006-01-10 Thread Dotan Cohen
On 1/10/06, Sameer N Ingole <[EMAIL PROTECTED]> wrote: > Dear Dotan, > > You know cross-posting is bad..? > > [EMAIL PROTECTED] wrote: > > > > > > >he also sent a message to the fedora list where he's been responded > >to. > > > > > > > > Original Message > > > >>Date: Tues

Re: [PHP] problem with large arrays in php 4.3.2

2006-01-10 Thread Jesse Guardiani
Rodolfo Andrade wrote: 22k * 22 k = 484 millions... that's really a lot of data and should take a lot of time and processing power. I don't think it's really a bug. Yeah, I guess not. I guess ~500,000 records/sec isn't so terrible. Is there a more efficient way to difference large sets of

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Mike Smith
On 1/10/06, Sue <[EMAIL PROTECTED]> wrote: > Hello, > > We have a form that contains a Select option for a listing of available > dates for the user to choose from. Right now we have to manually change the > dates within the form's Selection list as new dates become available to > choose from. We

[PHP] problem with large arrays in php 4.3.2

2006-01-10 Thread Jesse Guardiani
Hello, I have an old version of php (4.3.2) that is acting rather strangely. I'm searching two large arrays (approx 22,000 records in each) using array_diff_key() from the PEAR PHP_Compat library: $result = $args[0]; foreach ($args[0] as $key1 => $value1) { for ($i = 1

RE: [PHP] [QF] I would like to change the javascript validation function

2006-01-10 Thread Mark Steudel
Sorry wrong list. -Original Message- From: Mark Steudel [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 10:27 AM To: php-general@lists.php.net Subject: [PHP] [QF] I would like to change the javascript validation function I want to add a few lines to the javascript validation f

[PHP] [QF] I would like to change the javascript validation function

2006-01-10 Thread Mark Steudel
I want to add a few lines to the javascript validation function and I was wondering if anyone had any easy ideas on the easiest way to do it. Should I dig into the classes and edit there, or is there a way to replace it by extending the class or something. Thanks, Mark

RE: [PHP] SOAP Problems SOLVED!

2006-01-10 Thread Jay Paulson \(CE CEN\)
I got it to work! What I had to do is make an associtive array with the keys being the name of the params that needed to get passed to the 'execute' method that it was calling via soap. Or conversely you could write the $params as objects instead of an array. Code below: $params["From"] = "06

Re: [PHP] replacing .shtml #exec cgi with php calls

2006-01-10 Thread John Nichel
The Doctor wrote: On Tue, Jan 10, 2006 at 04:57:51PM +, David Grant wrote: Dr. The Doctor wrote: and wish to replace it with a php call. php.net/exec I did try And got nothing. Any additional pointers? http://us2.php.net/shellexec Similarly we want to hide a js script. Yo

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jochem Maas
David Grant wrote: Jochem, Jochem Maas wrote: David Grant wrote: 1. your looping a result set which involves a db connection - lots of pontential things that could go wrong... Absolutely, and lots of lessons to learn too. by that argument your own children shouldn't be sent to school; and

Re: [PHP] replacing .shtml #exec cgi with php calls

2006-01-10 Thread The Doctor
On Tue, Jan 10, 2006 at 04:57:51PM +, David Grant wrote: > Dr. > > The Doctor wrote: > > and wish to replace it with a php > > call. > > php.net/exec > I did try And got nothing. Any additional pointers? > > Similarly we want to hide a js script. > > You want to disable direct request

[PHP] SOAP Problems.

2006-01-10 Thread Jay Paulson \(CE CEN\)
I'm trying to call a SOAP service where you pass it a couple of dates and it is supposed to return stuff. My testing code is below along with the errors I'm getting. What's strange is that it's not working in php but it works perfectly in Flash. The request it is sending is only sending one p

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread DarkX
You mean like... $Link = mysql_connect("Host", "User", "Pass"); mysql_select_db("MyDB"); $Datefield = "Dates"; $Select = mysql_query("SELECT * FROM `Table` WHERE `".$Dates."` LIKE *"); $MySelect = "" While($Row = @mysql_fetch_assoc($Select)) { //Adds each date to the select where the value is al

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jochem Maas
Adrian Bruce wrote: the quickest solution and one that is easy to understand, I am no php expert and have never claimed as such so why 'noob'? Why is this such a poor method? if i type the HTML to be outputted correctly then what validation is required? also I think Someone new would run from

Re: [PHP] Is there a way to display data from database for SelectOptions in a form?

2006-01-10 Thread Jochem Maas
Jay Paulson (CE CEN) wrote: [snip]Let's look at it another way, why 70-80 lines of code when 4 will do it properly when done correctly?[/snip] 4 * 20 = 80 so after having created 20 dynamic select boxes the function wins it. I really don't think that performance here is the issue - one should t

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread David Grant
Jochem, Jochem Maas wrote: > David Grant wrote: > 1. your looping a result set which involves a db connection - lots > of pontential things that could go wrong... Absolutely, and lots of lessons to learn too. > 2. its not a centralized 'solution' - code reuse is a good thing. However, what use

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jochem Maas
David Grant wrote: Jochem, Jochem Maas wrote: teaching noobs to output html while (oun intended) looping thru a result set is counter-productive. discuss. I disagree, however, I do believe attention should be drawn to reasons why doing so might be considered bad practice. 1. your looping

RE: [PHP] Is there a way to display data from database for SelectOptions in a form?

2006-01-10 Thread Jay Paulson \(CE CEN\)
[snip]Let's look at it another way, why 70-80 lines of code when 4 will do it properly when done correctly?[/snip] I agree with this line of thinking especially for a new person to php. When I first read the solution that was so long I thought to myself "great and this person is new to php and n

Re: [PHP] replacing .shtml #exec cgi with php calls

2006-01-10 Thread David Grant
Dr. The Doctor wrote: > and wish to replace it with a php call. php.net/exec > Similarly we want to hide a js script. You want to disable direct requests to the javascript file? I can't think of a way that couldn't be trivially circumvented. You're probably better off obfuscating the code.

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Adrian Bruce
the quickest solution and one that is easy to understand, I am no php expert and have never claimed as such so why 'noob'? Why is this such a poor method? if i type the HTML to be outputted correctly then what validation is required? also I think Someone new would run from your proposed soluti

RE: [PHP] replacing .shtml #exec cgi with php calls

2006-01-10 Thread Jay Blanchard
[snip] How do I accomplish this? We have and wish to replace it with a php call. Similarly we want to hide a js script. [/snip] include() http://www.php.net/include -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jay Blanchard
[snip] > [snip] > teaching noobs to output html while (oun intended) looping thru a > result set is counter-productive. discuss. > [/snip] > > Why is this counter-productive? it's a shit way of doing things - with the added bonus that it usually comes with shit output (as non-validating, bare-min

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jochem Maas
Jay Blanchard wrote: [snip] teaching noobs to output html while (oun intended) looping thru a result set is counter-productive. discuss. [/snip] Why is this counter-productive? it's a shit way of doing things - with the added bonus that it usually comes with shit output (as non-validating, bar

[PHP] replacing .shtml #exec cgi with php calls

2006-01-10 Thread The Doctor
How do I accomplish this? We have and wish to replace it with a php call. Similarly we want to hide a js script. -- Member - Liberal International This is [EMAIL PROTECTED] Ici [EMAIL PROTECTED] God Queen and country! Beware Anti-Christ rising! Canada : Consider carefully whom to vot

[PHP] Re: Image editing?

2006-01-10 Thread Raj Shekhar
> Hello, > > I might have to start doing some automated image editing or rezising with > PHP. I've never done anything like this before so I would need some > guidelines to get started. Basically what sections of the manual to read and > what tools need to be installed to the server side to get th

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread David Grant
Jochem, Jochem Maas wrote: > teaching noobs to output html while (oun intended) looping thru a > result set is counter-productive. discuss. I disagree, however, I do believe attention should be drawn to reasons why doing so might be considered bad practice. Even the longest journeys start with s

RE: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jay Blanchard
[snip] teaching noobs to output html while (oun intended) looping thru a result set is counter-productive. discuss. [/snip] Why is this counter-productive? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Floating numbers truncating to two digits without rounding

2006-01-10 Thread Mark Steudel
Thanks for the info -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006 3:26 PM To: php-general@lists.php.net; Mark Steudel Subject: Re: [PHP] Floating numbers truncating to two digits without rounding >I am calculating things like tax and want to form

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jochem Maas
teaching noobs to output html while (oun intended) looping thru a result set is counter-productive. discuss. Adrian Bruce wrote: Something along these lines will work fine "; while ($row = mysql_fetch_array($query, MYSQL_NUM)){ echo"$row[1]"; } echo""; ?> Regards Ade Sue wrote: Hello

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Jochem Maas
Sue wrote: Hello, We have a form that contains a Select option for a listing of available dates for the user to choose from. Right now we have to manually change the dates within the form's Selection list as new dates become available to choose from. We currently store these available dates

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread David Grant
Sue, Sue wrote: > We have a form that contains a Select option for a listing of available > dates for the user to choose from. Right now we have to manually change the > dates within the form's Selection list as new dates become available to > choose from. We currently store these available d

Re: [PHP] Is there a way to display data from database for Select Options in a form?

2006-01-10 Thread Adrian Bruce
Something along these lines will work fine "; while ($row = mysql_fetch_array($query, MYSQL_NUM)){ echo"$row[1]"; } echo""; ?> Regards Ade Sue wrote: Hello, We have a form that contains a Select option for a listing of available dates for the user to choose from. Right now we have

RE: [PHP] Warning: Missing argument 7 calling a function

2006-01-10 Thread Ford, Mike
On 09 January 2006 16:14, enediel gonzalez wrote: > thanks everybody who answered me, > the segment bellow is the code that gave me problems, the $app_name > was the 7th parameter neccesary for me to call the > GetCommandDeclaration function, > the solution I had for a while was to declare the var

Re: [PHP] php + mysql - timstamp - calculate hours remaining

2006-01-10 Thread M. Sokolewicz
David Grant wrote: Gregory, David Grant wrote: Gregory Machin wrote: I have a table with a timestamp column and would like to use his to calculate the age of the record . how would i go about this... I would also like to exicute a mysql stament that pasess the tables and removes fields older

Re: [PHP] Sending mail with php-

2006-01-10 Thread Sameer N Ingole
Dear Dotan, You know cross-posting is bad..? [EMAIL PROTECTED] wrote: he also sent a message to the fedora list where he's been responded to. Original Message Date: Tuesday, January 10, 2006 07:03:17 PM +0530 From: Sameer N Ingole <[EMAIL PROTECTED]> To: php-ge

RE: [PHP] Sending mail with php-

2006-01-10 Thread Albert
Dotan Cohen wrote: > That most certainly is how I do it- just like TFM says! Actually, the > last field is a variable that is defined earlier, but I have outputed > it's contents to the screen to verify that it contains what it should. Have a look at PHPMailer (http://www.phpclasses.org/browse/pa

Re: [PHP] Sending mail with php-

2006-01-10 Thread Dotan Cohen
On 1/10/06, Albert <[EMAIL PROTECTED]> wrote: > Dotan Cohen wrote: > > But I still get the error! I did restart apache and even went so far as to > > reboot the machine. If I cannot modify the parameter within apache, > > then where should I modify it? Within php? Within sendmail? > > Look for the

Re: [PHP] php + mysql - timstamp - calculate hours remaining

2006-01-10 Thread David Grant
Gregory, David Grant wrote: > Gregory Machin wrote: >> I have a table with a timestamp column and would like to use his to >> calculate the age of the record . how would i go about this... >> I would also like to exicute a mysql stament that pasess the tables and >> removes fields older than say 7

RE: [PHP] php + mysql - timstamp - calculate hours remaining

2006-01-10 Thread Albert
I wrote: > Delete the records from the table: > mysql_query("DELETE FROM table WHERE timestamp >= '$timestamp'") or > die('Could not delete from table'); That query should be DELETE FROM table WHERE timestamp <= '$timestamp' Sorry about that. Albert -- No virus found in this outgoing message.

RE: [PHP] php + mysql - timstamp - calculate hours remaining

2006-01-10 Thread Albert
Gregory Machin wrote: > I have a table with a timestamp column and would like to use his to > calculate the age of the record . how would i go about this... Convert your timestamp to a unix timestamp (see mktime() function). Use the value returned by time() to calculate the difference in seconds.

Re: [PHP] php + mysql - timstamp - calculate hours remaining

2006-01-10 Thread David Grant
Gregory, Gregory Machin wrote: > I have a table with a timestamp column and would like to use his to > calculate the age of the record . how would i go about this... > I would also like to exicute a mysql stament that pasess the tables and > removes fields older than say 72 hours. how would i go a

Re: [PHP] Sending mail with php-

2006-01-10 Thread Sameer N Ingole
Dear Dotan, Dotan Cohen wrote: On my home Fedora Core 4 box I run Apache 2.0. Sometimes when sending mail with php no mail is delivered, and I find this in the logs: <<< 550-Verification failed for <[EMAIL PROTECTED]> <<< 550-unrouteable mail domain "localhost.localdomain" <<< 550 Sender verify

RE: [PHP] Sending mail with php-

2006-01-10 Thread Albert
Dotan Cohen wrote: > But I still get the error! I did restart apache and even went so far as to > reboot the machine. If I cannot modify the parameter within apache, > then where should I modify it? Within php? Within sendmail? Look for the "sendmail_from" parameter in the "mail function" section

[PHP] Sending mail with php-

2006-01-10 Thread Dotan Cohen
On my home Fedora Core 4 box I run Apache 2.0. Sometimes when sending mail with php no mail is delivered, and I find this in the logs: <<< 550-Verification failed for <[EMAIL PROTECTED]> <<< 550-unrouteable mail domain "localhost.localdomain" <<< 550 Sender verify failed So I changed the only ema

RE: [PHP] Browser on server doesn't refresh

2006-01-10 Thread Albert
Mike Tuller wrote: > locally, everything works. When I put the script on my OS X Server > and run the script, and click on the link to go back, the information > is not updated. I have to refresh the page. > PHP 5.04 on my laptop and 4.3.11 on the server. Is there some setting > in Apache th

[PHP] Re: PHP5, Soap, WSDL, and unbounded xsd:choice types.

2006-01-10 Thread Rob
Simon Detheridge wrote: What I want PHP to do, is enable me to access my 'bar' and 'baz' elements in the order in which they appear in the document, instead of having it glob them together for each type. However, I am unable to modify the output of the webservice itself as it interoperates

[PHP] Maps and plotting data

2006-01-10 Thread Adrian Bruce
Has anyone used any of the php mapping classes that are available? (Image_GIS etc) I would like to create dynamic maps and plot data i.e. postcodes on them like you do in applications like map-point. I am not quite sure if there is any php scripts/programs that already do this or if i have