Re: [PHP] Help with logic :(

2005-10-11 Thread Jochem Maas
Richard Lynch wrote: On Mon, October 10, 2005 3:24 pm, Dan McCullough wrote: create a function to check if the rndnumber=couponcode row count = 0 if not then redo rndnumber if it does = 0 then insert rndnumber N! You are creating a RACE CONDITION in which ONE

Re: [PHP] Problem w/ Hidden Input Fields

2005-10-11 Thread Jochem Maas
Jason Ferguson wrote: Jochem, Thanks for the response. I actually solved the problem a few days ago... I'm suprised this message never went out to the list until today. I actually WANTED one to override the other in this case. The user should be able to choose one of the default radio buttons

RE: [PHP] Problem w/ Hidden Input Fields

2005-10-11 Thread Kim Madsen
Hello -Original Message- From: Jason Ferguson [mailto:[EMAIL PROTECTED] Sent: Sunday, October 09, 2005 5:55 PM To: php-general@lists.php.net Subject: [PHP] Problem w/ Hidden Input Fields I have a input type=hidden field with a value 86 characters long. Here is the entire form:

Re: [PHP] PHP5 Soap + .NET Webservice

2005-10-11 Thread Chris Hemmings
Thanks Richard, I think I might start on a slightly simpler service, it seems MS has done its best to complicate everything. I have managed to get something working, but, god knows why the their example web service is sending back schema data as well as the result data, quite over the top.

[PHP] Sequential multiple file download?

2005-10-11 Thread David Merritt
All, Is there a way to do a sequential multiple file download? I have the scenario where based on various factors/inputs a user ends up with a list of files to download from the web server. This is an array of filenames from 1 to x total number of files. I want the user to be able to

Re: [PHP] storing passwords in $_SESSION

2005-10-11 Thread Terence
Richard Davey wrote: Agreed totally, I am curious as to why this question seems to get asked a LOT though. I wonder what it is that causes this? (other than inexperience) I mean there must be some common end result these developers are hoping to obtain, resulting in a password being stashed

[PHP] php5.1RC/COM/Word

2005-10-11 Thread George Pitcher
Hi, My dev machine has PHP 5.1RC installed (no problems so far, apart from this), its on Win XP. My server is running PHP 5.0.4 on Win NT. I'm building some MS Word docs and it works fine except when I need to add something that uses more than one parameter - eg.:

Re: [PHP] php5.1RC/COM/Word

2005-10-11 Thread Jochem Maas
George Pitcher wrote: Hi, My dev machine has PHP 5.1RC installed (no problems so far, apart from this), its on Win XP. My server is running PHP 5.0.4 on Win NT. I'm building some MS Word docs and it works fine except when I need to add something that uses more than one parameter - eg.:

Re: [PHP] Get Mac Address

2005-10-11 Thread Ben Sagal
I did mention this is an INTRANET server so all clients are be local, there are no router between the clients and the server. how would i go about accessing arp from php, (the server runs Linux)? Ben On 10/10/05, M. Sokolewicz [EMAIL PROTECTED] wrote: That will give you the *local* mac

Re: [PHP] ARG: Seg Faults with PHP 5.0.5, now on Solaris and SLES9

2005-10-11 Thread Jochem Maas
Chuck wrote: Yes, prefork is what I am using. ah ok. Also made sure and linked with pthread php + threads are not bedfellows - maybe try dropping pthread as your AcceptMutex apache directive? otherwise it could be time to crack open gdb and run apache through it try and figure out exactly

RE: [PHP] Sequential multiple file download?

2005-10-11 Thread Jay Blanchard
[snip] Is there a way to do a sequential multiple file download? [/snip] I think that the only way to do this in PHP is to zip 'em up and download that file, but it is an interesting concept and I can see where it would come in handy. I think that the problem lies in the fact that there would

[PHP] Run a php script as a separate thread/process

2005-10-11 Thread Tommy Jensehaugen
Hi, Anyone knows how to start a php script as a separate thread/process from another php script? example.php: ?php some logic execute('separate_script.php'); more logic ? The reason why I want to do this is because separate_script.php has to be fully executed even if the request for

[PHP] Run a php script as a separate thread/process

2005-10-11 Thread Tommy Jensehaugen
Hi, Anyone knows how to start a php script as a separate thread/process from another php script? example.php: ?php some logic .. .. execute('separate_script.php'); more logic .. .. ? The reason why I want to do this is because separate_script.php has to be fully executed even if the request

Re: [PHP] Run a php script as a separate thread/process

2005-10-11 Thread Petar Nedyalkov
On Tuesday 11 October 2005 14:12, Tommy Jensehaugen wrote: Hi, Anyone knows how to start a php script as a separate thread/process from another php script? Yes, you can check: http://bg.php.net/manual/en/ref.exec.php for details. example.php: ?php some logic

Re: [PHP] Help with logic :(

2005-10-11 Thread aaronjw
Hi Richard, Ok... I do already have a Unique index on the column but this process is something that I cannot echo out the error code to the user. The code is generated on the fly when an order an is placed so you can see... I can't echo out the error to the customer. Can I do an if statement IF

[PHP] looking for code to delete from lists..

2005-10-11 Thread bruce
hi. i'm generating a list ++ || | foo | | cat | | . | | . | | . | || ++ cancel/submit i want to give the user the ability to delete single/multiple

RE: [PHP] looking for code to delete from lists..

2005-10-11 Thread Kilbride, James
Multiple Select form element, submit button. On submit iterate through the submitted sequence to delete from the database(or use a delete from statement that has the list of items depending on other work you want to do on the list before deletion). HTML_QuickForm gives you an easy way to generate

Re: [PHP] Help with logic :(

2005-10-11 Thread Dan McCullough
Yes I believe that is what Richard was saying about Trap the INSERT error, you should get an error back from the database about having a problem with the insert instead of showing that error you will want to add some logic that when that error occurs you simply generate another number. On

[PHP] mssql_*() functions and stored procedures

2005-10-11 Thread Chris Boget
Looking through the documentation, I see that I can use mssql_init() mssql_bind() mssql_execute() to execute those stored procedures that have parameters. But what about those SPs which just return a value? If I have the following SP CREATE PROCEDURE MySP AS DECLARE @resultCode int SELECT

RE: [PHP] Get Mac Address

2005-10-11 Thread Jim Moseby
-Original Message- From: Ben Sagal [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 7:05 AM To: M. Sokolewicz Cc: Rory Browne; php-general@lists.php.net Subject: Re: [PHP] Get Mac Address I did mention this is an INTRANET server so all clients are be local, there are

Re: [PHP] Run a php script as a separate thread/process

2005-10-11 Thread Silvio Porcellana
Tommy Jensehaugen wrote: snip / The reason why I want to do this is because separate_script.php has to be fully executed even if the request for example.php is stopped in the middle of more logic. I am using PHP Version 4.3.11. You might also want to give a look at this:

Re: [PHP] Help with logic :(

2005-10-11 Thread Jochem Maas
Dan McCullough wrote: Yes I believe that is what Richard was saying about Trap the INSERT error, you should get an error back from the database about having a problem with the insert instead of showing that error you will want to add some logic that when that error occurs you simply generate

[PHP] Speed/Efficiency Question: Large array into DB

2005-10-11 Thread Alan Lord
Hi All, Not being a professional programmer I am looking for some advice about the best way to do the following: I have a large multidimensional array (up to 7Mb) It contains a list of categories in a fairly normal Cat_ID and Parent_ID arrangement. The array also contains a great deal of

[PHP] Obsession with BC

2005-10-11 Thread GamblerZG
Recently, I asked my hosting provider when they are going to switch to PHP5. They replied that it will not happen any time soon, since they will install PHP5 only on new servers. Their reasoning was simple: PHP5 will inevitably break some old scripts, and it's just not worh all the trouble.

Re: [PHP] Help with logic :(

2005-10-11 Thread aaronjw
Thanks everyone. Makes sense. Now I got another issue. When I try to see if an error exists I get this: Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home//public_html/Store/test.php on line 14 Is there a setting somewhere that I need to set to make

Re: [PHP] Help with logic :(

2005-10-11 Thread Dan McCullough
got some code so we can see? On 10/11/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks everyone. Makes sense. Now I got another issue. When I try to see if an error exists I get this: Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in

Re: [PHP] Help with logic :(

2005-10-11 Thread aaronjw
?php include (../utils.inc); $date = date(U); $dateExpire = $date + 90 * 86400; $code = jack; $query = INSERT INTO CouponTable VALUES ('','$date','0','$code','preset','$dateExpire','3.75'); $result = mysql_query($query); echo

Re: [PHP] Obsession with BC

2005-10-11 Thread Robert Cummings
On Tue, 2005-10-11 at 12:41, GamblerZG wrote: Recently, I asked my hosting provider when they are going to switch to PHP5. They replied that it will not happen any time soon, since they will install PHP5 only on new servers. Their reasoning was simple: PHP5 will inevitably break some old

RE: [PHP] Help with logic :(

2005-10-11 Thread Kilbride, James
Did you remember to open the database connection? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 1:34 PM To: Dan McCullough Cc: php-general@lists.php.net Subject: Re: [PHP] Help with logic :( ?php include

Re: [PHP] Help with logic :(

2005-10-11 Thread Silvio Porcellana
[EMAIL PROTECTED] wrote: ?php include (../utils.inc); $date = date(U); $dateExpire = $date + 90 * 86400; $code = jack; $query = INSERT INTO CouponTable VALUES ('','$date','0','$code','preset','$dateExpire','3.75'); $result =

RE: [PHP] Help with logic :(

2005-10-11 Thread aaronjw
It's open because if I remove the mysql_error(); and change the value for $code it will insert. A Did you remember to open the database connection? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 1:34 PM To: Dan McCullough

Re: [PHP] Help with logic :(

2005-10-11 Thread John Nichel
[EMAIL PROTECTED] wrote: ?php include (../utils.inc); $date = date(U); $dateExpire = $date + 90 * 86400; $code = jack; $query = INSERT INTO CouponTable VALUES ('','$date','0','$code','preset','$dateExpire','3.75'); $result =

Re: [PHP] Help with logic :(

2005-10-11 Thread Dan McCullough
$result = mysql_query($query) or die(mysql_error()); On 10/11/05, Silvio Porcellana [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: ?php include (../utils.inc); $date = date(U); $dateExpire = $date + 90 * 86400; $code = jack; $query = INSERT

Re: [PHP] Obsession with BC

2005-10-11 Thread Richard Davey
Hi, Tuesday, October 11, 2005, 5:41:53 PM, you wrote: Recently, I asked my hosting provider when they are going to switch to PHP5. They replied that it will not happen any time soon, since they will install PHP5 only on new servers. Their reasoning was simple: PHP5 will inevitably break some

Re: [PHP] Obsession with BC

2005-10-11 Thread GamblerZG
?php //parse this with mod_php4 function class_method($var){ } ? ?php5 //parse this with mod_php5 class clazz implements Something{ function method($var) { } } ? Ummm, maybe your speaking alien, but could you clarify how that solves the problem you are addressing? First, if every

Re: [PHP] Obsession with BC

2005-10-11 Thread Dan McCullough
None of my code breaks from 4 to 5, I also run a small hosting company and I upgrade when I see improvements to the software that would warrent an upgrade. MySQL 4.1.12, Apache 2, PHP5. I also think its a cop out by those who dont have alot of time to upgrade their 30+ servers. Another stall or

RE: [PHP] Obsession with BC

2005-10-11 Thread Kilbride, James
4 to 5 does break a lot of code. On the other hand I agree it's a cop out. On the final hand, if you pass the pages off from apache to a php exe or module.. How does Apache know which one to pass it to? Php4 or Php5? If I have both php4 and php5 code in a page should i run both sections or only

Re: [PHP] Obsession with BC

2005-10-11 Thread GamblerZG
It does? I wouldn't waste my money with a host that was unable to provide PHP 5 support, at least in some way. I think the it will break lots of scripts is a cop-out. There are various ways to allow both on one server. Assuming they're technically proficient enough of course. 'What is the best

Re: [PHP] Obsession with BC

2005-10-11 Thread Dan McCullough
The real problem is that it generates customer service and support calls to the hosting company, which they dont like to have to deal with, because in the end it will be a coding issue and most of the people out there wont realize it and get mad and leave. On 10/11/05, Kilbride, James [EMAIL

RE: [PHP] Obsession with BC

2005-10-11 Thread Kilbride, James
I don't mean replace php4 with 5, but it seems odd they can't provide 5 to those users that want it. Keeping php4 for those places that were in place originally. Especially since not providing any php5 will also cause people to get mad and leave. James Kilbride -Original Message-

Re: [PHP] Speed/Efficiency Question: Large array into DB

2005-10-11 Thread Brent Baisley
Sounds to me like you are trying to import data. In which case it would be best to create a text file and import it rather than putting PHP in the middle. But if you are going us to PHP, I would not do individual INSERTs. The overhead will really slow things down with number of inserts you

Re: [PHP] Obsession with BC

2005-10-11 Thread Robert Cummings
On Tue, 2005-10-11 at 13:57, GamblerZG wrote: ?php //parse this with mod_php4 function class_method($var){ } ? ?php5 //parse this with mod_php5 class clazz implements Something{ function method($var) { } } ? Ummm, maybe your speaking alien, but could you clarify how that

[PHP] Picture loaded but not shown

2005-10-11 Thread Bagus Nugroho
Hi, I have problem with picture again. My picture is loaded, but not shown. It look like if show pictures on internet setting is disable. I was re-install both Apache, mysql and PHP, but can not solved. If anyone have this problem previously, please share Thanks in advance; regards

Re[2]: [PHP] Obsession with BC

2005-10-11 Thread Richard Davey
Hi, Tuesday, October 11, 2005, 7:14:05 PM, you wrote: Issue: I think BC slows down the evolution of the language. I know for sure it makes some people less willing to upgrade. And there are ways of avoding unnecessary BC maintenance altogether. Beyond not staying stuck in the past? Not

RE: [PHP] Speed/Efficiency Question: Large array into DB

2005-10-11 Thread Alan Lord
Thanks for the reply. I am indeed importing data, but from far away over the 'net, and it changes frequently so needs updating regularly. I like the idea of creating a file (I'll do it ram rather than a text file I think) with the insert strings... Thanks Alan -Original Message-

[PHP] PDO pgsql?

2005-10-11 Thread Jeffrey Sambells
I've been playing with the new PDO stuff in PHP 5.1 and am having trouble running queries on our database. I've installed PDO and pdo_pgsql through the pear/pecl installer and am trying to use a PostgreSQL 8.x DB. The connection is created fine, logged in etc. but when I try to run a query

Re: [PHP] mssql_*() functions and stored procedures

2005-10-11 Thread Jochem Maas
Chris Boget wrote: Looking through the documentation, I see that I can use mssql_init() mssql_bind() mssql_execute() to execute those stored procedures that have parameters. But what about those SPs which just return a value? If I have the following SP CREATE PROCEDURE MySP AS DECLARE

Re: [PHP] Obsession with BC

2005-10-11 Thread Jochem Maas
Robert Cummings wrote: On Tue, 2005-10-11 at 13:57, GamblerZG wrote: ?php //parse this with mod_php4 function class_method($var){ } ? ?php5 //parse this with mod_php5 class clazz implements Something{ function method($var) { } } ? Ummm, maybe your speaking alien, but could you clarify

Re: [PHP] Obsession with BC

2005-10-11 Thread GamblerZG
On the final hand, if you pass the pages off from apache to a php exe or module.. How does Apache know which one to pass it to? Php4 or Php5? By the processing instruction target. That's what it's there for. I guess php 5 and 4 are not the best examples, since php5 already uses '?php'

RE: [PHP] Obsession with BC

2005-10-11 Thread Kilbride, James
Perhaps I'm missing something but doesn't Apache hand off to PHP before it looks at anything inside the file? Doesn't it hand it off at the fact that the target is SomeFile.php. So the tag ?php4/5/6/X doesn't mean anything since by the time the tag gets read it's already in PHP4 or 5 or 6. So the

Re: [PHP] Obsession with BC

2005-10-11 Thread GamblerZG
Kilbride, James wrote: Perhaps I'm missing something but doesn't Apache hand off to PHP before it looks at anything inside the file? Doesn't it hand it off at the fact that the target is SomeFile.php. So the tag ?php4/5/6/X doesn't mean anything since by the time the tag gets read it's already

[PHP] onChange js running a php function

2005-10-11 Thread Dan McCullough
Its been awhile since I tried this so I was wondering if anyone had any luck with this. I need to get a list of tables from a database, which means I have to run a function, I would like to have an onChange event run when I change my selection in a select menu, that would send the value for the

Re: [PHP] onChange js running a php function

2005-10-11 Thread tg-php
First, I want to beat everyone to the punch in yelling at you.. This is not a PHP question!!! RTFM STFU NOOB or something stupid like that. hah But, maybe it seems like it COULD be a PHP question. And it's definitely relevant to PHP development, so how about we give a REAL answer instead of

Re: [PHP] Obsession with BC

2005-10-11 Thread Stephen Leaf
On Tuesday 11 October 2005 01:56 pm, GamblerZG wrote: On the final hand, if you pass the pages off from apache to a php exe or module.. How does Apache know which one to pass it to? Php4 or Php5? By the processing instruction target. That's what it's there for. I guess php 5 and 4 are not

Re: [PHP] onChange js running a php function

2005-10-11 Thread Brent Baisley
As someone else mentioned, this isn't really PHP. You could be using any server side language. It's really a javascript question. But to answer your question, the functionality you are looking for has lately been being solved by using AJAX. Search the list archives for some links to some

Re: [PHP] Obsession with BC

2005-10-11 Thread GamblerZG
Richard Davey wrote: You either code for PHP4 or you code for 5. That's exactly my point. Backwards compatibility doesn't slow down the evolution of a language Not true. Quite a few of the discussions of new features and even some bugfixes end up on can't be done because of BC. And if

[PHP] object as function argument

2005-10-11 Thread Björn Bartels
Hello there, myab ths a stupid question, but i didn't find anything inside the php docs: is it possibe to pass an object (like $foo = new myObject(); ) to a function as its argument (like my_func($foo); ) thanx a lot Björn Bartels -Development/IT-Services-

Re: [PHP] object as function argument

2005-10-11 Thread Jasper Bryant-Greene
Björn Bartels wrote: myab ths a stupid question, but i didn't find anything inside the php docs: is it possibe to pass an object (like $foo = new myObject(); ) to a function as its argument (like my_func($foo); ) Yes, but if you're using PHP 4 you may want to define the function as taking

Re: [PHP] Get Mac Address

2005-10-11 Thread Rory Browne
Hi Ben, Try: /* notice the backtics, and that arp on linux usually needs to run as root Which means that you either have to install sudo, or set the suid bit. */ $arpoutput = `/sbin/arp -a`; Do a man arp on linux to see what form of the arp command you want. It's a while since I used it.

[PHP] Re: Sequential multiple file download?

2005-10-11 Thread Oliver Grätz
This can't be easily done. The natural way of doing this would involve sending some HTTP headers but this is not possible once you've started sending data for the first file. The hard way of doing this is a 2-way approach where you have two connections: a data connection and a control connection.

[PHP] Re: Store a variable name in a database field.

2005-10-11 Thread Oliver Grätz
Yep, code sample, please. Your question is not describing your problem clearly enough. OLLi If at first you don't succeed, call it version 1.0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php