Re: [PHP] Unable to return object references from functions

2001-12-15 Thread Tom Rogers
Hi Is this doing what you want, seems you have to use an array to create the ref (just getting a handle on objects :) ? class test_class { var $dummy=nothing; }; Function assigning($returned,$copy,$object) { global $success; $object-dummy=original;

Re: [PHP] Unable to return object references from functions

2001-12-15 Thread Tom Rogers
); ? At 02:15 PM 16/12/01, Tom Rogers wrote: Hi Is this doing what you want, seems you have to use an array to create the ref (just getting a handle on objects :) ? class test_class { var $dummy=nothing; }; Function assigning($returned,$copy,$object) { global $success

Re: [PHP] using variables

2001-12-16 Thread Tom Rogers
Hi you need: img src=?echo $ulo? or img src=?=$ulo? Tom At 05:39 PM 16/12/01, David Killingsworth wrote: I'm trying to determing why this won't work. I wish to assign graphics to variables then call them within the HTML on my .php pages. --test.php-- ? $ulo = /images/ulo.gif; ?

Re: [PHP] Unable to return object references from functions

2001-12-16 Thread Tom Rogers
Hi What is the scope of the array that holds the object ? Maybe a bit of code to show what you are after :) Tom At 03:37 PM 17/12/01, Manuel Lemos wrote: Hello, Tom Rogers wrote: Hi again Got a bit sidetracked ... here is your original code :) Thanks, I managed to make it work for me

Re: [PHP] $PHPSESSID on PHP 4.1.0

2001-12-17 Thread Tom Rogers
Hi One way is ?echo session_id()? or if cookies aren't used try ?=SID? $PHPSESSID seems to only get set if it comes back as a cookie Tom At 04:39 AM 18/12/01, Julio Nobrega Trabalhando wrote: Hi All, I have a few scripts using $PHPSESSID to softly disable cookies requirement on some

Re: [PHP] Slash problem

2001-12-19 Thread Tom Rogers
Hi set this in your php.ini file: magic_quotes_gpc = Off You'll have to use addslashes before you can store these variables with an ' in a database after turning it off. Tom At 10:39 AM 20/12/01, Evansville Scene wrote: I'm fairly new @ PHP, so forgive me if the answer is trivial ... In many

Re: [PHP] Checking the season

2002-01-05 Thread Tom Rogers
Hi This should work: ? $year = date(Y); $spring = mktime (0,0,0,3,21,$year); $summer = mktime (0,0,0,6,21,$year); $autumn = mktime (0,0,0,9,21,$year); $winter = mktime (0,0,0,12,21,$year); $now = mktime(); if($now $spring || $now = $winter): echo Winter; elseif($now = $autumn):

Re: [PHP] Checking mail origin?

2002-01-08 Thread Tom Rogers
Hi You could get all your users to add an encrypted signature to their emails and check that on recieipt. Tom At 11:35 AM 9/01/02, Bogdan Stancescu wrote: Hi all! I'm working on a free software package due to be launched on freshmeat some time soon (next month most probably). The program is a

Re: [PHP] ok, I ask again.. how to encrypt to be able to match database info?

2002-01-21 Thread Tom Rogers
Hi Encrypt the password from the form using the same salt value as the one used for the database then compare them... Tom At 05:36 22/01/02, Hawk wrote: I've asked this several times but it doesn't seem like anyone understands my problem, the passwords are encrypted in the database, but I

Re: [PHP] PHP and XHTML

2002-01-26 Thread Tom Rogers
Hi use single quotes and it is simpler echo '?xml version=1.0?'; Tom At 09:40 27/01/02, Frans Englich wrote: This works just perfectly: ?echo(?xml version=\1.0\?); ? regards, Cyth --- -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Jeff Sheltren

Re: [PHP] The ASP application object in PHP?

2002-02-15 Thread Tom Rogers
Hi It uses cookies and only cookies and it seems that sessions are started on every access but can be turned off on individual pages if required. Tom At 07:44 AM 2/16/02, Peter J. Schoenster wrote: On 15 Feb 2002, at 14:43, Bendik Simonsen wrote: I have however, noticed one feature that

Re: [PHP] The ASP application object in PHP?

2002-02-15 Thread Tom Rogers
Hi Yes you are right ... i had my head tied up with sessions :) Tom At 02:12 PM 2/16/02, michael kimsal wrote: Tom Rogers wrote: Hi It uses cookies and only cookies and it seems that sessions are started on every access but can be turned off on individual pages if required. Tom Sorry Tom

Re: [PHP] Apache+PHP+DSO: maybe trivial (?): apxs doesn't create libphp4.so under AIX 4.3.3

