[PHP] variable num of function args

2002-12-03 Thread christian haines
hi all, is it possible to somehow have a function which takes a variable number of arguments (with some kind of key association) which can then be converted to variables? i am sick of continually having to go back and add empty parameters to functions in use. an example would be.. function

[PHP] Re: variable num of function args

2002-12-03 Thread christian haines
ooops that should be... function test2($arr) { extract($arr); print $this; } test2($arr = array( test = 1, this = 2 )); // output 2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: When hitting Refresh I still get old data ..

2002-11-25 Thread christian haines
is it that your response page and the page processing the data are the same page? i have had issues with this previously and had to use a 3 step process - 1. address book form 2. processing script page 3. response page -- Christian Haines Internet Developer MITOUSA. Branding Strategies

Re: [PHP] detecting POST variables

2002-10-07 Thread christian haines
maybe try... print pre; print_r($HTTP_POST_VARS); print /pre; this will dump the entire post var array to the browser.. similar to functions before but faster. Christian Haines Internet Developer MITOUSA. Branding Strategies for Visual Interactive Design 102 Tynte Street North

Re: [PHP] force download and file size issue

2002-10-04 Thread christian haines
, christian haines wrote: thanks rasmus, i have tried read file but it gave me the same issues as fpassthru.. both cap on the memory_limit directive withint the php.ini file any other suggestions maybe? cheers christian Rasmus Lerdorf wrote: readfile() On Fri, 4 Oct 2002

[PHP] Re: Mime Types

