RE: [PHP] Comparison Operator

2005-01-10 Thread Chadwick, Russell
unless there is a better way From: Brad Pauly [mailto:[EMAIL PROTECTED] Sent: Mon 2005-01-10 11:41 To: Chadwick, Russell Cc: php-general@lists.php.net Subject: Re: [PHP] Comparison Operator On Mon, 10 Jan 2005 10:26:16 -0800, Chadwick, Russell <[EMAIL PROTECTED]> wrote: &

[PHP] Comparison Operator

2005-01-10 Thread Chadwick, Russell
Could anyone tell me why this code echos? "; } ?>

RE: [PHP] Strong typing?

2001-07-12 Thread Chadwick, Russell
http://www.php.net/manual/en/function.settype.php is this what you are looking for? -Original Message- From: Dr. Evil [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 12, 2001 4:55 PM To: [EMAIL PROTECTED] Subject: [PHP] Strong typing? PHP is a great language. It makes it fast and ea

RE: [PHP] Averaging columns in two tables?

2001-07-11 Thread Chadwick, Russell
SELECT round((hitters.age+pitchers.age) / 2) as avg_age ... -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 11:25 AM To: [EMAIL PROTECTED] Subject: [PHP] Averaging columns in two tables? Is it possible to get the average of two tables. I h

RE: [PHP] Mail Bcc to a $variable?

2001-07-11 Thread Chadwick, Russell
Yeah, and it might even be picky about the spacing BCC: $recipients\n whenever I've had a mail problem, its solved by viewing the headers. See if your BCC is making it into the headers and then make sure its spaced like the other fields or the mail server/client may not be using the field. >Fr

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread Chadwick, Russell
you should make the form names C_Last_Name1, C_Last_Name2, C_Last_Name3 and then have a hidden variable saying the maximum, then make a small routine on the receiving page which loops 1 to the max and uses array_push to make an array of children names. Check for empty() so that way is someone f

RE: [PHP] Duplication Results When LEFT JOIN is Used Between MultipleTables

2001-07-11 Thread Chadwick, Russell
Sounds like you want a GROUP BY bibID, then you'll have to put group by functions on all the items you are selecting. -Original Message- From: Mike Gifford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:00 AM To: Kamil Choma Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Duplicat

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread Chadwick, Russell
I think you want if (!(${"C_Last_Name$y"})) { or if (!(${"C_Last_Name".$y})) { -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:22 AM To: PHP Subject: RE: [PHP] Variable Next To Variable? I like this idea but it's giving me a parse error

RE: [PHP] Function call from a hyperlink

2001-07-11 Thread Chadwick, Russell
another way is to do eval () on $function but that kinda stuff is really bad for security. Also bad to get carried away with making one file that passes tons of different function names so your whole website's in one file :) There should be some criminal punishment for doing that. -Original

RE: [PHP] Mail Bcc to a $variable?

2001-07-11 Thread Chadwick, Russell
Try a newline at the end of $headers -Original Message- From: Marcus James Christian [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:15 AM To: [EMAIL PROTECTED] Subject: [PHP] Mail Bcc to a $variable? Hello, Ok I've got a script going to a Bcc but can't seem to get it to

RE: [PHP] counter using PHP or Javascript?

2001-07-11 Thread Chadwick, Russell
http://www.devshed.com/ClipScripts/results/l_2/c_6/ -Original Message- From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 9:42 AM To: [EMAIL PROTECTED] Subject: [PHP] counter using PHP or Javascript? Hi, Is there a way to create a counter to count the

RE: [PHP] File Download IE behavior

2001-07-11 Thread Chadwick, Russell
If you want it to automatically be saved to disk, send the header("Content-type: octet/stream"); If there is a problem with the open I would think its on the client side since theres nothing mor the server can do but specify a content type. -Original Message- From: Warren Vail [mailto:[

RE: [PHP] how to find out the mysql version from php?

2001-07-10 Thread Chadwick, Russell
SELECT version() AS version -Original Message- From: Jakob [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 2:57 PM To: [EMAIL PROTECTED] Subject: [PHP] how to find out the mysql version from php? several people seem the have the "case sensitivity problem" regarding different m

RE: [PHP] stripping white space?

2001-07-10 Thread Chadwick, Russell
there is a limit of # of root entries. But the number of files per directory is much higher. Running RH6.2 I tried this test: I have an SGI xfs partition that does billion of entries per directory, like reiser, but for an ext2 partition this perl script is for testing for ($index = 1; $index <=

RE: [PHP] flat file db

2001-07-10 Thread Chadwick, Russell
put in somewhere outside the document root, as long as your apache isn't "jailed" php can read your flat file wherever you put it, as long as its owned by the webserver user - Russ -Original Message- From: Jon Yaggie [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 9:18 AM To: [EM

RE: [PHP] Oracle question

2001-07-10 Thread Chadwick, Russell
Create a sequence, like so CREATE SEQUENCE "WHATEVER_IDS" INCREMENT BY 1 START WITH 1 MAXVALUE 1.0E28 MINVALUE 1 NOCYCLE CACHE 20 NOORDER; then when you insert INSERT INTO test (whatever_ids.nextval); the nice thing is that in your

RE: [PHP] Q: Best EZ & Free Mailing List Manager?

2001-07-10 Thread Chadwick, Russell
qmail with ezmlm, and ezmlm-idx which provides some more advanced features. - Russ http://cr.yp.to/ezmlm.html -Original Message- From: Marcus James Christian [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 9:11 AM To: [EMAIL PROTECTED] Subject: [PHP] Q: Best EZ & Free Mailing Lis

RE: [PHP] encrypting session variables

2001-07-09 Thread Chadwick, Russell
$session_id + 1 before passing it, and then $session_id - 1 before using it on the next screen ... thats the security through obscurity way :) you could put the session_id in a mysql db and then select password(session_id) that would return something really obscure and then select session_id w

RE: [PHP] Expert advice needed

2001-07-09 Thread Chadwick, Russell
To prevent locking issues and general db clogging. Any table that stores votes or hits or anything that may do several transactions / second... INSERT the data into a temporary table, and then put in a cron job which will UPDATE your actual table with a count of whats in your temp table. So for

RE: [PHP] include a perl script

2001-07-09 Thread Chadwick, Russell
if you just want to run the script system("/path/to/whatever"); if you want its output fopen ("/cgi-bin/whatever.cgi"); if you want the perl script to set variables or anything you'll have to write something that reads the output from fopen and assigns them. Or if you trust this server (dont d

RE: [PHP] Re: how to hide dbconnect file if its in published directory?

2001-07-09 Thread Chadwick, Russell
Have the script dump the envoirnment vars to a file and compare the variables from a user vs include because some of those variables apache gets from a browser, off the top of my head REMOTE_ADDR should work, that wont be set when you include. So just die() if its set. - Russ -Original Mes

RE: [PHP] Re: Running PHP as a cron job....

2001-07-09 Thread Chadwick, Russell
You can still run php... I put my cron scripts in a directory on the web server, just makes sure they are all safe to run multiple times in case someone finds it then make a script that for each entry in that directory invokes the script. mines in python so you just import urllib and then for

RE: [PHP] Code Examples for Job Interview

2001-07-09 Thread Chadwick, Russell
For the most part, anything that is reusable and modular they like. They also love people who know a buncha languages and would use the best one that fit the current project so bring a variety. -Original Message- From: JCampbell [mailto:[EMAIL PROTECTED]] Sent: Monday, July 09, 2001 3:0

RE: [PHP] How to apply something to every variable

2001-07-06 Thread Chadwick, Russell
while (list($key, $val) = each ($HTTP_POST_VARS)) { ${$key} = addslashes($val); } - Russ -Original Message- From: Chris Anderson [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 3:07 PM To: [EMAIL PROTECTED] Subject: [PHP] How to apply something to every variable I was p

RE: [PHP] Problem writting to file...

2001-07-06 Thread Chadwick, Russell
ter is = 0 Counter is = 1 Counter is = 2 Counter is = 3 Counter is = 4 Counter is = 5 However if you remove the "Counter is =" part then once again no numbers are written, only the 'new line' symbols... - Original Message ----- From: Chadwick, Russell To: '[EMAIL P

RE: [PHP] Problem writting to file...

2001-07-06 Thread Chadwick, Russell
What happens when the code is - Original Message - From: "James Bartlett" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 06, 2001 1:15 PM Subject: [PHP] Problem writting to file... Hi, I'm trying to write data to a file but for some reason it will not store numbers in

RE: [PHP] PHP/mySQL Query

2001-07-05 Thread Chadwick, Russell
SELECT t.ownerID, t.last_update, o.teamname FROM teampages t, owners o WHERE t.ownerID = o.ownerID ORDER BY t.last_update DESC LIMIT 10 -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 5:00 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP/mySQL Qu

RE: [PHP] Bandwidth?

2001-07-05 Thread Chadwick, Russell
The little b, bits, so ~45KB -Original Message- From: Shrout, Ryan [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 10:26 AM To: 'Chadwick, Russell' Subject: RE: [PHP] Bandwidth? Is that 350 KB/sec or 350 kbps? Ryan Shrout -Original Message----- From: Chadwic

RE: [PHP] Bandwidth?

2001-07-05 Thread Chadwick, Russell
Most colocations charge by sustained bandwidth throughout the month, not in transfers per month so it may be difficult to get a comparison. I am paying 485$/month which gets me 6U (2 servers) and a sustained 350kb/sec which comes out to ummm a lot. The colocation is at a Level3 facility with du

RE: [PHP] ENC: ADD a user in linux using PHP

2001-06-30 Thread Chadwick, Russell
http://expect.nist.gov/ --- Toolshed Computer Productions - Professional PHP Hosting Hosting - Dedicated Servers - Design - Programming http://www.toolshed51.com -Original Message- From: Bruno Freire [mailto:[EMAIL PROTECTED]]

RE: [PHP] PHP & ImageMagick

2001-06-30 Thread Chadwick, Russell
Did you try the escapeshellcmd () function ? - Russ --- Toolshed Computer Productions - Professional PHP Hosting Hosting - Dedicated Servers - Design - Programming http://www.toolshed51.com -Original Message- From: Jeffrey Barendse [mailto:[EMAIL PROTECTED]] Sent: Thursday, J

RE: [PHP] Pricing Advice Needed

2001-06-29 Thread Chadwick, Russell
I believe its how_many_times_client_changes_mind * (man_hours * 2) * rate = what_your_time_is_worth provided that (how_many_times_client_changes_mind * (man_hours * 2)) + other_projects_time < 18hr/day of programming Think of the project overall and make sure to sit down with the client and

RE: [PHP] PHP code secrity on VirtualHost

2001-06-28 Thread Chadwick, Russell
Title: PHP code secrity on VirtualHost   I ran into the problem of certain code needing to suexec or do priveledged things that you dont want other domains to be able to do and I ended up writting my own apache module in C for lack of any other way.  If you come up with another solution I'd

RE: [PHP] PHP 4.0.6 and APXS2

2001-06-27 Thread Chadwick, Russell
Hello, I believe include problem is a small typo... the include path needs to be ./:/usr/local/lib/php There is a php function to change the working directory, I'm not remembering it off the top of my head, but you can do either: exec("cd $path && ls -d */*.jpg",$ls); or:

RE: [PHP] Strange error on mysql_fetch_array

2001-06-27 Thread Chadwick, Russell
>From experience with oracle, desc only works in an sql prompt, not through code. So use the more lengthy method in mysql: SHOW FIELDS FROM $table_name in oracle: SELECT c.column_name, c.data_type, c.data_length, c.data_precision, c.data_scale, c.nullable FROM sys.dba_tab_colum

RE: [PHP] MySQL Dump In PHP

2001-06-22 Thread Chadwick, Russell
  mysqldump is a command to be used at a prompt, from php you could system ("mysqldump whatever > /tmp/dump.sql"); --- Toolshed Computer Productions - Professional PHP Hosting Hosting - Dedicated Servers - Design - Programming http://www.toolshed51.com -Original Message-From: Chri

RE: [PHP] SQL statement for clearing a table

2001-06-22 Thread Chadwick, Russell
No one has yet mentioned TRUNCATE TABLE x which is a lot faster on large tables because even DELETE FROM evaluates each row where TRUNCATE just clears the data. - Russ --- Toolshed Computer Productions - Professional PHP Hosting Hosting - Dedicated Servers - Design - Programming http:

RE: [PHP] apache and php ate up all my memory :-[

2001-06-22 Thread Chadwick, Russell
Can you post the information at the header of top like... CPU states: 0.4% user, 0.0% nice, 3.6% system, 0.0% interrupt, 96.1% idle Mem: 47M Active, 147M Inact, 36M Wired, 11M Cache, 35M Buf, 7328K Free Swap: 1024M Total, 144K Used, 1024M Free and also the output of ps waux | grep mysql &&

RE: [PHP] Problem with session_is_registered

2001-06-21 Thread Chadwick, Russell
You have to do session_start (); in your check script before anything else. - Russ --- Toolshed Computer Productions - Professional PHP Hosting Hosting - Dedicated Servers - Design - Programming http://www.toolshed51.com -Original Message- From: Chris Lee [mailto:[EMAIL PROTEC

RE: [PHP] Constantly running?

2001-05-23 Thread Chadwick, Russell
If safe mode is off you can keep setting the max execution time in a while loop and it would run forever. It will also use 100% cpu unless you call sleep. --- Toolshed Computer Productions - Professional PHP Hosting Hosting - Dedicated Servers - Design - Programming http://www.toolshe

RE: [PHP] Passwords?

2001-05-22 Thread Chadwick, Russell
This link Back will work on javascript enabled machines... the truly failsafe way is to stuff their data in a session or in the database and pass an id back to the original script. You can also make your form to fill out a seperate file, which your first script includes, and if there is a data e

RE: [PHP] ftp

2001-05-22 Thread Chadwick, Russell
I can think of 2 options, neither pleasant. On unix you can write a script for ftp to use and put a .netrc in your home dir with a line like this machine login password and that will make it automatically connect. So you could write script to do things like get a file listing and fetch files

RE: [PHP] URL Variables

2001-05-22 Thread Chadwick, Russell
Variables as part of the url would not be encrypted, but you could send variables as POST to the secure document and then they would get encrypted - Russ --- Toolshed Computer Productions - Professional PHP Hosting Hosting - Dedicated Servers - Design - Programming http://www.toolshed5

RE: [PHP] mysql error, dont see why.. please help

2001-05-22 Thread Chadwick, Russell
The SET clause has to come before WHERE clause - Russ --- Toolshed Computer Productions - Professional PHP Hosting Hosting - Dedicated Servers - Design - Programming http://www.toolshed51.com -Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: Tuesday, Ma