2002-02-19 Thread Tom Rogers
Hi Make sure you include at least one internal apache module as shared (i used mod_rewrite) otherwise apache doesn't include enough linker information in apxs. you will probably have to do make distclean and start again with configure Tom At 09:18 PM 2/19/02, Erwin S R U B A R wrote: Hi

Re: [PHP] How to generate an broun white JPG with GD

2002-03-03 Thread Tom Rogers
Hi Here is a small php script to create sepia images from a jpeg, put it in the same place as your images and call it sepiaphp Uselike this: img src=/images/sepiaphp/filenamejpg ? $filename = ereg_replace(/,,$PATH_INFO); if($filename != ): $im

Re: [PHP] How to generate an broun white JPG with GD

2002-03-03 Thread Tom Rogers
Hi Here is a better script to create sepia images from a jpeg, put it in the same place as your images and call it sepiaphp Uselike this: img src=/images/sepiaphp/filenamejpg ? $filename = ereg_replace(/,,$PATH_INFO); if($filename != ): $start_red = 2;

Re: [PHP] form variables

2002-03-04 Thread Tom Rogers
hi Use form action=quotestest.php method=get This will work as long as the form is not too big Tom At 11:14 AM 5/03/2002, Craig Westerman wrote: form action=quotestest.php method=post input type=text name=quote maxlength=10 size=10 input type=submit name=submitquote VALUE=Get Quote

Re: [PHP] Does function ImageTTFText work with php 4.1.2 and freetype 2.0.5?

2002-03-04 Thread Tom Rogers
Hi The following worked for me with gd gd-2.0.1 php-4.1.2 freetype-2.0.5 ?php Header(Content-type: image/jpeg); $im = @imagecreate (400, 30); $black = ImageColorAllocate ($im, 0, 0, 0); $white = ImageColorAllocate ($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 10, 20, $white,

Re: [PHP] serialize

2002-03-05 Thread Tom Rogers
hHi $data = serialize($felnummer); That should do it.. Tom At 12:58 AM 6/03/2002, Axel Nilsson wrote: Hi All! I use this code to create a number of fields in a form depending on what input number I use. My problem occurs when i am going to save it. Right now only the value of the last field

Re: [PHP] preload dynamic image problems

2002-03-06 Thread Tom Rogers
Hi I use the following construct to avoid the ? in the url which stops the image being cached... img src=http://www.domain.com.au/buttons/image.gif-System-3-ff-9-L/test; then have a rewrite rule that redirects anything at /buttons/ to index.php This way I can send file name of the

Re: [PHP] PHPBuilder.com Has an Easy File Upload Article, does any1 know

2002-03-06 Thread Tom Rogers
Hi Here is a script that will send any file for download, even .html files. I called it send.php ? $headertxt = Content-Disposition: attachment; filename=\.$filename.\; header(Content-Type: application/force-download);header($headertxt); $fd = fopen($filename,r); fpassthru($fd); ? usage is

Re: [PHP] image creation to file

2002-03-06 Thread Tom Rogers
Hi use ImagePNG($im,test.png) Tom At 12:17 PM 7/03/2002, Craig Westerman wrote: The following creates a red rectangle png image ? Header(Content-Type: image/png); $im = ImageCreate(500, 75); $red = ImageColorAllocate($im, 255, 0, 0); ImageFill($im, 100, 100, $red); ImagePNG($im); ? This

RE: [PHP] image creation to file

2002-03-06 Thread Tom Rogers
Hi You have to make sure that the user that your web server is running as has permission to write where you want to create the file. Tom At 12:56 PM 7/03/2002, Craig Westerman wrote: Hi Tom, At first it didn't work. I had to create a blank png image in Photoshop and uploaded it. I then

RE: [PHP] Re: Can't display PNG images

2002-03-12 Thread Tom Rogers
Hi You will probably have to recompile gd as well. Tom At 11:33 AM 13/03/2002, Narvaez, Teresa wrote: Thank you so much for your responses. Thanks for any response! I now the GD libraries with PNG support. However, the image is still broken. I looked at the apache server error log and this

Re: [PHP] Problem with sessions.

2002-03-16 Thread Tom Rogers
Hi When you create the new session give it a different name. Tom At 01:49 AM 17/03/2002, Carlos Costa Portela wrote: Hello all: I am playing with sessions and I have a problem with the session_destroy() function. If I do a session_register() after calling it, the session

Re: [PHP] Problem with sessions.

2002-03-17 Thread Tom Rogers
hi If you put: ? session_start(); as the first line on your page it will behave as you want I think. Tom At 08:41 PM 17/03/2002, Carlos Costa Portela wrote: On Sat, 16 Mar 2002, Edward van Bilderbeek - Bean IT wrote: maybe you better use: session_unregister(counter); I've

Re: [PHP] Problem with sessions.

2002-03-17 Thread Tom Rogers
Hi As you had not started a session at that point there was none to destroy or unregister :) Tom At 11:53 PM 17/03/2002, Carlos Costa Portela wrote: On Sun, 17 Mar 2002, Tom Rogers wrote: hi If you put: ? session_start(); as the first line on your page it will behave as you want

