[PHP] quert problems
what the hell i wrong in this query? $q = UPDATE userpref WHERE username='kurth' AND preference=required_hits SET preference=$HTTP_POST_VARS[required_hits]; mysql_error() returns this...You have an error in your SQL syntax near 'WHERE username='kurth' AND preference=required_hits SET preference=5' at line 1 what gives? ~kurth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] randomize etc?
At 08:19 PM 8/1/2002 +0200, Hawk wrote: try using explode then walk through the array that explode makes :-) does that help? ~kurth I'm trying to make a small script that I can use for randomizing teams and stuff, I have one field where I enter how many teams, one for how many in each team, and a textarea to write down all the players in. This is where my brain stopped working, first I was thinking about using split, but I don't know how when there isn't a predefined number of variables to split it into, how do I do this? and when I have separated them into variables, how do I put them into arrays? or maybe that's not a good way to do it? I don't know, and the heat in my room is killing me, can't think clearly :) HÃ¥kan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer Jedi business, Go back to your drinks - Anakin Skywalker, AOTC [EMAIL PROTECTED] | http://kurth.hardcrypto.com PGP key available - http://kurth.hardcrypto.com/pgp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ok what kind of crack is my computer smoking?
At 02:19 PM 6/27/2002 -0700, Demitrious S. Kelly wrote: hey - RESTART APACHE! ~kurth You check and make sure the date was set right on the box? You could try make clean for everything before configuring... -Original Message- From: Rick Kukiela [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 2:10 PM To: [EMAIL PROTECTED] Subject: [PHP] ok what kind of crack is my computer smoking? I needed to recompile php to support some extra features so i went to my /usr/local/src direcotry and i rm -rf'ed apache mod_perl and php src dirs. I then re-extracted the tarballs for thoes programs... Re built everything the way i normally did (including rm -rf /usr/local/apache) which is my apache install dir before i rebuilt. I finish getting it all compiled and installed and start up apache, go to my phpinfo() script that just echos that func. and i get: build date: Jun 21 2002 16:47:12 when it should be build dat: June 27 2002 13:00:00 and the ./configure options are still the origional options... SO what do i have to do to get php to acknolege the fact that it has been recompiled with new options Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer Jedi business, Go back to your drinks - Anakin Skywalker, AOTC [EMAIL PROTECTED] | http://kurth.hardcrypto.com PGP key available - http://kurth.hardcrypto.com/pgp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Editor
At 09:18 PM 6/13/2002 +0200, Daniele Baroncelli wrote: allaire homesite hands down ~kurth Hi guys, Although any editor should be fine when coding PHP, I find that the standard Notepad it's a real pain in the ass. Especially when the script gives you an error at line 222 ! Each time I have to scroll and count each single line! Can anyone suggest me a different editor ? Cheers Daniele -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer Jedi business, Go back to your drinks - Anakin Skywalker, AOTC [EMAIL PROTECTED] | http://kurth.hardcrypto.com PGP key available - http://kurth.hardcrypto.com/pgp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Editor
At 01:23 PM 6/13/2002 -0600, Ray Hunter wrote: emacs with phpmode.lisp (do a google search for it) and on apple - pre os X we like bbedit and on X we like emacs :-) ~kurth Actually it is macromedia now. And it is windows based, what about us linux or unix or xbsd guys. Ray Hunter - Original Message - From: Kurth Bemis (List Monkey) [EMAIL PROTECTED] To: Daniele Baroncelli [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, June 13, 2002 1:24 PM Subject: Re: [PHP] Editor At 09:18 PM 6/13/2002 +0200, Daniele Baroncelli wrote: allaire homesite hands down ~kurth Hi guys, Although any editor should be fine when coding PHP, I find that the standard Notepad it's a real pain in the ass. Especially when the script gives you an error at line 222 ! Each time I have to scroll and count each single line! Can anyone suggest me a different editor ? Cheers Daniele -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer Jedi business, Go back to your drinks - Anakin Skywalker, AOTC [EMAIL PROTECTED] | http://kurth.hardcrypto.com PGP key available - http://kurth.hardcrypto.com/pgp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer Jedi business, Go back to your drinks - Anakin Skywalker, AOTC [EMAIL PROTECTED] | http://kurth.hardcrypto.com PGP key available - http://kurth.hardcrypto.com/pgp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Post 4.1.0 PHP
At 11:35 PM 5/30/2002 +0930, Michael Hall wrote: When I asked I got this response. $types_to_register = array('GET','POST','COOKIE','SESSION','SERVER'); foreach ($types_to_register as $type) { $arr = @${'HTTP_' . $type . '_VARS'}; if (@count($arr) 0) { extract($arr, EXTR_OVERWRITE); } } put that at the of of your scripts and everything will work ok untill you get things moved over. ~kurth I've been using PHP 4.0.1 for ages now, and have decided to upgrade one of my machines to 4.2.1 and get used to working under the new security arrangements. I understand that older scripts are fully compatible with 4.1.0+, or can be made so with minimal fuss. I am assuming that scripts written using the new $_GET and $_POST (etc) arrays simply won't run under pre-4.1.0 versions of PHP. So, where does this leave us with regard to ISPs that still run older versions of PHP (so that users' scripts won't break)? Is there some way to write code using the new arrays, but that will run under older versions of PHP. Would including something like this at the top of a script work: $_POST = $HTTP_POST_VARS; while inside the code reference is made only to $_POST ? Sorry if this has been covered repeatedly, I've only just rejoined the list after a break from the relentless volume (of great, useful info). TIA Michael Hall [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer Jedi business, Go back to your drinks - Anakin Skywalker, AOTC [EMAIL PROTECTED] | http://kurth.hardcrypto.com PGP key available - http://kurth.hardcrypto.com/pgp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 4.2.1 Vars
After moving to php 4.2.1 my scripts that use xxx.php?blah=4 fail to work. I know that i need to turn register_globals on in my config, however I know that there are security problems with this. So bascially I need to know how to make 500+ scripts work without editing a bunch of files to make it so that all my get and post vars start with $_POST and $_GET any ideas? ~kurth Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer Security is like an arms race; the best attackers will continue to search for more complicated exploits, so we will too. Quoted from http://www.openbsd.org/security.html [EMAIL PROTECTED] | http://kurth.hardcrypto.com PGP key available - http://kurth.hardcrypto.com/pgp Fight Weak Encryption! Donate your wasted CPU cycles to Distributed.net (http://www.distributed.net) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 4.2.1 Vars
At 04:00 PM 5/25/2002 -0400, 1LT John W. Holmes wrote: Actually - i don't understand what the docs at PHP are talking about. care to enlighten me? ~kurth Do you know what the security problems are? Do you realise that having register_globals on or off isn't the security problem, it's how you write your code? If you're not going to change any of your code, just turn on register_globals. Changing your code to _POST or _GET and doing nothing else isn't making it any more secure that using it the way it is with register_globals on. ---John Holmes... - Original Message - From: Kurth Bemis (List Monkey) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 25, 2002 3:23 PM Subject: [PHP] 4.2.1 Vars After moving to php 4.2.1 my scripts that use xxx.php?blah=4 fail to work. I know that i need to turn register_globals on in my config, however I know that there are security problems with this. So bascially I need to know how to make 500+ scripts work without editing a bunch of files to make it so that all my get and post vars start with $_POST and $_GET any ideas? ~kurth Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer Security is like an arms race; the best attackers will continue to search for more complicated exploits, so we will too. Quoted from http://www.openbsd.org/security.html [EMAIL PROTECTED] | http://kurth.hardcrypto.com PGP key available - http://kurth.hardcrypto.com/pgp Fight Weak Encryption! Donate your wasted CPU cycles to Distributed.net (http://www.distributed.net) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer Jedi Business, Go back to your drinks - Anakin Skywalker, AOTC [EMAIL PROTECTED] | http://kurth.hardcrypto.com PGP key available - http://kurth.hardcrypto.com/pgp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php