Re: [PHP] CRON?

2003-01-25 Thread Tom Rogers
y full of security issues. Then you would need a root cron job to parse an external file owned by the web server that it queries for any updates that are needed and does them for you. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] XORing a string with some hash???

2003-01-25 Thread Tom Rogers
find a way at all. PL> Thank you all in advance. PL> Regards, PL> Peter $out = $string1 ^ $string2; -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Too many 'linespaces'

2003-01-27 Thread Tom Rogers
LE> } //if($totalRows_Recordset1 > 0) { LE>?> LE> LE> LE> LE> .. and so on .... LE> When the query returns 60 rows I get ca. 7 blank lines between $row_Recordset1['mModell']; ?> and Kontonr. LE> Does anyone understand? Anyone have a tip? LE> Thanks a lot! LE> Lars maybe this line needs changing to: I think you need the comment -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Too many 'linespaces'

2003-01-27 Thread Tom Rogers
Hi, Tuesday, January 28, 2003, 12:47:05 PM, you wrote: LE> You mean to comment out the while sentence? LE> A do-while-loop won't work without the while-part would it? Comments are LE> suplements to understand the code, not needed for the code to work. LE> Thanks anyway LE>

Re: [PHP] Passing Object Refs throught Arrays

2003-01-30 Thread Tom Rogers
return $r; } function array_ref_unshift(&$array,&$ref){ array_unshift($array,''); $array[0] =& $ref; } function &array_ref_shift(&$array){ $r =& $array[0]; array_shift($array); return $r; } -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Adding HTTP URL Code

2003-01-30 Thread Tom Rogers
AHFe> PHP General Mailing List (http://www.php.net/) EKAHFe> To unsubscribe, visit: http://www.php.net/unsub.php I think your regex needs to look like this (from the manual): $data_str = eregi_replace ("\[([[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/])\]", "\\1", $data_str); The reason you were getting the wrong link was the href= was wrong so the browser just used the page address as the href. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: [PHP-WIN] Register globals on and off

2003-01-30 Thread Tom Rogers
egister_globals on -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] I would like to display a list of the same products only if productPublic = staff or members.

2003-01-31 Thread Tom Rogers
RE productType = '$productType AND (productPublic = 'staff' OR productPublic = 'members') ORDER BY productId DESC LIMIT 10 -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using SELECT and MULTIPLE in a form

2003-02-01 Thread Tom Rogers
K> entry. JK> How do I access the data after the user presses submit? JK> -- JK> Jim Kaufman mailto:[EMAIL PROTECTED] JK> Linux Evangelistcell: 612-481-9778 JK> public key 0x6D802619 fax: 952-937-9832 JK> http://www.linuxforbusiness.net

Re: [PHP] Turn off PHP for certain directories?

2003-02-02 Thread Tom Rogers
ll BS> Options FollowSymLinks BS> NoParsePHP BS> BS> Can this be done? How? Perhaps as a php_value entry in the BS> directive? BS> Thanks, BS> -Ben you could try php_flag engine = Off -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Turn off PHP for certain directories?

2003-02-02 Thread Tom Rogers
Hi, Sunday, February 2, 2003, 11:07:20 PM, you wrote: EEV> At 12:25 02.02.2003, Tom Rogers said: EEV> [snip] >>you could try >> >>php_flag engine = Off EEV> [snip] EEV> I'

Re[2]: [PHP] Loading CSV data into MySQL

2003-02-02 Thread Tom Rogers
sible then I'll just have to suck it up and rebuild this BVB> thing for free but if I can find a way around that for the time being BVB> then Try creating an index on the field you want it ordered by -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Date and time problem

2003-02-02 Thread Tom Rogers
p of the page, for example putenv('TZ=Australia/Brisbane'); Then date by itself will give the desired result -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Text size in image

2003-02-02 Thread Tom Rogers
ize is set in each call to imagettftext() as one of the parameters. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Execute at a defined time

