RE: [PHP] array empty after use

2002-05-21 Thread David Freeman
> When an array is 'used' with something like do while I can't > re-access it later in the page. Arrays have a pointer that steps through the array as you 'use' it. Once you reach the end you'll have to reset that pointer before you can step through the array again. See the manual section on

RE: [PHP] Reverse mySQL date

2002-05-21 Thread David Freeman
-Original Message- How can I reverse the date coming out of mySQL? ie 2002-05-21 becomes 21-05-2002 Can do it in the mySQL query or do I need to use PHP? -Original Message- Have a look at your favourite mysql manual for DATE_FORMAT - this will let you do what you need. CYA,

[PHP] upload problem...

2002-05-21 Thread Jas
Ok here is my error message: Warning: Unable to open '' for reading: No such file or directory in upload_done.php on line 9 I have checked permissions on the folder and they are correct, my only guess is that upon doing several checks, session vars, etc... it is loosing the file name somewhere. A

[PHP] Re: Gibberish returned from forms

2002-05-21 Thread Gwen Fremonti
I'm not subscribed to the list because I'm not a "real" PHP user or developer (yet!), but I found this newsgroup on php.net and it allowed me to post anyway. I'm just trying to see whether I can help track down a problem. If anyone has any suggestions, could you please cc me on a response? Thanks

[PHP] php, files, character encoding???

2002-05-21 Thread Gerard Samuel
I was about to start putting together some code for a text editor. One of its requirements is that the files that it creates, must be able to be used in utf-8 char. encoded page. Then I started to wonder if php's fwrite() is character set aware. I did some preliminary searching, but I didn't come

Re: [PHP] upload problem...

2002-05-21 Thread Gerard Samuel
Take a look at move_uploaded_file() http://www.php.net/manual/en/function.move-uploaded-file.php Jas wrote: >Ok here is my error message: >Warning: Unable to open '' for reading: No such file or directory in >upload_done.php on line 9 > >I have checked permissions on the folder and they are corr

Re: [PHP] upload problem...

2002-05-21 Thread Jas
Ok that didn't work, so far if I select a file other than a .jpg it returns me an error which is what I need to happen, however if I select an image with a .jpg extension for upload it tells me the upload was successful but when I check the directory there is never anything there. Any other ideas

[PHP] JavaScript vs. Header redirect

2002-05-21 Thread Hunter Vaughn
Is there any reason I can't just use a JavaScript redirect from a PHP login handling script since I can't seem to get the header("Location: URL"); function to work? Any security concerns or anything else? As far as I can tell, all calls to header fail as soon as I attain variables based on a POS

[PHP] Retrieving Session Variables

2002-05-21 Thread Tim Greenleaf
I am having a problem getting a session variable in the function (currentlogin) below. I can process the script and in the else statement "print ($HTTP_SESSION_VARS['name']);" the session variable is printed but when the function tries to print the session variable, I get an error indicating an u

RE: [PHP] Retrieving Session Variables