Re: [PHP] Re: [PHP-DB] How to add 2 years to todays date ?

2002-03-18 Thread Tom Rogers
Hi A variation echo date(d/m/Y,strtotime(+2 years)) Tom At 06:29 PM 18/03/2002, Martin Schichl wrote: At 10:19 18.03.02 +0200, Andrey Hristov [EMAIL PROTECTED] wrote: $your_timestamp+=gmmktime(0,0,0,1,1,1972); Try: $your_timestamp =

Re: [PHP] why doesnt this work???

2002-03-20 Thread Tom Rogers
Hi Try this: $query = select * from medlemmer where bruker = '$bruker' and passord ='$passord'; $result = mssql_query( $query ); while($line = mssql_fetch_row($result)): if( $line[bruker] == $bruker $line[password] == $passord) echo hei $bruker.; else echo FEIL; endwhile; Tom

Re: [PHP] problem with multiple cookies, PHP, and proxypass under apache

2002-03-24 Thread Tom Rogers
Hi This may solve your problem http://archive.covalent.net/apache-bugdb/2000/05/0082.xml Tom At 12:09 PM 25/03/2002, Vincent Cunniffe wrote: Hi, I have an apache server which is configured to pass some requests through to a secondary, chrooted apache server. For each virtual domain that

Re: [PHP] problem with multiple cookies, PHP, and proxypass under apache

2002-03-24 Thread Tom Rogers
Hi Found this follow up too http://archive.covalent.net/apache-bugdb/2000/05/0084.xml Tom At 12:09 PM 25/03/2002, Vincent Cunniffe wrote: Hi, I have an apache server which is configured to pass some requests through to a secondary, chrooted apache server. For each virtual domain that passes

Re: [PHP] while loop: detect next loop?

2002-03-28 Thread Tom Rogers
Hi add the newline and white space first like this $data_printed = ; while ($row = mysql_fetch_assoc($result)) { if($data_printed != ){ $data_printed .= \n; } $data_printed = file id=\ . $row['file_id'] . \ . $row['file_name'] . /file; } That will

Re: [PHP] session

2002-04-02 Thread Tom Rogers
Hi You need session_start() on the retief.php page Tom At 05:06 AM 4/04/2002, R. Lindeman wrote: okay i've posted something before here are my scripts either you tell me what i do wrong or i'll go beserk you can check the outcome of the code on the following adress

Re: [PHP] Managing time zones

2002-04-03 Thread Tom Rogers
Hi One method is to use javascript to get the clients date/time then create a diff between that and your time and use it to change the display times. Here is a demo of getting the remote date and time pre html head titleUntitled/title ?if(!isset($Submit)):? script

Re: [PHP] Managing time zones

2002-04-03 Thread Tom Rogers
Hi This time without the html ... sorry :) One method is to use javascript to get the clients date/time then create a diff between that and your time and use it to change the display times. Here is a demo of getting the remote date and time head titleUntitled/title

[PHP] help condensing regular expressions

2002-04-05 Thread Tom Rogers
Hi I am trying to calculate how far into a directory structure I am so that I can include images and include files without having to hard code them. I need to turn $PHP_SELF which could be /admin/emails/index.php into ../../ which I can then use to get to any directory from root. like IMG

Re: [PHP] Re: help condensing regular expressions