2003-02-05 Thread Tom Rogers
on should I use MB> to make this happen (run the script). MB> Miguel One simple way is with cron and a web page using lynx like this: 00 00 * * * /usr/bin/lynx -dump http://domain.com/countdown.php 1> /dev/null 2> /dev/null (-dump tells lynx to read the url, dump the page out and

Re: [PHP] mcrypt installation problems

2003-02-05 Thread Tom Rogers
I did it this way untar libmcrypt and mcrypt into /usr/src then in libmcrypt ./configure --prefix=/usr (could be /usr/local if you want make make install ldconfig cd ../mcrypt-2.6.3 ./configure --prefix=/usr make make install then in php --with-mcrypt=/usr/src/mcrypt-2.6.3 -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] mcrypt installation problems

2003-02-05 Thread Tom Rogers
Hi, Thursday, February 6, 2003, 12:30:01 AM, you wrote: JCI> Tom Rogers wrote: >> >> I did it this way >> untar libmcrypt and mcrypt into /usr/src >> then in libmcrypt >> ./configure --prefix=/usr (could be /usr/local if you want >> make >> make insta

Re: [PHP] Date format from file

2003-02-05 Thread Tom Rogers
t string as the date in the above code? ehhc> TIA, ehhc> Ed If you change the format of your string you can do this: $t = "20030205 1530"; echo 'New date/time = '.date("d/m/Y H:i",strtotime($t." + 28 days")).''; -- regards, T

Re: [PHP] reading CD information

2003-02-05 Thread Tom Rogers
ned cd) AW> or D: (XPProCD), etc...If you know what I am talking about, is there a way AW> to have PHP read that cd label? AW> Adam You could try the vol command using exec{} and parse out the volume name -- regards, Tom -- PHP General Mailing List (

Re[2]: [PHP] reading CD information

2003-02-05 Thread Tom Rogers
Hi, Adam TR> You could try the vol command using exec{} and parse out the volume name TR> -- TR> regards, TR> Tom This should do it: '; ?> -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] reading CD information

2003-02-05 Thread Tom Rogers
Hi, Thursday, February 6, 2003, 4:49:23 AM, you wrote: JN> Guess it's not on Linux, eh? :) JN> Adam Williams wrote: >> Thanks Tom, that works perfect! >> >> Adam >> >> On Thu, 6 Feb 2003, Tom Rogers wrote: >> >>

[PHP] Random Images

2003-02-05 Thread Tom Ray
I'm trying to set it up so that a random image from either a mysql table or a text file list is displayed on a page each time a user goes to it. I'm a little stumped as to how to do this with phpany suggestions? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

Re[2]: [PHP] empty and isset

2003-02-06 Thread Tom Rogers
; }else{ echo $x.' Not empty check returns empty. '; } $test = ''; } if($x == 2){ $test = 0; } if($x == 3){ $test = $x; } echo ''; } -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] GD Chinese support - php4.3

2003-02-07 Thread Tom Rogers
PROTECTED] You will probably find the microsoft font is unicode not Big5 -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Class within a class

2003-02-10 Thread Tom Rogers
ar $db; function a{ global $class_ref; if(isset($class_ref['db'])){ $this->db =& $class_ref['db']; }else{ $this->db = new db(); } } } using $class_r

Re: [PHP] Re: MySQL for storing PHP code

2003-02-10 Thread Tom Rogers
r >> of the page, or will it generate output that will be executed? >> >> If the echo/print does not work, is there another way to do this? >> >> Cheers, >> Daniel >> >> Be aware that it could also ruin your life :) It would be a good idea to store an

Re: [PHP] default php sessions in a database

2003-02-11 Thread Tom Rogers
t; change anything in their scripts. Have a look at msession, it was built for your situation. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] msession users

2003-02-11 Thread Tom Rogers
r about a year without ever having any problems. I have a class to replace the normal php session handler if you would like to take a look at it. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] msession users

