[PHP] Archives

2003-10-22 Thread Nathan Taylor
Hey guys, Just a quickie: where are the archives for this list? What URL? Thanks, Nathan Taylor

Re: [PHP] command line arguments

2003-10-22 Thread Robert Cummings
Use $argv, that failing it definately works with $_SERVER['argv'] Cheers, Rob. On Wed, 2003-10-22 at 13:59, Dan Joseph wrote: > Hi, > > I'm having trouble remember something > > I have a php script that I want to run from a command line: > > % /usr/local/bin/php script.ph

[PHP] Images being uploaded in ASCII format

2003-10-22 Thread Pablo Gosse
Hi all. I'd like to take a brief sentence to introduce myself first. My name is Pablo Gosse, and I've just recently joined the php-general list. I've been using PHP since early 2000, and work as webmaster at the University of Northern British Columbia. I'm running into a problem with file upload

Re: [PHP] Sorting an array by value length.

2003-10-22 Thread David Otton
On Wed, 22 Oct 2003 11:21:13 -0700, you wrote: >I've been scouring the php.net site for a few hours now trying to find a >viable way to sort a single dimensional array( array('0'=>'fddfsdsfdds', >'1'=>','d','2' => 'gofofle'); ). so that the longest lengthed >item is at the top, and the

Re: [PHP] is_uploaded_file() security

2003-10-22 Thread Marek Kilimajer
CPT John W. Holmes wrote: I don't think so. Test this, but I think you can just type /etc/passwd into the file name box (instead of using the "browse" button) and have that value submitted in the form. May be dependent upon the browser on how it's handled, though. You would send your own /etc/passw

RE: [PHP] Session output question

2003-10-22 Thread Susan Ator
ON['msg'] $keys = array_keys($_SESSION); > 2) Is there any way to use a variable in a session name? > > can I do: > $msg="20031022" > $_SESSION["$msg.name"] becomes $_SESSION['20031022name'] Just like that or $_SESSION[$msg.'name

[PHP] command line arguments

2003-10-22 Thread Dan Joseph
Hi, I'm having trouble remember something I have a php script that I want to run from a command line: % /usr/local/bin/php script.php 47264 47264 is the argument, however, I can't figure out how to access it inside the script. I thought it was the $ARG array

Re: [PHP] Session output question

2003-10-22 Thread CPT John W. Holmes
SESSION['uid'] > $_SESSION['msg'] $keys = array_keys($_SESSION); > 2) Is there any way to use a variable in a session name? > > can I do: > $msg="20031022" > $_SESSION["$msg.name"] becomes $_SESSION['20031022name'] Just like that or

[PHP] Session output question

2003-10-22 Thread Susan Ator
$_SESSION['msg'] 2) Is there any way to use a variable in a session name? can I do: $msg="20031022" $_SESSION["$msg.name"] becomes $_SESSION['20031022name'] I have set the session above t

[PHP] Newbie - Can't get sessions to work

2003-10-22 Thread Shaun Campbell
I've got a problem getting sessions to work and I wondered if anyone could offer any advice. The example I am using is to get one page to set variables in a session and then use another page to retrieve them. I am using 4.3.4RC2 and prior to that 4.3..3 on Win2k with IE6 and Apache 1.3.22. The c

Re: [PHP] is_uploaded_file() security

2003-10-22 Thread CPT John W. Holmes
From: "Alexander Mueller" <[EMAIL PROTECTED]> > "Cpt John W. Holmes" wrote: > > > > The user can pass the name of a file on the server. If you're not doing any > > checks and moving or displaying the "file" the user "sent" you, you may end > > up moving, deleting, or displaying any file on your ser

[PHP] Re: Sorting an array by value length.

2003-10-22 Thread Justin Patrin
You want to use usort, which lets you specify a comparison function. function cmpByLength($a, $b) { return strlen($a) > strlen($b); } usort($arrayToSort, 'cmpByLength'); And change the '>' to '<' if the ordering is wrong. Rolf Brusletto wrote: Hey all - I've been scouring the php.net site for

[PHP] Sorting an array by value length.

2003-10-22 Thread Rolf Brusletto
Hey all - I've been scouring the php.net site for a few hours now trying to find a viable way to sort a single dimensional array( array('0'=>'fddfsdsfdds', '1'=>','d','2' => 'gofofle'); ). so that the longest lengthed item is at the top, and the smallest lengthed item is at the bottom..

RE: [PHP] Passing array variables in a GET

