[PHP] Problem after migration of script from Fedora Core to RHEL

2006-05-19 Thread benmoreassynt
Hi, This has me confused. Have just moved servers from FC4 box to RHEL box. Basically all the settings seem to be the same. PHP5.0.4, MySQL 5.0.20 A script I use to insert text into a MySQL database now fails on the RHEL box with the following error: exception: Exception Object (     [message:pr

Re: [PHP] Running two versions of PHP locally

2006-05-19 Thread Scott Hurring
On 5/19/06, John Hicks <[EMAIL PROTECTED]> wrote: It looks like 'application/x-httpd-php' is the default type for php4. Does php5 have a different type? Is there a way to explicitly assign a new type to a module? To be more explicit: When installing php5, what do I need to do to make this confi

Re: [PHP] safe_mode

2006-05-19 Thread John Hicks
tedd wrote: Hi gang: Please excuse me for asking another dumb-ass question, but here goes. I'm finding that setting safe_mode to ON is more difficult than I first thought. In my phpinfo, safe_mode is set to OFF However, if I try to set it to ON in my ".htaccess" such as: php_value safe_

Re: [PHP] PHP & JavaScript

2006-05-19 Thread jekillen
On May 19, 2006, at 8:20 AM, Jay Blanchard wrote: [snip] http://us2.php.net/variables.external [/snip] BINGO! We have a winner! It can be as simple as adding an id to each checkbox; By doing this I did not have to change the function or the function calls. JS recognizes the boxes by id, PH

Re: [PHP] PHP Notice: Undefined index

2006-05-19 Thread John Nichel
John Taylor-Johnston wrote: Any idea why this bit of code if("yes" == $_POST['submitter']) { mysql_select_db($db,$myconnection); $sql = "INSERT INTO `$db`.`$table` (name,email,comments,entrydate) values ('$name','$email','$comments','$entrydate')"; mysql_query($sql) or die(print mys

Re: [PHP] Running two versions of PHP locally

2006-05-19 Thread John Hicks
Scott Hurring wrote: You should be able to do that with PHP4 and PHP5. However, most people don't wnat to have to use "php5" and "php4" as file extensions but rather want to be able to say, "everything on blah.com use php5 and everything on foo.org use php4"... or even to specify differeing vers

Re: [PHP] PHP Notice: Undefined index

2006-05-19 Thread Martin Alterisio
2006/5/19, John Taylor-Johnston <[EMAIL PROTECTED] : Any idea why this bit of code if("yes" == $_POST['submitter']) { mysql_select_db($db,$myconnection); $sql = "INSERT INTO `$db`.`$table` (name,email,comments,entrydate) values ('$name','$email','$comments','$entrydate')"; mysq

RE: [PHP] PHP Notice: Undefined index

2006-05-19 Thread Brady Mitchell
> Any idea why this bit of code > > if("yes" == $_POST['submitter']) > { > mysql_select_db($db,$myconnection); > > $sql = "INSERT INTO `$db`.`$table` > (name,email,comments,entrydate) > values ('$name','$email','$comments','$entrydate')"; > mysql_query($sql) or die(print mysql_err

[PHP] PHP Notice: Undefined index

2006-05-19 Thread John Taylor-Johnston
Any idea why this bit of code if("yes" == $_POST['submitter']) { mysql_select_db($db,$myconnection); $sql = "INSERT INTO `$db`.`$table` (name,email,comments,entrydate) values ('$name','$email','$comments','$entrydate')"; mysql_query($sql) or die(print mysql_error()); } is provoking

[PHP] safe_mode

2006-05-19 Thread tedd
Hi gang: Please excuse me for asking another dumb-ass question, but here goes. I'm finding that setting safe_mode to ON is more difficult than I first thought. In my phpinfo, safe_mode is set to OFF However, if I try to set it to ON in my ".htaccess" such as: php_value safe_mode 1 It do

Re: [PHP] PHP & JavaScript

2006-05-19 Thread Scott Hurring
Yeah, i guess it all depends what you're doing what works for you. Another avenue to try (depending on your application) is: Group all your checkboxes together inside of a uniquely-named DIV and then use javascript to get all of the "checkbox" elements inside the DIV. That way, you dont really n

Re: [PHP] Running two versions of PHP locally

2006-05-19 Thread Richard Lynch
On Fri, May 19, 2006 4:01 pm, John Hicks wrote: > Just a quick sanity check from a php4 user who's thinking of trying > php5: > > With PHP3 and PHP4 (I thought) you could install both Apache modules > and > invoke them on a page by page basis based on the extension you assign > them in Apache ( .ph

RE: [PHP] PHP & JavaScript

2006-05-19 Thread Jay Blanchard
[snip] For grouped checkboxes that have numerical keys, why not give them an ID that's simply a concatenation of NAME and the VALUE, so it's unique? [/snip] Because JavaScript loops through all the like ID'ed checkboxes to check or uncheck groups. It could be done the other way, but then JavaScrip

Re: [PHP] Running two versions of PHP locally

2006-05-19 Thread Scott Hurring
You should be able to do that with PHP4 and PHP5. However, most people don't wnat to have to use "php5" and "php4" as file extensions but rather want to be able to say, "everything on blah.com use php5 and everything on foo.org use php4"... or even to specify differeing versions within a single h

Re: [PHP] Encryption Advice

2006-05-19 Thread Rory Browne
DO NOT STORE CREDIT CARD NUMBERS!!! Period!!! If your PHP script can access them, then they are too accessible to the Bad Guys. Ditto Even if nothing else, someone could modify your code to email them the CC Numbers. It's better if, when it comes to time to checkout, you redirect your client

Re: [PHP] PHP & JavaScript

2006-05-19 Thread Scott Hurring
For grouped checkboxes that have numerical keys, why not give them an ID that's simply a concatenation of NAME and the VALUE, so it's unique? Run the NAME though a preg_replace to replace non alphanum chars (\W+) with an underscore first to make sure it's a valid ID. i.e. I've used this with

RE: [PHP] Encryption Advice

2006-05-19 Thread Jim Moseby
> Are there any employees who have access to this PC? What sort of > background checks have you run on every employee? > > Do you REALLY want to run the risk of having to DESTROY your > reputation with all your customers? > Not only all that, but suppose one of your customers has his CC info

Re: [PHP] Running two versions of PHP locally

2006-05-19 Thread John Hicks
Just a quick sanity check from a php4 user who's thinking of trying php5: With PHP3 and PHP4 (I thought) you could install both Apache modules and invoke them on a page by page basis based on the extension you assign them in Apache ( .php v. .php4 for example). Are you all saying you can't do

Re: [PHP] Encryption Advice

2006-05-19 Thread Richard Lynch
On Fri, May 19, 2006 3:00 pm, Lawrence Kennon wrote: > But just out of curiousity, let's assume you are > running a shopping cart which takes credit cards and > passes them on to whomever approves them and you don't > _ever_ write this info to files. Aren't you also > vulnerable to someone being ab

RE: [PHP] Encryption Advice

2006-05-19 Thread Richard Lynch
On Fri, May 19, 2006 1:36 pm, Lawrence Kennon wrote: > In regards to GNU Privacy Guard (gpg), I did actually > manage to get that to work in the hosting environment > (without the help of the hosting support folks! :). I > use a directive to tell gpg to not warn me about > "using insecure memory" b

Re: [PHP] Encryption Advice

2006-05-19 Thread Richard Lynch
On Fri, May 19, 2006 8:54 am, Lawrence Kennon wrote: > For an ecommerce site where sensitive data is stored > either in files, or in a database, have you used some > form of encryption to protect your customer's data? > > I have a client who currently uses a Perl scripted > shopping cart that store

RE: [PHP] Encryption Advice

2006-05-19 Thread Jim Moseby
> --- Koen Martens <[EMAIL PROTECTED]> wrote: > > > But your unencrypted data is there, so someone could > > possibly snoop > > that from the insecure memory. > > This is true. > > I am going to ask the hosting company to setuid gpg as > root. That should solve one problem (from gpg docs): > >

Re: [PHP] PHP & JavaScript

2006-05-19 Thread Richard Lynch
Simplest solution is to use id="whatever" for JS. It *is* possible to get [] into the name of a box in JS, but I never succeeded in any useful way myself. On Fri, May 19, 2006 9:33 am, Jay Blanchard wrote: > Can they play nicely together? > > For instance I have a small JavaScript sniplet that wi

Re: [PHP] Running two versions of PHP locally

2006-05-19 Thread Richard Lynch
With Apache, find Rasmus' post regarding "Proxy PHP4 PHP5" in the archives of this very list. You're on your own with IIS. On Fri, May 19, 2006 11:07 am, Phillip S. Baker wrote: > Greetings Gents, > > I am interested in running two versions of of PHP. > I want to see if I can get my boss to buy i

Re: [PHP] Extensions Directory (PEAR/PECL)

2006-05-19 Thread Richard Lynch
On Fri, May 19, 2006 12:43 pm, D. Dante Lorenso wrote: > Robert Samuel White wrote: >> When I ran the command: >> pecl install zip-1.3.1 >> It intalled the zip.so file to: >> /usr/local/lib/php/extensions/no-debug-non-zts-20050922/zip.so > In summary: Change your php.ini file to match the > 'no-d

Re: [PHP] round behavior changed

2006-05-19 Thread Richard Lynch
On Fri, May 19, 2006 1:27 pm, Sébastien Guay wrote: > I searched the archives but did not found anything. > > It seem that the round function behavior has changed in php 4.4.x (I > don't > have 4.4.1 handy for testing). > > In 4.3.11, the output of round("23.005",2) is 23.01 which is > mathematical

Re: [PHP] Encryption Advice

2006-05-19 Thread Lawrence Kennon
--- Koen Martens <[EMAIL PROTECTED]> wrote: > But your unencrypted data is there, so someone could > possibly snoop > that from the insecure memory. This is true. I am going to ask the hosting company to setuid gpg as root. That should solve one problem (from gpg docs): "This is necessary to l

[PHP] Re: PHP Proxy Support

2006-05-19 Thread Manuel Lemos
Hello, on 05/19/2006 12:37 PM Vedanta Barooah said the following: > I am not sure if the feature exists, but would not it be a good idea > if the proxy configurations for php can be globally set - say for > example in the php.ini , having a global proxy configuration will > allow php scripts

Re: [PHP] Re: Bug in XMLWriter?

2006-05-19 Thread Rob Richards
D. Dante Lorenso wrote: Rob Richards wrote: Expected behavior. See comments within code snippet. D. Dante Lorenso wrote: I am using XMLWriter with PHP 5.1.4 and find that it doesn't behave as I expect. I am under the impressing that until I call 'endElement', I should be free to continue add

Re: [PHP] Running two versions of PHP locally

2006-05-19 Thread Wolf
Set up a second virtual host which uses a different PHP configuration. I used PHP4 and PHP5 with my current build and just set up PHPINI in apache2 to point to which one I wanted to use per each installation. Then setting up port 90 on my box versus using port 80 is 4 versus 5 Wolf Phillip S. Bak

Re: [PHP] Encryption Advice

2006-05-19 Thread Koen Martens
Lawrence Kennon wrote: > I use a directive to tell gpg to not warn me about > "using insecure memory" but since no private keys > reside on this host I think I can safely ignore that > (they can't steal what is not there). But your unencrypted data is there, so someone could possibly snoop that fr

Re: [PHP] Re: Bug in XMLWriter?

2006-05-19 Thread D. Dante Lorenso
Rob Richards wrote: Expected behavior. See comments within code snippet. D. Dante Lorenso wrote: I am using XMLWriter with PHP 5.1.4 and find that it doesn't behave as I expect. I am under the impressing that until I call 'endElement', I should be free to continue adding attributes to an ope

Re: [PHP] round behavior changed

2006-05-19 Thread tg-php
I seem to remember something about rounding functions and accounting.. that there's a rule in accounting that says if the trailing number is even you round down, odd you round up.. or something like that. I know that's different than standard 'math' but in accounting it apparently helps deal wi

[PHP] Re: Bug in XMLWriter?

2006-05-19 Thread Rob Richards
Expected behavior. See comments within code snippet. D. Dante Lorenso wrote: I am using XMLWriter with PHP 5.1.4 and find that it doesn't behave as I expect. I am under the impressing that until I call 'endElement', I should be free to continue adding attributes to an opened element regardles

RE: [PHP] Encryption Advice

2006-05-19 Thread Lawrence Kennon
Re: Encryption Advice First off, thanks to the folks who replied with advice. I am mulling over your advice (and I greatly appreciate it!). I have been doing PHP programming for a couple years, including secure sites, but this is my first ecommerce venture, so I am trying to learn as much as I can

[PHP] Bug in XMLWriter?

2006-05-19 Thread D. Dante Lorenso
I am using XMLWriter with PHP 5.1.4 and find that it doesn't behave as I expect. I am under the impressing that until I call 'endElement', I should be free to continue adding attributes to an opened element regardless of whether I have already added elements or text below it. Look at this samp

[PHP] round behavior changed

2006-05-19 Thread Sébastien Guay
Hi, I searched the archives but did not found anything. It seem that the round function behavior has changed in php 4.4.x (I don't have 4.4.1 handy for testing). In 4.3.11, the output of round("23.005",2) is 23.01 which is mathematically correct. In 4.4.2, the output is 23 which is not correct.

RE: [PHP] Extensions Directory (PEAR/PECL)

2006-05-19 Thread Robert Samuel White
[SNIP] > When I ran the command: > pecl install zip-1.3.1 > It intalled the zip.so file to: > /usr/local/lib/php/extensions/no-debug-non-zts-20050922/zip.so > Extensions are compiled with a given Zend/PHP API. The zip extension you installed was compiled against the API dated 2005-09-22. I

Re: [PHP] Sparse 1.0b - framework for MySQL programs

2006-05-19 Thread Daniel Orner
Kevin Waterson wrote: This one time, at band camp, Jochem Maas <[EMAIL PROTECTED]> wrote: does it run on php5? does it run on php6-dev? Kevin I have no idea. I guess we won't know unless someone tries it out. 8-) --Daniel -- PHP General Mailing List (http://www.php.net/) To unsu

RE: [PHP] PHP & JavaScript

2006-05-19 Thread Jef Sullivan
I use document.getElementById().value. The only change that would need to be made with the input example is add an id="list['.$x.']" Jef -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Friday, May 19, 2006 8:47 AM To: php-general@lists.php.net Subject: Re: [PHP] PH

Re: [PHP] Extensions Directory (PEAR/PECL)

2006-05-19 Thread D. Dante Lorenso
Robert Samuel White wrote: When I ran the command: pecl install zip-1.3.1 It intalled the zip.so file to: /usr/local/lib/php/extensions/no-debug-non-zts-20050922/zip.so Extensions are compiled with a given Zend/PHP API. The zip extension you installed was compiled against the API dated 200

Re: [PHP] Sparse 1.0b - framework for MySQL programs

2006-05-19 Thread Kevin Waterson
This one time, at band camp, Jochem Maas <[EMAIL PROTECTED]> wrote: > does it run on php5? does it run on php6-dev? Kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- PHP General Mailing List (http://www.php.

Re: [PHP] Running two versions of PHP locally

2006-05-19 Thread Eric Butera
On 5/19/06, Phillip S. Baker <[EMAIL PROTECTED]> wrote: Greetings Gents, I am interested in running two versions of of PHP. I want to see if I can get my boss to buy into migrating to PHP 5. I want to set it up locally. Locally I am running apache on a windows XP box with PHP 4. I would like

Re: [PHP] Running two versions of PHP locally

2006-05-19 Thread Scott Hurring
I wrote up a little HOWTO on my site on getting PHP4 (as module) and PHP5 (as cgi) running concurrently. Maybe it'll help http://hurring.com/howto/php4_and_php5/ On 5/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Phillip S. Baker wrote: > I am interested in running two versions of of PH

[PHP] Re: Sparse 1.0b - framework for MySQL programs

2006-05-19 Thread Daniel Orner
So does anyone have any good ideas about other places for me to announce this? I'd like to get the good word out. 8-) --Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP & JavaScript

2006-05-19 Thread Jay Blanchard
[snip] So, using the same ID produces non-valid documents if you ask me. [/snip] This is correct, and in order to properly validate I changed it to transitional instead of strict. This is an internal appif it were external I would do this differently for sure -- PHP General Mailing List (http

Re: [PHP] Running two versions of PHP locally

2006-05-19 Thread php
Phillip S. Baker wrote: > I am interested in running two versions of of PHP. > I want to see if I can get my boss to buy into migrating to PHP 5. > > I want to set it up locally. > > Locally I am running apache on a windows XP box with PHP 4. > > I would like I would like to be able to set up PH

Re: [PHP] PHP & JavaScript

2006-05-19 Thread php
Dave Goodchild wrote: > I think it's a case of using id for javascript, not for css... Call me a purist, but quoting http://www.w3.org/TR/xhtml1/ (and you can probably find likewise paragraphs in other xhtml specs, all stemming from the basic XML property that id's are unique): "4.10. The element

Re: [PHP] Wikimedia - cookies

2006-05-19 Thread Anthony Ettinger
On 5/18/06, Richard Lynch <[EMAIL PROTECTED]> wrote: On Thu, May 18, 2006 10:39 pm, Christopher wrote: > I've built a front-end to display information from a wikimedia > database > that uses Text_Wiki and Text_Wiki_Mediawiki, but I can't seem to > figure > out how the wiki keeps track of its cook

[PHP] Running two versions of PHP locally

2006-05-19 Thread Phillip S. Baker
Greetings Gents, I am interested in running two versions of of PHP. I want to see if I can get my boss to buy into migrating to PHP 5. I want to set it up locally. Locally I am running apache on a windows XP box with PHP 4. I would like I would like to be able to set up PHP 5 as well on the s

Re: [PHP] PHP & JavaScript

2006-05-19 Thread John Nichel
Jay Blanchard wrote: [snip] http://us2.php.net/variables.external [/snip] BINGO! We have a winner! It can be as simple as adding an id to each checkbox; By doing this I did not have to change the function or the function calls. JS recognizes the boxes by id, PHP recognizes the array. There

[PHP] PHP Proxy Support

2006-05-19 Thread Vedanta Barooah
Hello Good People, I am not sure if the feature exists, but would not it be a good idea if the proxy configurations for php can be globally set - say for example in the php.ini , having a global proxy configuration will allow php scripts to access external resources from within a firewall ..

Re: [PHP] PHP & JavaScript

2006-05-19 Thread Dave Goodchild
I think it's a case of using id for javascript, not for css... -- http://www.web-buddha.co.uk dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css) look out for project karma, our new venture, coming soon!

Re: [PHP] PHP & JavaScript

2006-05-19 Thread php
Jay Blanchard wrote: > [snip] > http://us2.php.net/variables.external > [/snip] > > BINGO! We have a winner! > > It can be as simple as adding an id to each checkbox; > > > > By doing this I did not have to change the function or the function > calls. JS recognizes the boxes by id, PHP recogni

Re: [PHP] Re: PHP & JavaScript

2006-05-19 Thread John Nichel
Angelo Zanetti wrote: Daniel Orner wrote: Jay Blanchard wrote: Can they play nicely together? For instance I have a small JavaScript sniplet that will check certain checkboxes if a radio button is selected. Since I have a fair amount of checkboxes I want to put them in an array all their own

Re: [PHP] Re: PHP & JavaScript

2006-05-19 Thread Dave Goodchild
Could you not use an id for the object as well as a name?

Re: [PHP] PHP & JavaScript

2006-05-19 Thread Jochem Maas
John Nichel wrote: Jay Blanchard wrote: Can they play nicely together? For instance I have a small JavaScript sniplet that will check certain checkboxes if a radio button is selected. Since I have a fair amount of checkboxes I want to put them in an array all their own so I use the XHTML synta

RE: [PHP] PHP & JavaScript

2006-05-19 Thread Jay Blanchard
[snip] http://us2.php.net/variables.external [/snip] BINGO! We have a winner! It can be as simple as adding an id to each checkbox; By doing this I did not have to change the function or the function calls. JS recognizes the boxes by id, PHP recognizes the array. There were some other more co

[PHP] Re: PHP & JavaScript

2006-05-19 Thread Daniel Orner
function checkAll(field){ for (i = 0; i < field.length; i++){ field[i].checked = true; } } 'length' is null or not an object Where is this being called from? Checkboxes don't have a "length"... if u declare is like name="list37" doesnt PHP get that as an array even though it do

RE: [PHP] PHP & JavaScript

2006-05-19 Thread Kristen G. Thorson
> -Original Message- > From: Jay Blanchard [mailto:[EMAIL PROTECTED] > Sent: Friday, May 19, 2006 10:34 AM > To: php-general@lists.php.net > Subject: [PHP] PHP & JavaScript > > > Suddenly JavaScript doesn't care for the object and throws an error > (take the brackets out and it works

Re: [PHP] Re: PHP & JavaScript

2006-05-19 Thread Angelo Zanetti
Daniel Orner wrote: Jay Blanchard wrote: Can they play nicely together? For instance I have a small JavaScript sniplet that will check certain checkboxes if a radio button is selected. Since I have a fair amount of checkboxes I want to put them in an array all their own so I use the XHTML syn

[PHP] RE: PHP & JavaScript

2006-05-19 Thread Jay Blanchard
[el snipo] > For instance I have a small JavaScript sniplet that will check certain > checkboxes if a radio button is selected. Since I have a fair amount of > checkboxes I want to put them in an array all their own so I use the > XHTML syntax w/brackets; > > > > Suddenly JavaScript doesn't care

Re: [PHP] PHP & JavaScript

2006-05-19 Thread John Nichel
Jay Blanchard wrote: Can they play nicely together? For instance I have a small JavaScript sniplet that will check certain checkboxes if a radio button is selected. Since I have a fair amount of checkboxes I want to put them in an array all their own so I use the XHTML syntax w/brackets; Sudd

RE: [PHP] Encryption Advice

2006-05-19 Thread Jim Moseby
> > For an ecommerce site where sensitive data is stored > either in files, or in a database, have you used some > form of encryption to protect your customer's data? > > I have a client who currently uses a Perl scripted > shopping cart that stores orders (including credit > card numbers) in pl

[PHP] Re: PHP & JavaScript

2006-05-19 Thread Daniel Orner
Jay Blanchard wrote: Can they play nicely together? For instance I have a small JavaScript sniplet that will check certain checkboxes if a radio button is selected. Since I have a fair amount of checkboxes I want to put them in an array all their own so I use the XHTML syntax w/brackets; Sudd

[PHP] PHP & JavaScript

2006-05-19 Thread Jay Blanchard
Can they play nicely together? For instance I have a small JavaScript sniplet that will check certain checkboxes if a radio button is selected. Since I have a fair amount of checkboxes I want to put them in an array all their own so I use the XHTML syntax w/brackets; Suddenly JavaScript doesn't

Re: [PHP] Encryption Advice

2006-05-19 Thread Scott Hurring
On 5/19/06, Lawrence Kennon <[EMAIL PROTECTED]> wrote: For an ecommerce site where sensitive data is stored either in files, or in a database, have you used some form of encryption to protect your customer's data? I have a client who currently uses a Perl scripted shopping cart that stores orde

[PHP] Encryption Advice

2006-05-19 Thread Lawrence Kennon
For an ecommerce site where sensitive data is stored either in files, or in a database, have you used some form of encryption to protect your customer's data? I have a client who currently uses a Perl scripted shopping cart that stores orders (including credit card numbers) in plain text files on

Re: [PHP] Session Not Being Passed?

2006-05-19 Thread php
Scott Hurring wrote: > On 5/19/06, Richard Lynch <[EMAIL PROTECTED]> wrote: >> On Thu, May 18, 2006 9:23 pm, Mark Sargent wrote: >> > Movie 1 >> > >> > >> > > > $favMovie=urlencode("Life Of Brian"); >> > echo "> > href='http://localhost/moviesite.php?favMovie=$favMovie'>"; >> >> Errr. >>

Re: [PHP] Session Not Being Passed?

2006-05-19 Thread Scott Hurring
On 5/19/06, Richard Lynch <[EMAIL PROTECTED]> wrote: On Thu, May 18, 2006 9:23 pm, Mark Sargent wrote: > Movie 1 > > > $favMovie=urlencode("Life Of Brian"); > echo " href='http://localhost/moviesite.php?favMovie=$favMovie'>"; Errr. localhost is going to end up being THEIR localhost,