2003-02-12 Thread Tom Rogers
n (get rid of junk functions :) and put into an auto prepend file with the correct host info for connecting, that way it would be transparent to your users. I did my own class as the standard session stuff does not check for expired data and msession has a simple method for checking this. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ftp_get()

2003-02-12 Thread Tom Rogers
quot; as the M> filename, but that also fails. I also tried to ftp_chdir() to the directory M> first and get file.txt to no avail. Does anyone have any ideas on how to M> GET a file that is in a directory with a space in it? M> -Chris Try escaping it $dir = "/remote/file\ dir/&

Re: [PHP] How does PHP transforms an integer on a string? like "3" onto "three"

2003-02-14 Thread Tom Rogers
} else{ $res = $res%10; if($res > 0){ ($left == 0)? $and = '':$and = ' and '; $t = $this->words[0][$res]. " hundred".$and.$t; } else{ if($left > 0)$t = ' and '.$t; } $num = intval($num/1000); $this->num($num); } return $t; } } //usage $n2t = new num_to_text(); for($num = 0;$num < 11;$num++){ echo $num.' '.$n2t->convert($num).''; } -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] calculating kilobytes

2003-02-15 Thread Tom Rogers
here. j> thank you :) These commands might help if they work with safe mode and your on unix of some sort echo exec("du -c -h /home/tigger",$results).''; echo exec("du -c /home/tigger",$results).''; -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] pro-rated date

2003-02-17 Thread Tom Rogers
ECTED]> PC> Operations / Abuse / Whatever PC> it.canada, hosting and development http://www.it.ca/ This might get what you want, but to be accurate you will have to decide what to do with the odd hours mins left over $days = (strtotime("+1 month") - (dat

Re[2]: [PHP] syntax question

2003-02-19 Thread Tom Rogers
$sql .= ")"; But you are right there was a need to nuke the comma in the original script -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Display strings with single quotes

2003-02-20 Thread Tom Rogers
left out. Here is the code I'm using: Rec> $string = str_replace("'", "''", $string); Rec> $string = stripslashes($string); Rec> echo ""; Rec> Thanks Rec> Dave Pass the string through htmlentities(); before yo

Re: [PHP] Pass Array parameter by reference

2003-02-20 Thread Tom Rogers
[0]; A> but the echo function returns "Array". A> Can anybody help me? A> Thanks! A> Andrea Try like this my_function(&$argument){ $argument[0] = 'test'; } $array = array(); my_function($array); echo $array[0]; The function declaration is what determins th

Re: [PHP] Display strings with single quotes

2003-02-20 Thread Tom Rogers
left out. Here is the code I'm using: Rec> $string = str_replace("'", "''", $string); Rec> $string = stripslashes($string); Rec> echo ""; Rec> Thanks Rec> Dave You could also try echo ''; which woul

Re: [PHP] Class VS Functions

2003-02-20 Thread Tom Rogers
anisation than a do/can't do situation. Classes help keep all related functions and variables together. One thing springs to mind is function names can be the same in different classes and they won't conflict where with just functions by themselves they would have to be different. -- r

Re: [PHP] Re: including in shtml

2003-02-21 Thread Tom Rogers
at post >> is not a valid method in shtml. >> >> I have also considered a session variable but since a session needs to >> initiated or continued before anything is output to the browser that wont >> work (I think). >> >> does anyone have a solution to get this to work? >> >> thanks, >> Hans >> >> Why are you trying to mix shtml and php ? -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Re: Mysql DB connect failure

2003-02-21 Thread Tom Rogers
;> > Here's a snippet from: >> > http://www.php.net/manual/en/language.operators.errorcontrol.php >> > >> > If the track_errors feature is enabled, any error message generated by >> > the expression will be saved in the global variable $php_errormsg

Re: [PHP] Re: including in shtml