2002-04-05 Thread Tom Rogers
um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Tom Rogers [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi I am trying to calculate how far into a directory structure I am so that I can include images and inclu

RE: [PHP] Re: help condensing regular expressions

2002-04-05 Thread Tom Rogers
this then include($DOCUMENT_ROOT./include/mysql_connect.inc); Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: Tom Rogers [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 2:33 PM To: [EMAIL

Re: [PHP] Re: help condensing regular expressions

2002-04-05 Thread Tom Rogers
that are sym linked across virtual domains such as admin pages. Thanks again Tom At 03:49 PM 6/04/2002, Chris Adams wrote: In article [EMAIL PROTECTED], Tom Rogers wrote: I am trying to calculate how far into a directory structure I am so that I can include images and include files without

Re: [PHP] Re: help condensing regular expressions

2002-04-06 Thread Tom Rogers
Hi I have never used .htaccess but I'll read up on it, I am the ISP so it won't be a problem :) Tom At 06:12 PM 6/04/2002, Chris Adams wrote: In article [EMAIL PROTECTED], Tom Rogers wrote: Thats what I was after :) Glad I could help. At the top of each page I now do $reltoroot

Re: [PHP] Re: Test for whole number.

2002-04-07 Thread Tom Rogers
Hi Not sure if this is the best way to do it: function isOneBitSet($n) { return !ereg(\.,strval(log($n)/log(2))); } Tom At 09:16 AM 8/04/2002, Charlie Killian wrote: That post was incomprehensible. Here it is revised: I'd like to condense the function below into one line. function

Re: [PHP] getting the 'client' date and time for use in PHP scripts ??

2002-04-08 Thread Tom Rogers
Hi Here is the answer I gave a few days ago to the same sort of question: head titleUntitled/title ?if(!isset($Submit)):? script language=JavaScript !-- begin function gogo() { var dt = new Date(); var mm,dd,yy,h,m,s; mm = dt.getMonth()+1; dd = dt.getDate(); yy = dt.getYear(); h =

Re: [PHP] includes

2002-04-09 Thread Tom Rogers
Hi You can do something like this: ini_set (include_path,ini_get(include_path).:second_include_path); Tom At 07:05 AM 10/04/2002, Robert Abbate wrote: I have a directory with php files that I incorporate into my website as libraries via a php_include() call, I would like the path to include my

Re: [PHP] includes

2002-04-09 Thread Tom Rogers
Hi That goes into each php page. It gets the standard phpinclude directory then appends your local one using : as the seperator. It does not affect any other php pages only the one it is used in. Tom Where do you place that function call? In the script you're running, or in the php.ini file?

Re: [PHP] findin colors in gif files

2002-06-04 Thread Tom Rogers
hi you will need to find the hex values for each individual number which i think should be (without the hash) 76763636 Tom At 05:06 PM 5/06/2002, johannes reichardt wrote: hi everybody, i am new to this list php and i have a big question that i would love to be answered ;) i have a small

Re: [PHP] findin colors in gif files

2002-06-05 Thread Tom Rogers
HI Just a thought, if your on a windows box you will need to ad a 'b' to the fiopen function like fopen($file, br) Tom At 09:43 PM 5/06/2002, freestylez wrote: it almost works :) unfortunatly the gif file seems to be corrupted at some point, but anyhow - i am not good in these hex and bin

Re: [PHP] findin colors in gif files

2002-06-05 Thread Tom Rogers
hi what gif is getting corrupted?, it works ok with the one you gave. To see what all those flag things are have a look at the gif spec at http://www.goice.co.jp/member/mo/formats/gif.html unpack puts the binary string into an array, flag gives some info as to the colour index table Tom At

Re: [PHP] Bug in ob_end_flush/xslt_process... Confirm?

2002-06-05 Thread Tom Rogers
Hi It seems that it loses path information, it will work if you use an absolute path like this: function my_output_handler($string) { $arguments = array('/_xml' = $string,'/_xsl'=$xsl); $xsltproc = xslt_create(); $html = xslt_process($xsltproc, 'arg:/_xml',

Re: [PHP] Compiling PHP as static mod

2002-06-05 Thread Tom Rogers
Hi In your php config give it the path to the apache source files not the install directory. Tom At 11:55 AM 6/06/2002, Ray Hunter wrote: When I try to compile php as a static module in php I get errors that the mod_php4.c cannot find the header file. Here is my php configuration:

Re: [PHP] Sessions on clustered machines

2002-06-06 Thread Tom Rogers
Hi Have a look at http://www.mohawksoft.com/phoenix/msession.html I just started playing with it and seems to be ok, except when I try my own session handler it chucks a core dump now, but if it is as good as they reckon I wont need my own handler :) Tom At 03:17 PM 6/06/2002, Cameron Just

Re: [PHP] fputs/fgets working irregularly

2002-06-09 Thread Tom Rogers
Hi Why not just do it in one call? $fp = fopen(data/news.txt,w); $np = fputs($fp,$pr.$ag); fclose($fp); Tom At 04:17 AM 10/06/2002, Kris wrote: Hi all, I'm having some trouble getting my basic news script to work. Here is the code: $fp = fopen(data/prev.txt,r); while (!feof ($fp))

Re: [PHP] Emulating a class destructor

2002-06-11 Thread Tom Rogers
Hi One way is to create an external reference to your class and use that in the cleanup function. To make the cleanup function visible it has to be declared inside the constructor (which makes it invisible to the rest of the class:) This is how I have done it: ? $ref = array(); class cRoute{

Re: [PHP] Emulating a class destructor

2002-06-11 Thread Tom Rogers
At 01:18 PM 12/06/2002, Lars Torben Wilson wrote: On Tue, 2002-06-11 at 20:12, Tom Rogers wrote: Hi One way is to create an external reference to your class and use that in the cleanup function. To make the cleanup function visible it has to be declared inside the constructor (which makes

Re: [PHP] Emulating a class destructor

2002-06-11 Thread Tom Rogers
); } } $c1 = new cRoute(First:); $c2 = new cRoute(Second:); echo exiting now br; ? Tom At 01:12 PM 12/06/2002, Tom Rogers wrote: Hi One way is to create an external reference to your class and use that in the cleanup function. To make the cleanup function visible it has to be declared inside

Re: [PHP] Emulating a class destructor

2002-06-11 Thread Tom Rogers
Hi It was the register_shutdown_function(array($this, 'cleanup')); syntax that had me stummped and looking for magic :) Tom snip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] beginner in PHP