2002-10-04 Thread christian haines
you could use the command file -bin your_filename and capture the output using popen or exec. i have found this to work well.. seee below function mimetype($file) { // execute command $fp = popen(file -bin $file,r); // determine mimetype to output if(!$fp) { // default

Re: [PHP] force download and file size issue

2002-10-04 Thread christian haines
PHP Version 4.1.2 Red Hat Linux release 7.3 (Valhalla) (Kernel 2.4.18-3 on an i686) Apache/1.3.23 Rasmus Lerdorf wrote: Which OS and which PHP version? On Fri, 4 Oct 2002, christian haines wrote: this is what i have exactly in my code... header(Content-Type: application/force

Re: [PHP] force download and file size issue

2002-10-04 Thread christian haines
wrong then. -Rasmus On Fri, 4 Oct 2002, christian haines wrote: thanks rasmus, i have tried read file but it gave me the same issues as fpassthru.. both cap on the memory_limit directive withint the php.ini file any other suggestions maybe? cheers

[PHP] force download and file size issue

2002-10-03 Thread christian haines
hi all, i have successfully created a download script to force a user to download, however attempting to download large files causes an error saying that the file cannot be found. my code header(Cache-control: private); header(Content-Type: application/force-download; name=\$file\);

Re: [PHP] force download and file size issue

2002-10-03 Thread christian haines
thanks rasmus, i have tried read file but it gave me the same issues as fpassthru.. both cap on the memory_limit directive withint the php.ini file any other suggestions maybe? cheers christian Rasmus Lerdorf wrote: readfile() On Fri, 4 Oct 2002, christian haines wrote: hi all, i

[PHP] mime type list

2002-09-30 Thread christian haines
hi all, i have been looking around on the net for a relatively complete mime-type listing (possibly showing extensions) but have not come across anything. does anyone know of such a list or where i could obtain one? who looks after such a list might be a better question. many thanks christian

Re: [PHP] mime type list

2002-09-30 Thread christian haines
cheers for that... that listing should do the trick it was right under my nose as usual also thanks for your reply in my other post christian Marek Kilimajer wrote: I know about /etc/mime.types, does that help? christian haines wrote: hi all, i have been looking around on the net

[PHP] exec issue - return value 127

2002-09-27 Thread christian haines
hi all, i am having a problem with exec. every command i try to run returns 127 (seg fault i think) but no array with info. what could be causing this problem? i have tried running the complete path to the command e.g. usr/bin/ls -l etc but with no luck. could this be something to do with my

[PHP] Re: exec issue - return value 127 (more)

2002-09-27 Thread christian haines
ok.. i found that i need to check the httpd error_log and it tells me that it can't find the file or directory for the command. how do i fix this? i tried a full pathname to the command but it still says it cannot find dir or file etc c. Christian Haines wrote: hi all, i am having

[PHP] Re: exec issue - return value 127 (more and more)

2002-09-27 Thread christian haines
the ini_set function to turn safe mode off but this appears not to work suggestions would be great as this is driving me nuts! cheers c. Christian Haines wrote: ok.. i found that i need to check the httpd error_log and it tells me that it can't find the file or directory for the command. how do i

[PHP] session and expiration function

2002-09-23 Thread christian haines
hi, is it possible to have a function execute when a session expires using php4 sessions? i know how to execute a function if i control the timeout (as mentioned elsewhere in this group) but what about if the session times out itself using the inbuilt garbage collection routine. if so, any ideas

Re: [PHP] session and expiration function

2002-09-23 Thread christian haines
thanks john, hmmm... i suspected as much... i guess the way to do it would be to set a highly improbable garbage collection and long timeout via ini_set. then use a timeout function attached to the session which launches on expiration cheers christian John Holmes [EMAIL PROTECTED] wrote in

Re: [PHP] session and expiration function

2002-09-23 Thread christian haines
the PHP board at Devshed and someone posted a sample function to handle the cleanup. ---John Holmes... -Original Message- From: christian haines [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 11:06 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] session and expiration

[PHP] session class

2001-12-21 Thread Christian Haines
(sorry if this has been posted a thousand times..i am having problems posting) hi all, how does one access and manipulate session variables from within a class? i have hunted the net high and low but received no relief. i have tried (where error is a session variable) class test { var

[PHP] caching madness

2001-09-20 Thread Christian Haines
hi all, i have tried everything not to get a page to cache.. server-side: header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: '. gmdate('D, d M Y H:i:s') .' GMT'); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache') client-side: meta

[PHP] internet explorer and form submission

2001-09-13 Thread Christian Haines
hi all, i have just discovered a bug with internet explorer form submission. suppose i have a form with 2 submit buttons to do different things eg- form name=form method=post action=something.php input type=submit name=update value=update input type=submit name=delete value=delete /form one

[PHP] Re: internet explorer and form submission

2001-09-13 Thread Christian Haines
sorry i just figured it out...just panicked...must be the time of year if(!isset($delete)) { // do update } if(isset($delete)) { // do delete } that should fix the problem From: [EMAIL PROTECTED] (Christian Haines) Newsgroups: php.general Date: Thu, 13 Sep 2001 23:44:30 +1030

[PHP] stripslashes strips too much

2001-09-11 Thread Christian Haines
hi all, i am experiencing a bit of a problem with stripslashes stripping too much data. For example: it will strip abc's - abc has anyone else experienced this? is there a solution? many thanks in advance, christian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail:

[PHP] session_name causes break

2001-09-08 Thread Christian Haines
hi all, has anyone else had problems with specifying session_name causing data not being input into session variables? For example: session_name(test); session_start(); session_register(count); count++; causes count not to increment whereas session_start(); session_register(count); count++;

[PHP] SESSIONS! - please help

2001-09-06 Thread Christian Haines
hi all, PHP-4.03pl LINUX 7.0 i am still having problems with sessions. the following does nothing but should appear to do something! it is just a simple experiment to test that sessions work. session_test.php calls session_proc.php to perform one of three functions. i would really appreciate

[PHP] session - why does this not work?

2001-09-05 Thread Christian Haines
hi all, any ideas why this does not work? its just a simple script to test multi-dimensional arrays. the count value should increment...should it not? many thanks in advance! ? session_start(); session_register(count[0]); $count[0]++; echo $count[0].brnbsp;br; reset