2003-02-21 Thread Tom Rogers
ce a session needs to >> initiated or continued before anything is output to the browser that wont >> work (I think). >> >> does anyone have a solution to get this to work? >> >> thanks, >> Hans >> >> POST won't work easily with .shtml files so you are limited to GET and its length limitations but the following works for me: //test.php '; } } print' '; ?> (parse string seems to like adding slashes) To use post you will have to post to a .php file to do the processing and redirect to the .shtml file. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Logging Referer

2003-02-21 Thread Tom Rogers
stats/invisman.phtml?"+r+"\"">http://domain.com.au/stats/invisman.phtml?"+r+"\"</a>;>")} //--> http://domain.com.au/stats/invisman.phtml?unknown+9"; BORDER=0> (the +9 was a page id, invisman.phtml returned a transparent gif) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sitewide Header & Footer Includes || Trouble with Relative Paths..........

2003-02-22 Thread Tom Rogers
h")); that way you just do include('file.inc') from anywhere and it will find your files. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Sitewide Header & Footer Includes || Trouble with Relative Paths..........

2003-02-22 Thread Tom Rogers
Hi, Sunday, February 23, 2003, 9:13:16 AM, you wrote: CH> Hey Tom. CH> Thanks for the idea; however, since we're not hosting the site on our own CH> server, we don't have permissions for altering the php.ini file.. CH> --Noah It only sets the ini path for the cur

Re: [PHP] preg_match question: locating unmatched HTML tags

2003-02-22 Thread Tom Rogers
e { AC>echo 'Input looks fine. No unmatched tags.'; AC> } The simplest is just to add directly to the end of their message, may not be technically correct but it won't do any harm either :) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg_match question: locating unmatched HTML tags

2003-02-22 Thread Tom Rogers
nd){ $fix = '<'.$st.'>'; //create an html end tag } break; } $out .= $match[0][$x];

Re: [PHP] Help Please

2003-02-23 Thread Tom Rogers
o qmail. HI> thanx HI> Haseeb HI> --- Msg sent via @Mail - http://atmail.nl/ Take a look at vpopmail, it will do all you need http://www.inter7.com/vpopmail.html -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] getimagesize() issues starting with PHP 4.3..

2003-02-25 Thread Tom Rogers
PGP Fingerprint - C442 04E2 26B0 3809 8357 96AB D350 9596 0436 7C08 Try $retval=getimagesize("http://armanii.c.crosslink.net/arcticsilver/dtmsig4.jpg",$info); ..seems to wake it up :) ..possible bug?? -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] virtual() test

2003-02-27 Thread Tom Rogers
the following script (virt) in cgi-bin #!/usr/bin/php Then virtual('/cgi-bin/virt?id=1'); -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] virtual() test

2003-02-27 Thread Tom Rogers
>> today. http://www.phparch.com/ TR> it shows up under TR> _SERVER["QUERY_STRING"] => id=1 TR> I ran the following script (virt) in cgi-bin TR> #!/usr/bin/php TR> header('Content-type: text/plain'); TR> echo "\n"; TR> echo 'T

Re: [PHP] Help!! with array's Please

2003-02-27 Thread Tom Rogers
unset($users[3]) // now add it back $userlist = implode(',',$users) $list = $name.':'.$pass.':'.$gid.':'.$userlist; $groups[$x] = $list; } $x++; //here you could fputs to a temp file

Re: [PHP] Function returns an array of objects...

2003-02-27 Thread Tom Rogers
() { $theArray = array(); for ($i = 0; $i < 10; $i++) { $theArray[] =& new Objects($i); } return $theArray; } $temp = getArrayOfObjects(); echo $temp[0]->id; -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: mysqldump

2003-02-27 Thread Tom Rogers
ly because a space is a valid char in password -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[3]: [PHP] Help!! with array's Please

2003-02-28 Thread Tom Rogers
Hi, Friday, February 28, 2003, 5:39:39 PM, you wrote: RK> Hello Tom, RK> Thursday, February 27, 2003, 7:39:52 PM, you wrote: TR>> Hi, TR>> Friday, February 28, 2003, 12:20:38 PM, you wrote: RK>>> I really need somebody to help me with this I am totally lost on what