2003-10-22 Thread Wouter van Vliet
Take a look at http://nl.php.net/manual/en/function.serialize.php and http://nl.php.net/manual/en/function.unserialize.php. Or if the keys don't matter and the array has just one level (strange, I know there's a different term for that, totally cannot find it in my memory :S) you can consider join(

Re: [PHP] Tab index

2003-10-22 Thread John Nichel
Hardik Doshi wrote: I am using the HTML. Javascript is not standard of W3C organization and that's why i don't want to use it. Is there any other solution for setting up the tabindex on the Drop down menu? Thanks Hardik Wrong list. Better results if you ask this question on a HTML/DHTML/JavaScri

Re: [PHP] Age from birthdate?

2003-10-22 Thread Eugene Lee
On Wed, Oct 22, 2003 at 06:31:21PM +0200, DvDmanDT wrote: : : How would I get the age of someone if I store the birthdate in a date field? : I just realized FLOOR((UNIX_TIMESTAMP(NOW()) - : UNIX_TIMESTAMP(birthdate))/60/60/24/365.25) wont work for persons born : before 1970... :p I must get the c

Re: [PHP] Tab index

2003-10-22 Thread Hardik Doshi
I am using the HTML. Javascript is not standard of W3C organization and that's why i don't want to use it. Is there any other solution for setting up the tabindex on the Drop down menu? Thanks Hardik --- Payne <[EMAIL PROTECTED]> wrote: > Hardik Doshi wrote: > > Is it DHTML or Javascript? Beca

Re: [PHP] is_uploaded_file() security

2003-10-22 Thread Alexander Mueller
"Cpt John W. Holmes" wrote: > > The user can pass the name of a file on the server. If you're not doing any > checks and moving or displaying the "file" the user "sent" you, you may end > up moving, deleting, or displaying any file on your server. > > ---John Holmes... Thanks John, but only in t

[PHP] Re: Using php for non-web based applications

2003-10-22 Thread Paul Scruby
OK I figured out a solution. If your interested I am just calling from stdlib.h: system("php myFile.xml"); and then passing the result on the stdout to XERCES using stdin. Paul Scruby wrote: Hi there, I am not sure if this is the right list to post to as most of you guys are probably run php as

[PHP] Passing array variables in a GET