2002-05-21 Thread John Holmes
HTTP_SESSION_VARS has no scope within a function. Make it global first... function currentlogin() { global $HTTP_SESSION_VARS; echo $HTTP_SESSION_VARS['name']; return; } ---John Holmes... > -Original Message- > From: Tim Greenleaf [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 2

Re: [PHP] JavaScript vs. Header redirect

2002-05-21 Thread Justin French
the below code should work, although, you've posted pseudo code, so i can't check it for any errors. if you don't print anything to the screen (including error messages, white space, etc), header() will work. be aware that any implementation of javascript will be limited to clients that have jav

[PHP] The $PATH to enlightenment

2002-05-21 Thread Brad Hubbard
What's the best way to alter the path that PHP looks in for exec(), system(), passthru(), etc. commands. IOW, how do I add /usr/local/ to the $PATH variable for the user (nobody in my case) that the webserver runs as. This question may be OT. Thanks in advance, Brad -- PHP General Mailin

Re: [PHP] upload problem...

2002-05-21 Thread Jason Wong
On Wednesday 22 May 2002 07:02, Jas wrote: > Ok here is my error message: > Warning: Unable to open '' for reading: No such file or directory in > upload_done.php on line 9 > > I have checked permissions on the folder and they are correct, my only > guess is that upon doing several checks, session

[PHP] Function

2002-05-21 Thread Rodrigo
Hi guys I’m trying to use a function on na .inc file, how should I do? How should I write the function and what should I write on the file so that the function file is “Included” to be used on a function call on the php file? I appreciate any kind of sample code. Thanx, Rodrigo de Oliveira C

RE: [PHP] Function

2002-05-21 Thread Peter
write the function as normal in na.inc and then on the page that u want to use that function type include(path_to_na.inc); -Original Message- From: Rodrigo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 22 May 2002 1:48 PM To: 'Php Lista' Subject: [PHP] Function Hi guys I’m trying to use a

Re: [PHP] The $PATH to enlightenment

2002-05-21 Thread Brad Hubbard
On Wed, 22 May 2002 12:59, Martin Towell did align ASCII characters thusly: > putenv() and getenv() if it's for just one page Ok, that'll do it for one page, thanks. I was thinking of something for an entire site, any other ideas? This is running on (RH) Linux BTW. Cheers, Brad -- PHP Genera

Re: [PHP] Function

2002-05-21 Thread Sqlcoders.com Programming Dept
Hi there!, When you include information from an include file, PHP treats the text as inline code if you use the include() function. In other words, if you use code like this: Then any functions inside file.php will be available just as if you'd copy/pasted them in. If file.php contained: funct

Re: [PHP] Function

2002-05-21 Thread Kevin Waterson
On Wed, 22 May 2002 00:48:24 -0300 "Rodrigo" <[EMAIL PROTECTED]> wrote: > Hi guys I_m trying to use a function on na .inc file, how should I do? > > How should I write the function and what should I write on the file so > that the function file is _Included_ to be used on a function call on > t

[PHP] make install issues

2002-05-21 Thread Evan Nemerson
$ make install /usr/local/php4/build/shtool install -c -m 0755 php /usr/local/bin/php-cgi cp: cannot stat `php': No such file or directory make: *** [install-sapi] Error 1 Any ideas? Configured with mcrypt, mhash, sockets, and ftp. Everything before this works perfect. Thanks in advance, Eva

Re: [PHP] Function

2002-05-21 Thread Miguel Cruz
On Wed, 22 May 2002, Sqlcoders.com Programming Dept wrote: > When you include information from an include file, PHP treats the text as > inline code if you use the include() function. > > In other words, if you use code like this: > include 'file.php'; > ?> > > Then any functions inside file.ph

Re: Re: [PHP] Full-Duplex communication

2002-05-21 Thread Vinod Panicker
Hi, It still seems like I havent made the problem clear enough. I am aware of the print(), echo() and flush() functions and what they do. It does not fit in as a solution. Let me explain my problem more elaborately - The client calls a PHP script, script_a.php on the Apache web server, usin

Re: Re: [PHP] Full-Duplex communication

2002-05-21 Thread Evan Nemerson
Vinod, Interesting... Okay unless I'm mistaken, what you want to do can't be accomplished through PHP. However, you may want to take a look at libnet. http://www.packetfactory.net/Projects/Libnet/ I've always wanted someone to create a PHP interface for this- unfortunatly my C isn't quite th

Re: Re: [PHP] Full-Duplex communication

2002-05-21 Thread Miguel Cruz
I don't think you're going to get Apache to hand you the socket. However, you can write a program using the standalone (CGI) PHP interpreter that will act like a server - check out http://php.net/socket_create_listen for more info. You could redirect from your standard web server to your liste

Re: Re: [PHP] Full-Duplex communication

2002-05-21 Thread Evan Nemerson
1st thing: sorry about the double-post. i don't know why that happened. If this one gets double posted too, i apologize in advance. 2nd: php.net/pcntl On Tuesday 21 May 2002 23:30 pm, Miguel Cruz wrote: > I don't think you're going to get Apache to hand you the socket. > > However, you can wr

Re: Re: [PHP] Full-Duplex communication

2002-05-21 Thread Miguel Cruz
Ah, yes - http://php.net/pcntl_fork Well there you go, then - everything required to create a server in PHP. miguel On Tue, 21 May 2002, Evan Nemerson wrote: > 1st thing: sorry about the double-post. i don't know why that happened. If > this one gets double posted too, i apologize in advance.

Re: Re: Re: [PHP] Full-Duplex communication

2002-05-21 Thread Vinod Panicker
Thanks for the reply Miguel, but here i'm not trying to implement my own multi-threaded server - exactly the reason why i'm using Apache / PHP. I could have made a listening server which is based on a multi-threaded or multi-forked model, but the time and complexities involved would be huge.

Re: Re: [PHP] Full-Duplex communication

2002-05-21 Thread Richard Archer
At 5:55 AM + 22/5/02, Vinod Panicker wrote: >I want the ability to write to a socket thats been created earlier >- i want to steal it from Apache, so that i can use it when and >where i like. Why not just keep your script running and have it send more data to the browser whenever it becomes

[PHP] Mcrypt: Blowfish or Twofish or no fish? Part 2

2002-05-21 Thread Jimmy Lantz
Thanx for the suggestions! Someone mentioned that I could use MD5 and then encrypt the hash, how would I ever decrypt that? Is'nt MD5 a 1-way thing only? Another question? Should I go for bigger keylength or bigger blocksize or both? What makes for the best encryption? / Jim (and before someon

Re: Re: Re: [PHP] Full-Duplex communication

2002-05-21 Thread Vinod Panicker
What i have at the other end is a Instant Messenger client :) Cant have the script running till the time the user logs out can i? And also, different activities are triggered on the server asynchronously (presence status, instant messages, notifications) which has to be sent to the client. T

Re: [PHP] Mcrypt: Blowfish or Twofish or no fish? Part 2

2002-05-21 Thread Vinod Panicker
Yes Jimmy, you are correct. MD5 is a one-way hash. Its used for getting a unique fingerprint of some data (like files / passwords etc) so that it can be compared with another MD5 hash. Thats the point of a hashing algorithm like MD5 and SHA1 - you should never need to decrypt the data. Refe

[PHP] Servers, servers and more servers

2002-05-21 Thread Stephen Tredrea
Title: Message I'm trying to put together an architecture for a web environment and have a newbie question regarding PHP and application servers...   I have decided to use Apache and MySQL running on Linux, using PHP for server side scripting. Were does an application server fit into this an

RE: [PHP] Mcrypt: Blowfish or Twofish or no fish? Part 2

2002-05-21 Thread Ray Hunter
Jimmy, You could md5 something and send it encrypted and then verify the md5, something similar to sharing keys...md5 is similar to a key...i use it as something similar to kerberos... And yes, MD5 is a one-way hash...which comes in handy... Just remember that bigger is almost always better. I

Re: [PHP] Servers, servers and more servers

2002-05-21 Thread Miguel Cruz
On Wed, 22 May 2002, Stephen Tredrea wrote: > I'm trying to put together an architecture for a web environment and > have a newbie question regarding PHP and application servers... > > I have decided to use Apache and MySQL running on Linux, using PHP for > server side scripting. Were does an ap

<    1   2