Re[4]: [PHP] virtual() test

2003-02-28 Thread Tom Rogers
;QUERY_STRING"] => id=1 >> >> TR> I ran the following script (virt) in cgi-bin >> >> TR> #!/usr/bin/php >> TR> > TR> header('Content-type: text/plain'); >> TR> echo "\n"; >> TR> echo 'Test script report';

Re: [PHP] Help with Sessions

2003-02-28 Thread Tom Rogers
KI> d:\apache_docroots\internal.infomart.ca\infodesk\test.php on line 8 PKI> Can anyone please help? Thanks move session_start() to the first line in your file -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Fwd: Re[7]: [PHP] Help!! with array's Please

2003-03-01 Thread Tom Rogers
This is a forwarded message From: Tom Rogers <[EMAIL PROTECTED]> To: Richard Kurth <[EMAIL PROTECTED]> Date: Saturday, March 1, 2003, 5:59:11 PM Subject: [PHP] Help!! with array's Please ===8<==Original message text=== Hi, Saturday, March 1, 2003, 4

Re: [PHP] Date question

2003-03-01 Thread Tom Rogers
www.broadbandreports.com you can do if(strtotime($mysq_timestamp) >= strtotime('24 hours ago')) { strtotime can take a mysql timestamp directly I think -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Little help please

2003-02-27 Thread Tom Ray
I'm looking for a webbased interface that will allow me to managae mysql databases. However, phpmyadmin has been ruled out due to the fact it requires the username and password to be stored in the config file and that it doesn't have any security to protect the average joe from stumbling across it.

Re: [PHP] heredoc problem

2003-03-02 Thread Tom Rogers
tried all the combinations of spaces and jvc> no space in that line that I can think of. jvc> So, what's wrong. Undoubtedly something obvious to anyone except me. jvc> Janet You have a space at the end of >>>EOD Get rid of it and it should work -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Still no luck running a PHPCLI script from CRON

2003-03-02 Thread Tom Rogers
t;> > -- >> >>O Ernest E. Vogelsinger >> >(\)ICQ #13394035 >> > ^ http://www.vogelsinger.at/ >> > >> > >> > >> > -- >> > 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 >> >> >>-- >>PHP General Mailing List (http://www.php.net/) >>To unsubscribe, visit: http://www.php.net/unsub.php JMC> -- JMC> PHP General Mailing List (http://www.php.net/) JMC> To unsubscribe, visit: http://www.php.net/unsub.php JMC> -- JMC> PHP General Mailing List (http://www.php.net/) JMC> To unsubscribe, visit: http://www.php.net/unsub.php Put phpinfo(); in your script and you should get an email from cron with the output of your script. See if there is anything in there that can give you a clue. I ran your script using cli 4.3.0 and it worked fine. What user are you running cron as? -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Still no luck running a PHPCLI script from CRON

2003-03-02 Thread Tom Rogers
Hi, Monday, March 3, 2003, 2:54:47 PM, you wrote: JMC> Tom, JMC> Did you run the script from cron? If so, what operating system are you JMC> using? Putting PHP info in my script won't do me any good since cron JMC> won't run it. The trouble is that cron does nothin

Re[2]: [PHP] Still no luck running a PHPCLI script from CRON

2003-03-03 Thread Tom Rogers
PROTECTED] JMC> ADAM Software & Systems Engineer JMC> First Creative JMC> -- JMC> PHP General Mailing List (http://www.php.net/) JMC> To unsubscribe, visit: http://www.php.net/unsub.php Try removing the -q's and see if root or whatever user cron runs as gets an email with an error message in it, as cron is actully having a crack at running the script. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] ICQ # validation

2003-03-03 Thread Tom Rogers
er"])) { >> print("a-okay!"); >> } else { >> print("error msg"); >> } >> >> I've submitted the ICQ # 2264532680, but it validates. Any ideas? >> My icq is 6 digits -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Still no luck running a PHPCLI script from CRON -- getting closer

2003-03-03 Thread Tom Rogers
0 JMC> Somnio World Web Solutions http://www.somnioworld.com JMC> -Original Message- JMC> From: Tom Rogers [mailto:[EMAIL PROTECTED] JMC> Sent: Monday, March 03, 2003 6:23 PM JMC> To: Justin Michael Couto JMC> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] JMC> S

Re: [PHP] How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Tom Rogers
; $vars = '$subject = new foo2('; if($num > 0) { $i = 0; foreach($params as $var){ $vars .= ($i > 0)? ',':''; $vars .= (is_string($var))? "'".$var."'" : $var; $i ++; } } $vars .= ');'; eval($vars); untested but is similar to something I use as a class loader with unknown number of variables to pass. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: AW: [PHP] How to use the fields of an array as individual parameter for a function

2003-03-04 Thread Tom Rogers
o { var $loader; var $foo2; function foo(){ this->loader =& new loaderClass('path_to_modules'); } function load($var1,$var2,$var3){ $this->foo2 =& $this->loader->load('foo2Class','foo2',$var1,$var2,$var3) } } $f = new foo(); $f->load('Hello',2,3) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Supressing a session id in link

2003-03-04 Thread Tom Rogers
the session until the link is clicked but then G> the session does not carry over to the next page. Any Ideas? G> TIA G> Gary It's the '&' that they are objecting to, change this line in your php.ini to the following: arg_separator.output = "&"

Re[2]: [PHP] Supressing a session id in link

2003-03-04 Thread Tom Rogers
Hi, Wednesday, March 5, 2003, 1:47:39 PM, you wrote: G> Tom Rogers wrote: >> Hi, >> >> Wednesday, March 5, 2003, 12:45:27 PM, you wrote: >> G> Hi All, >> G>I need to suppress the session id in some links. The xhtml needs to >> G> validate a

Re: [PHP] Still having a problem with IF/ELSE Statement

2003-03-06 Thread Tom Rogers
erous ways of adding/removing/changing double quotes and HJ> single quotes around. HJ> Any and all help would be greatly appreciated HJ> Jess You dont need quotes in the if bit just : if($status == 'active'){ echo("active line\n"); }else{ echo("inactive line\n"); } should work -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem updating

2003-03-06 Thread Tom Rogers
sult) SJ> { SJ> echo "An error occurred when trying to update the DB"; SJ> } SJ> else SJ> { SJ> echo "$result & Successfully updated the details"; SJ> } SJ> } You will need to use the global vars and also escape quotes like this: function update_subscriber_account() { $new_email = addslashes($_POST['new_email']); . . . $query = "update subscribers set email = '$new_email', . . -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] while loop with mysql

2003-03-10 Thread Tom Rogers
le sent field with the key # $sql1="Update members set sent='$keys' where email='$logged_email'"; $result=safe_query($sql1); send_email(); needs $result3 or something -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] HTTP_REFERER security implications?

2003-03-10 Thread Tom Woody
em to see or do). I have seen this method used on other sites, but I prefer to check with the experts first. thanks, -- Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Message Board Question