2003-10-22 Thread Jeff McKeon
Is this possible??? $blah[]=(a, b, c); link So basically I have a page that need an array to perform some function. Can I pass that array variable (and thus it's data) to it from another page? Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

Re: [PHP] Tab index

2003-10-22 Thread Payne
Hardik Doshi wrote: Is it DHTML or Javascript? Becaucse DHTML doesn't work the same way on Browser. You will need to do a search on google DHTML and Netscape and Safari, you make want to use Javascript because then any browser can read it. Payne Hi Group, Currently i have setup the tabindex

[PHP] Tab index

2003-10-22 Thread Hardik Doshi
Hi Group, Currently i have setup the tabindex on the drop down menu but it doesn't work on mozilla and safari browser. It is only working with the IE. Tab index on the text box and textarea fields are working perfectly on cross browser. Does any one has a clue why the tabindex on the drop down men

[PHP] Re: Comments / Feedback script?

2003-10-22 Thread pete M
have a sniff around http://www.hotscripts.com/PHP/Scripts_and_Programs/index.html pete Mike Yrabedra wrote: Anyone know of a good 'comments/ feedback' creation script that writes to a static text file (no MySQL)? The user would enter their email, name and comment. They would then be displayed on

Re: [PHP] PHP scripts are not executed

2003-10-22 Thread John Nichel
Bas wrote: Web address is: http://212.120.120.108:3/forumBT/ for phpBB (DUTCH!!!) If you need any translation, i will help you. "Bas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] You need to modify your httpd.conf file to see 'index.php' as an index. -- By-Tor.com It's all abo

[PHP] Age from birthdate?

2003-10-22 Thread DvDmanDT
How would I get the age of someone if I store the birthdate in a date field? I just realized FLOOR((UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(birthdate))/60/60/24/365.25) wont work for persons born before 1970... :p I must get the current age in years, and I must be able to select by age... :p Any id

[PHP] Comments / Feedback script?

2003-10-22 Thread MIKE YRABEDRA
Anyone know of a good 'comments/ feedback' creation script that writes to a static text file (no MySQL)? The user would enter their email, name and comment. They would then be displayed on the page using an include function. ++ Mike Yrabedra (Presid

[PHP] Re: Random Quotes...

2003-10-22 Thread Kevin Stone
"Payne" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I am working on a project and I need to see sample quote for doing > random quotes. These quotes will be put from a database. Can some please > share me some sample code. Thanks. > > Chuck For more solutions go to,

Re: [PHP] is_uploaded_file() security

2003-10-22 Thread Alexander Mueller
Marek Kilimajer wrote: > > By requesting upload_script.php?userfile=/etc/passwd and > upload_sript.php uses global variables to handle uploads. This check > should not be necessery if you are using $_FILES superglobal as php will > not accept _FILES user input. But keep the check there in case a b

Re: [PHP] Random Quotes...

2003-10-22 Thread CPT John W. Holmes
From: "Payne" <[EMAIL PROTECTED]> > I am working on a project and I need to see sample quote for doing > random quotes. These quotes will be put from a database. Can some please > share me some sample code. Thanks. If you're using MySQL, you can use SELECT quote FROM Quote ORDER BY RAND() LIMIT

Re: [PHP] Random Quotes...

2003-10-22 Thread Tom Rogers
Hi, Thursday, October 23, 2003, 1:34:02 AM, you wrote: P> Hi, P> I am working on a project and I need to see sample quote for doing P> random quotes. These quotes will be put from a database. Can some please P> share me some sample code. Thanks. P> Chuck If you are using mysql have a look at

Re: [PHP] is_uploaded_file() security

2003-10-22 Thread CPT John W. Holmes
From: "Alexander Mueller" <[EMAIL PROTECTED]> > AFAIK the browser only sends the content of the chosen file and cannot > specify in any way a local filename which should be worked on. > Furthermore PHP creates a temporary file containing the uploaded file > content and passes this filename as 'tmp

Re: [PHP] is_uploaded_file() security

2003-10-22 Thread Marek Kilimajer
By requesting upload_script.php?userfile=/etc/passwd and upload_sript.php uses global variables to handle uploads. This check should not be necessery if you are using $_FILES superglobal as php will not accept _FILES user input. But keep the check there in case a bug will be introduced. Alexan

[PHP] Random Quotes...

2003-10-22 Thread Payne
Hi, I am working on a project and I need to see sample quote for doing random quotes. These quotes will be put from a database. Can some please share me some sample code. Thanks. Chuck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP scripts are not executed

2003-10-22 Thread Marek Kilimajer
favicon.ico is not the problem. The problem is "The specified network name is no longer available". Check out this resource, if that does not help, google for the error string. http://www.experts-exchange.com/Web/Web_Servers/Apache/Q_20671124.html Bas wrote: I have checked the error log and th

Re: [PHP] German Date - GMDATE Function

2003-10-22 Thread Curt Zirzow
* Thus wrote Steve Vernon ([EMAIL PROTECTED]): > Hello, > > When I use the gmdate function, I get the English date, e.g. October. Is it > possible to get the date in German or another language? I really need the > server setting up so that it can handle different languages. What you want is: h

[PHP] is_uploaded_file() security

2003-10-22 Thread Alexander Mueller
Hi, I am wondering about the following paragraph at http://at2.php.net/manual/en/function.is-uploaded-file.php. > Returns TRUE if the file named by filename was uploaded via HTTP POST. > This is useful to help ensure that a malicious user hasn't tried to > trick the script into working on files u

Re: [PHP] Mail() Function on Cobalt Raq 4

2003-10-22 Thread Mike Morton
Have you checked the mail logs (should be /var/log/mail.log or something similar) you could be getting errors from the mail server rather than the php side. I have had it where I thought that it was php but it turned out be a local relaying error )On 10/22/03 10:16 AM, "Peter Graber" <[EMAIL

Re: [PHP] PHP scripts are not executed

2003-10-22 Thread Bas
I have checked the error log and the only real error i can see is that C:\pub\favicon.ino does not exist... I have added this and now i need that you test again... Thanks, Bas "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Sometimes the pages load, sometimes they do

Re: [PHP] help me

2003-10-22 Thread Burhan Khalid
Dave wrote: I am setting up downloads.ca so as to be like downloads.com I need to be able to upload files several gigs in size Dave Dave : Don't top post. FTP is what you need to "upload files several gigs in size" -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com -- PHP Gene

[PHP] German Date - GMDATE Function

2003-10-22 Thread Steve Vernon
Hello, When I use the gmdate function, I get the English date, e.g. October. Is it possible to get the date in German or another language? I really need the server setting up so that it can handle different languages. I suppose I could get the month as a number, and then convert the number, but t

[PHP] Mail() Function on Cobalt Raq 4

2003-10-22 Thread Peter Graber
Using a Cobalt Raq 4 w/php 4.3.1. The sendmail_path is : /usr/sbin/sendmail -t -iThis seems to be right. Can't get mail to send. Script works on other servers without fail. PHP Info here: http://www.ncafp.com/cgi-bin/phpInfo.php -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] PHP scripts are not executed

2003-10-22 Thread Marek Kilimajer
Sometimes the pages load, sometimes they don't. Seems like apache is crashing, check apache error logs, php installation, installed modules... Bas wrote: And, e-mail me the results(on [EMAIL PROTECTED]) Of the website... Likethe error and so "Bas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL

Re: [PHP] PHP scripts are not executed

2003-10-22 Thread Bas
And, e-mail me the results(on [EMAIL PROTECTED]) Of the website... Likethe error and so "Bas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On web, i mean from my pc and on pc i use both > "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hm, I stil

Re: [PHP] PHP scripts are not executed

2003-10-22 Thread Bas
Web address is: http://212.120.120.108:3/forumBT/ for phpBB (DUTCH!!!) If you need any translation, i will help you. "Bas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On web, i mean from my pc and on pc i use both > "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message > n

Re: [PHP] PHP scripts are not executed

2003-10-22 Thread Bas
On web, i mean from my pc and on pc i use both "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hm, I still don't get you. > > On your pc - do you mean you view the pages from your pc or that the > pages are served from your pc (or both)? > > From the web - do you me

Re: [PHP] PHP scripts are not executed

2003-10-22 Thread Marek Kilimajer
Hm, I still don't get you. On your pc - do you mean you view the pages from your pc or that the pages are served from your pc (or both)? From the web - do you mean you view the pages from the web or that the pages are served from another server on the web? Bas wrote: Internally is on my pc an

[PHP] Re: (ANNOUNCE) codeSECURE 1.0 released - - Protecting PHP code

2003-10-22 Thread Bas
Is it free? "John Black" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Greetings everyone, > We have just launched a new product called codeSECURE and would like you to > check it out. > > codeSECURE is a PHP obfuscator. > > Basically codeSecure is a small collection of scripts to "

[PHP] Using php for non-web based applications

2003-10-22 Thread Paul Scruby
Hi there, I am not sure if this is the right list to post to as most of you guys are probably run php as an Apache module. However, I am currently using my own xml data format for a non-web based application and I would like to be able to embed php within it. Is there a C/C++ library that I can

Re: [PHP] PHP scripts are not executed

2003-10-22 Thread Bas
Internally is on my pc and externally is from the web. "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, first you should explain the meanings of "internaly" and "externaly" > in this case. > > Bas wrote: > > > I am running Windows XP, Apache/2.0.44 and php 4.3.3

Re: [PHP] help me

2003-10-22 Thread Burhan Khalid
Dave wrote: Hi I need to edit my php.ini file. I tried to do this through ftp but no go. I am really desperate. How do I do it through putty. Ie I log in su to root NOW WHAT? Find your php.ini file -- A few ways to do this. The easiest would be to look at the output of phpi

Re: [PHP] PHP scripts are not executed

2003-10-22 Thread Marek Kilimajer
Hi, first you should explain the meanings of "internaly" and "externaly" in this case. Bas wrote: I am running Windows XP, Apache/2.0.44 and php 4.3.3. I seem that internally all my PHP scripts work. But, externally, phpBB 2.0.6 does not work... Sorry for the double message... And my e-mail h

[PHP] value field filled by mysql output

2003-10-22 Thread Mike At Spy
I am creating a form for editing records output from a mysql db (edit as an html form). I've done this many times, but have never run into this issue. I have code like this for the query: $edit_list = mysql_query("SELECT general_inventory.quantity FROM products_to_categories, general_inventory

[PHP] PHP scripts are not executed

2003-10-22 Thread Bas
I am running Windows XP, Apache/2.0.44 and php 4.3.3. I seem that internally all my PHP scripts work. But, externally, phpBB 2.0.6 does not work... Sorry for the double message... And my e-mail has changed... don't spam!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] help me

2003-10-22 Thread John Nichel
Dave wrote: Hi I need to edit my php.ini file. I tried to do this through ftp but no go. I am really desperate. How do I do it through putty. Ie I log in su to root NOW WHAT? vi? Please give me step by step instructions including how to save and make my changes. I need to do the following I need

RE: [PHP] get back to index.php

2003-10-22 Thread Fernando Melo
Make sure there are no blank spaces being echoed. -Original Message- From: Sudheer Palaparambil [mailto:[EMAIL PROTECTED] Sent: 22 October 2003 14:30 To: [EMAIL PROTECTED] Subject: Re: [PHP] get back to index.php But it is giving the following error message Warning: Cannot modify header

Re: [PHP] get back to index.php

2003-10-22 Thread Sudheer Palaparambil
But it is giving the following error message Warning: Cannot modify header information - headers already sent by (output started at D:\websites\clands\clandsadmin\etooss.com\web\insert_user.php:3) in D:\websites\clands\clandsadmin\etooss.com\web\insert_user.php on line 29 Thank you. From: Mare

Re: [PHP] Problem in 2 dimensional Array

2003-10-22 Thread Marek Kilimajer
khuram noman wrote: Dear Members i have 2 problems in 2 dimensional array . 1. how to declare global 2 dimensional array in php $GLOBALS['array_name']=array( ); 2. how to pass 2 dimensional array in function Like any other value. Waiting for ur soon reply Khuram Noman __

Re: [PHP] get back to index.php

2003-10-22 Thread Marek Kilimajer
Use header('Location: http://www.etooss.com/'); exit; Sudheer Palaparambil wrote: Hi, I am calling the insert_user.php like this http://www.etooss.com/insert_user.php"; onsubmit="return verifyIt(this);"> In insert_user.php, I am inserting the record to mysql db, nothing is displayed the

RE: [PHP] get back to index.php

2003-10-22 Thread Fernando Melo
In insert_user.php header("Location: index.php"); exit; make sure nothing is being echoed before you call this. -Original Message- From: Sudheer Palaparambil [mailto:[EMAIL PROTECTED] Sent: 22 October 2003 14:15 To: [EMAIL PROTECTED] Subject: [PHP] get back to index.php Hi, I am ca

[PHP] get back to index.php

2003-10-22 Thread Sudheer Palaparambil
Hi, I am calling the insert_user.php like this http://www.etooss.com/insert_user.php"; onsubmit="return verifyIt(this);"> In insert_user.php, I am inserting the record to mysql db, nothing is displayed there. Now how do come back to index.php screen. Thank you Sudheer ___

[PHP] Problem in 2 dimensional Array

2003-10-22 Thread khuram noman
Dear Members i have 2 problems in 2 dimensional array . 1. how to declare global 2 dimensional array in php 2. how to pass 2 dimensional array in function Waiting for ur soon reply Khuram Noman __ Do you Yahoo!? The New Yahoo! Shopping - with improved product se

Re: [PHP] Whats more efficient? (Conclusion)

2003-10-22 Thread Mika Tuupola
On Wed, 22 Oct 2003, Ryan A wrote: > what do you suggest? and any urls for reading up on caching? Some benchmarks on content and bytecode caching: http://www.appelsiini.net/~tuupola/articles/benchmarking-phpa/ -- Mika Tuupola http://www.appelsiini.net/~tuup

Re: [PHP] there has to be a better way...

2003-10-22 Thread Nick JORDAN
"jsWalter" <[EMAIL PROTECTED]> wrote on 22/10/2003 09:10:44: > I need to read (write comes later) from a config file that we used to handle > manually. > There must be a better way to do this. Check out the parse_ini_file() function. Nick -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] there has to be a better way...

2003-10-22 Thread - Edwin -
On Wed, 22 Oct 2003 03:10:44 -0500 "jsWalter" <[EMAIL PROTECTED]> wrote: [snip] > There must be a better way to do this. [/snip] http://www.php.net/manual/en/function.parse-ini-file.php ? - E - __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! h

[PHP] there has to be a better way...

2003-10-22 Thread jsWalter
I need to read (write comes later) from a config file that we used to handle manually. I'm getting lazy, so I'm writing a web interface for this. What I have does this... - open a given file - dump entire file into a string - explode string into an array at the EOL marker - walk down this

Re: [PHP] set the PHP to look at library files.

2003-10-22 Thread jsWalter
"Robert Cummings" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > See the "include_path" setting in your php.ini file. Right! I have many classes I've pulled from phpclasses.org. They all sit in a CLASSES directory inside my PHP directory. Just like PEAR, same format as well. Ju

[PHP] Korean mbstring settings?

2003-10-22 Thread Rasmus Lerdorf
Any Korean users using --with-mbstring=kr ? What do your mbstring.* settings in your php.ini file look like? I am assuming you don't need any output encoding translation but are you using input encoding translation? Or if you aren't using mbstring at all, but iconv or something else, I'd like t

<    1   2