2002-06-12 Thread Tom Rogers
Hi itemcd and unitprice should be in quotes I think if they are keys in an array. $catalog[itemcd] $catalog[unitprice] Tom At 10:56 PM 12/06/2002 -0400, Phillip Perry wrote: Can someone tell me why this doesn't work? The $mycart array is fine and the $catalog array is also fine but nothing

RE: [PHP] beginner in PHP

2002-06-12 Thread Tom Rogers
Perry wrote: Thanks, but that didn't work either -Original Message- From: Tom Rogers [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 11:32 PM To: [EMAIL PROTECTED]; Php Subject: Re: [PHP] beginner in PHP Hi itemcd and unitprice should be in quotes I think if they are keys

Re: [PHP] Printer friendly version script

2002-06-13 Thread Tom Rogers
Hi One method for later browsers is to use a header tag that causes a new page to be loaded for printing. This is done transperantly so the users don't need to click anything other than the normal print button. It goes like this : link rel=alternate media=print href=?echo

Re: [PHP] Printer friendly version script

2002-06-13 Thread Tom Rogers
Hi Should have made that a bit clearer :) head link rel=alternate media=print href=?echo $_SERVER['PHP_SELF']??print=yes /head One method for later browsers is to use a header tag that causes a new page to be loaded for printing. This is done transperantly so the users don't need to click

Re: [PHP] Determine week

2002-06-16 Thread Tom Rogers
Hi Here is a messy solution, but I think it does what you want using strtotime() (well worth looking up in the manual :) ? $weeks = 30; $year = date(Y); $monday1 = strtotime(1 monday,strtotime(1/1/.$year)); //get unix time of first monday of this year $monday = intval(date(d,$monday1));

Re: [PHP] some one PLEASE help me!

2002-06-21 Thread Tom Rogers
At 01:09 PM 21/06/2002 -0500, Rick Kukiela wrote: Ok, I have never, in my entire life, have such a persistant little freakin problem with a programming language... It started out while i was running 4.1.2 where sessions would not write to the disk properly. I researched and found a bug. I couldnt

Re: [PHP] some one PLEASE help me!

2002-06-21 Thread Tom Rogers
Ignore me ..I just got up :) Tom At 01:09 PM 22/06/2002 +1000, Tom Rogers wrote: At 01:09 PM 21/06/2002 -0500, Rick Kukiela wrote: Ok, I have never, in my entire life, have such a persistant little freakin problem with a programming language... It started out while i was running 4.1.2 where

Re: [PHP] Fast code to partially flatten an array based on several keys?