2003-03-11 Thread Tom Rogers
KE '%" .$searchword. "%' ORDER BY whatever ASC ".$limit; $result = mysql_query($Query2) or die(mysql_error()); $hstring = $page->make_head_string('Results'); $pstring = $page->make_page_string("&searchword=".$searchword."&whatever=".$whatever);//add the other variables to pass to next page in a similar fashion echo "".$hstring.""; while($row = mysql_fetch_array($result)){ echo "".$show_data_here.""; } echo "".$pstring.""; } ?> Note: the search variables on subsequent pages will be passed by GET method -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Sessions Tutorial [was: Re: [PHP] Another questions about usning session.]

2003-03-12 Thread Tom Woody
I have found this to the best tutorial I have seen yet on sessions...its very straight forward, and took care of a lot of questions that I had. http://www.sitepoint.com/article/319/95 -- Tom Woody Systems Administrator Don't throw your computer out the window, throw the Windows out of

Re: [PHP] Update Status Question

2003-03-12 Thread Tom Rogers
n true or false or something when MW> this is processed. I.E. if the Where clause fails it would report back MW> fail? Or do I first need to check the status with a select? MW> Thank you, MW> Mike Walth MW> CinoFusion If using mysql you can use if(mysql_affected_rows()){ ech

Re: [PHP] changing the brightness of an images

2003-03-12 Thread Tom Rogers
efromjpeg($filename); imagegammacorrect($im,1,2.2); Header("Content-type: image/jpeg"); ImageJpeg($im,'',50); -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] time() question

2003-03-13 Thread Tom Ray
Is there an easy way to display the epoch time given by time() in a human readable format? Basically, if I do $time = time(); and the insert that data into my mysql database and then pull that information out again how do I make it look like 2003-03-13 or a variant of that? TIA -- PHP General M

Re: [PHP] time() question

2003-03-13 Thread Tom Woody
On Thu, 13 Mar 2003 12:07:33 -0500 "Tom Ray" <[EMAIL PROTECTED]> wrote: > Is there an easy way to display the epoch time given by time() in a > human readable format? Basically, if I do $time = time(); and the > insert that data into my mysql database and then pull tha

Re: [PHP] cropping an image script

2003-03-13 Thread Tom Rogers
gecreatefromjpeg($filename); $dim = imagecreatetruecolor($cropW, $cropH); for ( $i=$cropY; $i<($cropY+$cropH); $i++ ) { for ( $j=$cropX; $j<($cropX+$cropW); $j++ ) { $pixel = imagecolorat($im, $x, $y); imagesetpixel($dim, $j-$cropX, $i-$cropY, $pixel); } } As it is true colour no need to use indexes. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] cropping an image script

2003-03-13 Thread Tom Rogers
ed space of the source image AR>> imagedestroy($dim); AR>> } AR>> // example AR>> im_crop(0,0,75,75,'1_data.jpeg','2_data.jpeg','jpeg'); ?>>> TR> With jpegs you need to use $im2 = imagecreatetruecolor($x,$y) TR> and just write the pix

Re: [PHP] What do I do wrong?

2003-03-13 Thread Tom Woody
... first off how are we supposed to help you with the problem if we don't know what is on line 202. Are we supposed to be clairvoyent, or should we divine the answer from tea leaves. Without the code, or at least the code around line 202 you are asking the impossible yes this would make

Re[4]: [PHP] cropping an image script

2003-03-13 Thread Tom Rogers
($dim); AR> } AR> // example AR> im_crop(0,0,75,75,'1_data.jpeg','2_data.jpeg','jpeg'); ?>> AR> AR> Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in AR> c:\apache\htdocs\testphoto.php on line 6 AR> --- AR>

Re: [PHP] Script Nane in CGI mode

2003-03-13 Thread Tom Rogers
gv[0] will give you the command used to invoke the script (including the path) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Intermittent CGI Errors

2003-03-13 Thread Tom Rogers
of my script is a header() redirect so it must be returning a JG> header right? JG> Joshua Groboski You may need to add an empty line after the header. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] If 1 IF fails, do the rest anyway...

2003-03-13 Thread Tom Rogers
it carry on with test2 and 3 anyway, regardless of how test1 came out? if(!(test1 || test2 || test3)){ echo "Failed"; }else{ echo "Success"; } -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] DomXML and Zend Engine 2

2003-03-13 Thread Tom Rogers
Hi, Friday, March 14, 2003, 10:36:50 AM, you wrote: ED> Hi, ED> I'm testing the last php5/ze2 snapshot for a future PHP application. I've ED> a two line script[1] with domxml wich fail with ZE2 but succeed with ZE1. ED> I know that ZE2 is in pre-alpha cycle (and domxml on a experimental state) E

Re[2]: [PHP] DomXML and Zend Engine 2