2002-06-27 Thread Tom Rogers
Hi I would do it this way (untested) while ($row = mysql_fetch_assoc($result)) { $vehicles[$row['dealer_id][$row['vehicle_id]['views'][] = $row['page_views']; } should end up something like this ( [645] = Array ( [35073] = Array ([

Re: [PHP] Fast code to partially flatten an array based on several keys?

2002-06-27 Thread Tom Rogers
missed a couple of quotes and braces there :) while ($row = mysql_fetch_assoc($result)) { $vehicles[$row['dealer_id']][$row['vehicle_id']]['views'][] = $row['page_views']; } At 02:03 PM 28/06/2002 +1000, Tom Rogers wrote: Hi I would do it this way (untested) while ($row = mysql_fetch_assoc

Re: [PHP] Two cases going to same case?

2002-06-30 Thread Tom Rogers
Hi One way to achieve the same effect: fallthru = 0; switch($whatever){ case 1: do something1; $fallthru = 1; case 2: if(!$fallthrough){ do something2; } case 3

Re: [PHP] emulating enable_trans_sid

2002-06-30 Thread Tom Rogers
Hi enable_trans_sid does exactly what you are trying to re create, if no cookies are available it modifies all the urls automatically. and transparently Tom At 12:48 PM 1/07/2002 +1000, Justin French wrote: Hi, As discussed a few months back, I'm interested attempting to recreate PHP's

Re: [PHP] emulating enable_trans_sid

2002-06-30 Thread Tom Rogers
at emulating enable_trans_sid. Regards, Justin French on 01/07/02 1:07 PM, Tom Rogers ([EMAIL PROTECTED]) wrote: Hi enable_trans_sid does exactly what you are trying to re create, if no cookies are available it modifies all the urls automatically. and transparently Tom At 12:48 PM 1

Re: [PHP] emulating enable_trans_sid

2002-07-01 Thread Tom Rogers
in the html. Your quite welcome to the files if it'll help. Tom At 04:03 PM 1/07/2002 +1000, Justin French wrote: on 01/07/02 3:36 PM, Tom Rogers ([EMAIL PROTECTED]) wrote: Ok probably the easiest is just to add ?if(!empty(SID) echo 'sid='.SID? to the end of each url, if cookies are supported SID

Re: [PHP] ini_set() broken?

2002-07-07 Thread Tom Rogers
Hi If you check with phpinfo() you will see that it is getting set to 1 or 0 but by the time your script is run it is too late for it to have any effect. Also ini_get('registar_globals') will not return the current state. I have no idea why, it looks like one of those undocumented safety

Re: [PHP] ini_set() broken?

2002-07-07 Thread Tom Rogers
Hi Even with the correct spelling it returns null (php-4.2.1) $x = ini_get('register_globals'); echo current settings = .$x.br; Tom At 12:43 PM 8/07/2002 +0800, Jason Wong wrote: Tom Rogers said: Hi If you check with phpinfo() you will see that it is getting set to 1 or 0

Re: [PHP] transparent clusters + sessions

2002-07-16 Thread Tom Rogers
Hi At 02:05 AM 17/07/2002 +0200, you wrote: Lo all, If I have say 20 web servers in a cluster behind something like a Cisco LocalDirector, will session data remain constant over the 20 web servers if they use a shared NFS or similar mount to save session data on? Have a look at msession at

Re: [PHP] imagecolortransparent()

2002-07-22 Thread Tom Rogers
Hello Nick, Monday, July 22, 2002, 8:47:39 PM, you wrote: N i get php to allocate a colour then make it transparent using N imagecolortransparent() N instead of turning it transparent it becomes black. N Is it something i'm doing wrong? can anyone help me? N thanx in advance Post a bit of

Re: [PHP] Newbie's question about \n

2002-07-22 Thread Tom Rogers
Hello KK, Monday, July 22, 2002, 9:00:47 PM, you wrote: KL Dear ALL, KL It seems that i have a very silly problem. KL I can't get the new line escape character to work. KL the following is my SIMPLE script and corresponding output. KL PHP script: KL !DOCTYPE HTML PUBLIC KL-//W3C//DTD

Re[2]: [PHP] imagecolortransparent()

2002-07-22 Thread Tom Rogers
Hi, Tuesday, July 23, 2002, 5:16:43 AM, you wrote: N Tom Rogers [EMAIL PROTECTED] wrote in message N [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello Nick, Monday, July 22, 2002, 8:47:39 PM, you wrote: N i get php to allocate a colour then make it transparent

Re[2]: [PHP] imagecolortransparent()

2002-07-22 Thread Tom Rogers
Hi, Tuesday, July 23, 2002, 5:16:43 AM, you wrote: N Tom Rogers [EMAIL PROTECTED] wrote in message N [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello Nick, Monday, July 22, 2002, 8:47:39 PM, you wrote: N i get php to allocate a colour then make it transparent

Re: [PHP] When to destroy sessions that iterate

2002-07-24 Thread Tom Rogers
Hi, Thursday, July 25, 2002, 12:20:47 AM, you wrote: P Prolly a silly question, but I have a session process that never really P ends as it is supposed to allow the user to carry on submitting etc. P So I don't know where and when to end the session, and if it is really P nescessary to end a

Re: [PHP] Object problem

2002-07-24 Thread Tom Rogers
Hi, Wednesday, July 24, 2002, 5:04:06 AM, you wrote: MD I just wrote this message in the wrong list so i'll be short... MD I have two classes: MD - mysql_connection MD - data_collection MD data_collection REQUIRES a mysql_connection object to work. So i decided to MD pass this object in the

Re: [PHP] Running ./configure multiple times

2002-07-24 Thread Tom Rogers
Hi, Thursday, July 25, 2002, 1:41:25 AM, you wrote: CG Well my RedHat system got hosed, so I reinstalled everything. I'm back to CG installing PHP now, and I'm wondering if it's safe for me to run ./configure CG multiple times. Here's the situation: CG I want to compile with gd support, and

Re: [PHP] Hitting return in a textarea box...

2002-07-24 Thread Tom Rogers
Hi, Thursday, July 25, 2002, 4:26:15 AM, you wrote: JL I'm putting together a message board, and I'm having JL problems with hitting the return(enter) key within my JL textarea. JL I've looked around for a solution, I tried JL wrap=hard, wrap=soft and wrap=vitual and none of JL them worked

Re: [PHP] Numbers with leading zero...

2002-07-24 Thread Tom Rogers
Hi, Thursday, July 25, 2002, 10:44:00 AM, you wrote: v Hi. v I've got this script that needs to take for examle 02 and increase that to v 03. v but when i run the script $Num++; it changes 03 to 3; v is there not a function that adds leading zeros onto a string ? have a look at the

Re: [PHP] HTTP_POST_FILES undefined - What happen?

2002-07-24 Thread Tom Rogers
Hi, Thursday, July 25, 2002, 10:39:08 AM, you wrote: R Hi all, R Thought I turned on register_globals on in the php.ini, my server didn't know the HTTP_POST_FILES. R echo $HTTP_POST_FILES[$file]['type'] ; R echo $HTTP_POST_FILES[$file]['name'] ; R echo $HTTP_POST_FILES[$file]['size'] ; R

Re[2]: [PHP] HTTP_POST_FILES undefined - What happen?

2002-07-24 Thread Tom Rogers
Hi, Thursday, July 25, 2002, 11:15:33 AM, you wrote: TR Hi, TR Thursday, July 25, 2002, 10:39:08 AM, you wrote: R Hi all, R Thought I turned on register_globals on in the php.ini, my server didn't know the HTTP_POST_FILES. R echo $HTTP_POST_FILES[$file]['type'] ; R echo

Re: [PHP] calculating US holidays

2002-04-15 Thread Tom Rogers
Hi This is one way: echo date(d/m/Y,strtotime(third sunday,strtotime(2/1/2002))); Tom At 05:17 AM 16/04/2002, Tom Beidler wrote: I need to calculate the date to see if it's a holiday, i.e. is today presidents day, which happens to be the third monday of february. Can someone point me to some

Re: [PHP] calculating US holidays

2002-04-15 Thread Tom Rogers
Hi Perhaps that should have been: echo date(d/m/Y,strtotime(third monday,strtotime(2/1/2002))); :-) Tom At 05:17 AM 16/04/2002, Tom Beidler wrote: I need to calculate the date to see if it's a holiday, i.e. is today presidents day, which happens to be the third monday of february. Can someone

Re: [PHP] .inc over .php

2002-04-19 Thread Tom Rogers
Hi By using .inc you can be sure they will not get executed out of context which can be dangerous, but also you should add this to apache config to stop them being delivered as plain text which can also be dangerous. I don't know about IIS but I guess they have something similar. FilesMatch

Re: [PHP] Simple IF question

2002-04-20 Thread Tom Rogers
Hi You need to use the double = in the if condition like If ((!$salutation==Please select) Print (Sorry, please select a value in the salutation box); Tom At 08:17 PM 20/04/2002, Denis L. Menezes wrote: Hello friends, I have a registration form with a salutation field in a listbox, in

Re: [PHP] Simple IF question

2002-04-20 Thread Tom Rogers
Hi again You can also write it as: If (($salutation != Please select) Print (Sorry, please select a value in the salutation box); Tom At 08:29 PM 20/04/2002, Tom Rogers wrote: Hi You need to use the double = in the if condition like If ((!$salutation==Please select) Print (Sorry

Re: [PHP] Better standards in PHP-coding

2002-04-21 Thread Tom Rogers
Hi I like the following form, not sure how much time gets wasted in parsing but it's easy for me to follow :) while(something): if(something else): yada; else: forget it; endif; endwhile; Tom At 11:51 AM 21/04/2002, Frank wrote:

Re: [PHP] STILL having Troubles getting GD support with jpegs, possiblity: PHP with GD jpeg support prebuilt?

2002-04-30 Thread Tom Rogers
hi Looks like you need -ljpeg ... your missing the l somewhere Tom At 06:35 PM 30/04/2002, Peter Revill wrote: = CC all Replies to [EMAIL PROTECTED] = Ok, im STILL having problems, im close to tears here that this is not working, its

Re: [PHP] Upgrading from libmcrypt 2.2.x to 2.4.x

2002-05-03 Thread Tom Rogers
Hi Thanks for that info, was just what I needed :) You can also create $iv with this: $iv = pack(a.mcrypt_enc_get_iv_size($td),$iv); I use base64_encode() and base64_decode() to store the result and send via the web. Tom At 01:02 PM 3/05/2002, Cédric Veilleux wrote: Hi, I had an

Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Tom Rogers
Hi You need exec(tail -n 100 access_log,$result); $result will be an array with the output of the command. see http://www.php.net/manual/en/ref.exec.php for more info Tom At 01:51 PM 4/05/2002, Liam MacKenzie wrote: Hi guys, just a simple question, how would I go about displaying the last 100

Re: [PHP] Tailing a log file {!?}

2002-05-05 Thread Tom Rogers
Hi The following works for me, give it a try with the correct path. ? exec(tail -n 50 /usr/local/apache/logs/access_log,$result); echo count($result). results returned. br; if(count($result) 0){ foreach($result as $line){ echo $line.br; } } ? Tom At 06:25

Re: [PHP] Uploading JPEG's - Security Issues?

2002-05-15 Thread Tom Rogers
Hi What I do is use the function GetImageSize(), if that returns x and/or y = 0 it probably isn't an image file and dump it. Tom At 05:06 AM 16/05/2002, you wrote: On Wed, 15 May 2002, Andre Dubuc wrote: Actually, I figured out how to do it: a combination of checking: if (

Re: [PHP] character conversion problem

2002-05-17 Thread Tom Rogers
Hi That looks like UTF-8 encoding and I think you will need the iconv extension installed to convert it easily. Tom At 12:56 PM 18/05/2002, darcy w.christ wrote: hi, i'm in a bit of a bind and i'm hoping someone can help me. i'm working on a project in which some data was saved into a

Re: [PHP] Feelin' dumb...

2002-05-17 Thread Tom Rogers
Hi What you need is for ($i=1; $i=$num_pages; $i+=20) { // print stuff here } Tom At 01:19 PM 18/05/2002, Jason Soza wrote: Okay, I'm apologizing right now for this, but I hope it's at least tolerable. I have this: for ($i=1; $i=$num_pages; $i++) { // print stuff here }

Re: [PHP] date functions

2002-05-18 Thread Tom Rogers
Hi I think this works :) ? $date1 = 1/1/2002; $date2 = date(m/d/Y); $time1 = strtotime($date1); $time2 = strtotime($date2); //get the first monday after date1 $first_monday = strtotime(first monday,$time1); //check if its within date2 if($first_monday $time2): //set count to 0 as we

Re: [PHP] Augmenting an old date

2002-05-18 Thread Tom Rogers
Hi You need to use the strtodate function which converts to a time stamp a date string and you can offset it by a number of days or whatever something like this ? $start = 2002-01-01; $expire = date(Y-m-d,strtotime(+30 days,strtotime($start))); echo $expire.br; ? Tom At 02:03 PM 19/05/2002,

Re: [PHP] Augmenting an old date

2002-05-18 Thread Tom Rogers
Hi A slightly more efficeint way :) ? $start = 2002-01-01; $expire = date(Y-m-d,strtotime($start +30 days)); echo $expire.br; ? Tom At 02:03 PM 19/05/2002, Andre Dubuc wrote: Two columns in my PostgreSQL db are type 'date' (formatted '-mm-dd'): 'start_date' and 'expiry_date'. What I

Re: [PHP] array empty after use

2002-05-21 Thread Tom Rogers
Hi You just need to reset the array pointer with reset($array_name) Tom At 07:47 PM 21/05/2002, Web wrote: Hi there. When an array is 'used' with something like do while I can't re-access it later in the page. It is as if the array gets used up and doesn't exist. The array is from a select

Re: [PHP] how to configure PHP (.ini) so I can use include() from any directory

2002-05-21 Thread Tom Rogers
Hi I use this at the start of my pages, it adds the original path to the extra one: (keeps the include files out of the web servers view :) ini_set (include_path,ini_get(include_path).:../include); Tom At 06:47 PM 21/05/2002, Wilbert Enserink wrote: Hi all, anybody knows how to configure

RE: [PHP] Leading zeroes

2002-05-24 Thread Tom Rogers
Hi If it only a number in the string intval($str) should be enough to get rid of the zero unless it is only 0 Tom At 03:49 AM 24/05/2002, Liam Gibbs wrote: From version 4.1.0, $str = ltrim($str, '0') This works excellently. Thanks. One problem that I didn't think of, though: If the number

  1   2   3   4   5   6   7   8   9   >