2003-03-13 Thread Tom Rogers
Hi, Friday, March 14, 2003, 11:54:00 AM, you wrote: ED> On Fri, 14 Mar 2003 11:37:05 +1000, Tom Rogers wrote: >> I think that should be > 1,0 ED> You're right, sorry ED> I've made an error writing this post ("." on the numeric pad output ","

Re[2]: [PHP] php file writting ?

2003-03-14 Thread Tom Rogers
le and it is fine (not >> >zero). >> > >> >I think there is a timing issue with php on file read/writes. I tried >> >sleep(1), but all that did was slow the script down (didn't help). >> > >> un-educated guess: >> did you try fcl

Re: [PHP] inserting parameters into URLs dynamically

2003-03-14 Thread Tom Rogers
ssions across our servers as well. MR> MR> Maureen Roihl MR> Senior Web Developer MR> Smarter Living MR> [EMAIL PROTECTED] You could use something like this Then the log formatter line needs \"%{PHP_TITLE}n\" adding -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to convert an array to variables?

2003-03-15 Thread Tom Rogers
values. CK> for example: CK> $dra_1 = 5; CK> $dra_2 = 8; CK> $dra_3 = 9; CK> How would I do this? A variable that has a variable name based on a CK> counter in the loop? Not sure the syntax for that. CK> Thanks CK> Charles something like this... while(list($key,$val)

Re[2]: [PHP] How to convert an array to variables?

2003-03-15 Thread Tom Rogers
Hi, Sunday, March 16, 2003, 8:20:49 AM, you wrote: CK> Tom, CK> This seems like what I need exactly, but I am having a bit of trouble CK> getting it to work. CK> Here is how I have worked around this, but I know there is a 'real' way CK> to do this. Any thoughts? I

Re: [PHP] PHP newbie ... function with several returns ?

2003-03-15 Thread Tom Rogers
(&$variable1, &$variable2){ $variable1 = "Something different from it's original value" $variable2 = "I'm changed also!!" } (notice the '&' symbols) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] DOMXML usage

2003-07-03 Thread Tom Rogers
1.0"); $table = $doc->create_element("table"); $row = $doc->create_element("row"); $col = $doc->create_element("td"); $root = $dom->document_element(); $t1 = $root->append_child($table); $r1 = $t1->append_child($row); $c1 = $r1->append

Re: [PHP] include/require inside of function

2003-07-04 Thread Tom Rogers
7;); $t = new kwikTemplateClass('./'); $variables = array(); echo $t->processFile('layout.htm',$variables); ?> This loads the class I need and it is automatically global.. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] track_vars in apache httpd.conf

2003-07-04 Thread Tom Rogers
T> Thanks try php_flag instead of php_value (flags are on or off, values usually contain things like numbers or paths) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Snarl, hiss, growl (frustration)

2003-07-04 Thread Tom Rogers
; KB> } print $current; ?>> KB> -- KB> Kyle maybe you need to end the if() statement before incrementing the counter. $ip = getenv('REMOTE_ADDR'); $ipCheck = file('ips.txt'); if (!in_array($ip, $ipCheck)) { $ipAdd = fopen('ips.txt', 'a

Re: [PHP] Question

2003-07-06 Thread Tom Rogers
Hi, Sunday, July 6, 2003, 3:15:56 AM, you wrote: TR> When is the relase date for php 5? at this point I think the only digits filled in are 200x-xx-xx -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] echo not working!!!

2003-07-06 Thread Tom Rogers
g AND the closing double quote, paren, semicolon, question mark, and >> on a new line. What the hell is going on here? a> PHP is running. ");?>> make sure you have a line like AddType application/x-httpd-php .php in httpd.conf and that you restarted apache -- regards

Re: [PHP] print vs heredoc

2003-07-07 Thread Tom Rogers
st sends the stuff :) (Would be good for template systems where you know there is no php hidden in there.) ... might gain a couple of micro seconds -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    1   2   3   4   5   6   7   8   9   10   >