Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
You have the same session id, but there is no data in it, so what's the problem? You should still consider the user logged out since the session is empty, right? If you really want, upon logout, make a new session id with session_id(), md5() and uniqid(). ---John Holmes... - Original Message

[PHP] Re: can't restart session

2003-07-21 Thread James Rodenkirch
you need to specify what session variables to unset - usually I write a foreach loop to unset every session variable (unless you are using certain variables for other parts of the site) Like This foreach ($_SESSION as $key => $value){ session_unregister($key); } Chris W. Parker wrote:

RE: [PHP] can't restart session

2003-07-21 Thread Adrian Portsmouth
In order to use the set_cookie method to kill a session_id you need to specify the name of the session, you have used 'user_info' but nowhere in your code do you specify the session_name("user_info") as the sessions name. HTH Ade -Original Message- From: Chris W. Parker [mailto:[EMAIL PRO

RE: [PHP] can't restart session

2003-07-21 Thread Chris W. Parker
CPT John W. Holmes on Monday, July 21, 2003 12:39 PM said: > You have the same session id, but there is no data in it, so what's > the problem? The problem is that the server is still regarding it as the same session even if a different user comes along and logs in.

[PHP] Re: IE Issues

2003-07-21 Thread David Goodchild
You need to open IE6 and do this: Goto View -> Text Size -> Medium Sometimes this can accidently change "Stephen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > This is a little off topic but I do need some help. I have had IE 6 for > about a month now (just got a new co

Re: [PHP] POSIX seteuid and similar

2003-07-21 Thread David Goodchild
Curt, thanks for that, I didnt see that in the notes. A question that I havent been able to work out since reading this is... When both you and the person in the contributed notes say: "make your php cgi setuid" and "that is ran in cgi mode that is setuid'd" ... How do I setuid a CGI script? ...

Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
From: "Chris W. Parker" <[EMAIL PROTECTED]> > > CPT John W. Holmes > > on Monday, July 21, 2003 12:39 PM said: > > > > You should still consider the user logged out since the > > session is empty, right? > > Right, but the server isn't thinking of it this way. Then s

Re: [PHP] POSIX seteuid and similar

2003-07-21 Thread Doug La Farge
You guys can correct me if I'm wrong but I believe what is referred to here is SUEXEC. This allows a virtual domain instance to run as any specified username and group. You are not setting the UID of the script but rather any script fun for that domain. This way you don't have to chmod 777 or

RE: [PHP] can't restart session

2003-07-21 Thread Chris W. Parker
CPT John W. Holmes on Monday, July 21, 2003 1:05 PM said: > Then something is wrong in your code. If you properly clear the > session of all of it's contents, then even if I pass the same session > id on the next page request, it should see me as a new user since > t

[PHP] filesize comparison for upload

2003-07-21 Thread mac-robots
Hello, I have an upload form that will be used for some really large files. I need to ask a couple of questions about the ways of improving the success rate that I have using it. (1) what is the best and most stable method for uploading a large file. Sometimes the transfer peters out. (2) how

Re: [PHP] filesize comparison for upload

2003-07-21 Thread CPT John W. Holmes
> I have an upload form that will be used for some really large files. I need to ask a couple of questions about the ways of improving the success rate that I have using it. > > (1) what is the best and most stable method for uploading a large file. Sometimes the transfer peters out. > > (2) how ca

RE: [PHP] can't restart session

2003-07-21 Thread Gabriel Guzman
> p.s. I'm new to this list as you may have noticed and so far this is the > only list that I've been on that doesn't use the list's address as the > return address. Do I have to manually put it in the To box each time? not at all, just use the "reply-all" feature of your mail client. gabe. --

Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
> What is the point of having a unique ID for each session if the only > thing that matters is the data stored within it? Why have a session id > at all if it can't be used to uniquely track a user? Well, it can, and it does. I guess it's all in how you use it. If my session id is "abcd", then whe

Re: [PHP] Re: Help?

2003-07-21 Thread Curt Zirzow
* Thus wrote Ivo Fokkema ([EMAIL PROTECTED]): > I want to warn you though, PHP depricates the use of register_globals = On, > so it would be recommendable to use your modified script and keep coding > using $_POST, $_GET and these kind of global variables. So php is removing that feature? Curt

Re: [PHP] SQL select

2003-07-21 Thread Curt Zirzow
* Thus wrote Jiøí Nìmec ([EMAIL PROTECTED]): > > and I need only first row of each component order by type. so: > > cooler aa1317 f > cpu cpu177 f > gk NULL i > mb mb f > ram me1112 f > > has somebody some idea hot to select? Suggestion: invest in a SQL book. Curt -- "I used to think I wa

Re: [PHP] help with ad serving

2003-07-21 Thread Curt Zirzow
* Thus wrote electroteque ([EMAIL PROTECTED]): > hi there my next project at work is to build an ad server for both image and > flash , i am storing each ad entry into a banner_ads table then another > table media to store each of the banners into which links to the banner , > although in the creat

Re: [PHP] Register Globals

2003-07-21 Thread Curt Zirzow
* Thus wrote stfmoreau ([EMAIL PROTECTED]): > (ii) Even better: > > // _GET > if (isset($_GET)) > extract($_GET); Cool.. ya learn somthing every day... thanks.. Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://w

Re: [PHP] Help with Date

2003-07-21 Thread Curt Zirzow
* Thus wrote Ford, Mike [LSS] ([EMAIL PROTECTED]): > > -Original Message- > > From: Adam Voigt [mailto:[EMAIL PROTECTED] > > Sent: 21 July 2003 14:29 > > > > echo(date('U',strtotime('next Friday'))); > > Actually, for this upcoming Friday, that'd just be > >echo(date('U

Re: [PHP] Help with Date

2003-07-21 Thread Curt Zirzow
* Thus wrote Adam Voigt ([EMAIL PROTECTED]): > Umm. > > echo(date('U',strtotime('next Friday'))); I prefer: while(1) echo(date('U', strtotime('Saturday')); Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP] can't restart session

2003-07-21 Thread Chris W. Parker
CPT John W. Holmes on Monday, July 21, 2003 1:32 PM said: > Well, it can, and it does. I guess it's all in how you use it. If my > session id is "abcd", then when I log out, your program should erase > all of the data in the session and forget that it ever knew about

[PHP] Re: How to..

2003-07-21 Thread ComexEP
... I agree with everyone else... if you want, you can make a function with switch... but there's no point really... <[EMAIL PROTECTED]> Haseeb: > hi, > i have heard a lot of people commenting about the coding style of > other programmers. i think everyone has his own style. but i also say > that

[PHP] Problem with Adding info into an array

2003-07-21 Thread Phillip Blancher
In making an array: I have 7 checkboxes, which make up the array information. I currently use implode to make the array, however that array only consists of the information that it checked. What I need to do now is make it so the array will always be 7 items, but if there isnt a checkbox for the

Re: [PHP] CSV import

2003-07-21 Thread Curt Zirzow
* Thus wrote jwulff ([EMAIL PROTECTED]): > When using something like this: > LOAD DATA LOCAL INFILE '/tmp/phpKBjUWb' INTO TABLE `indoma` FIELDS > TERMINATED BY ',' LINES TERMINATED BY '\r\n' > > How do I also insert a field not in the CSV. For example there are 8 fields > in the CSV and 9 in the

Re: [PHP] Changing numbers

2003-07-21 Thread Curt Zirzow
* Thus wrote zavaboy ([EMAIL PROTECTED]): > I have the following numbers: > > 12.400 > 666.75 > 23 > 369.2 > 3.234 > > How can I make them have at least 2 decimal places? > So, they will output: > > 12.40 > 666.75 > 23.00 > 269.20 > 3.234 > > Thanks in advance! http://php.net/number_format or

Re: [PHP] IE Issues

2003-07-21 Thread Curt Zirzow
* Thus wrote Stephen ([EMAIL PROTECTED]): > Hello, > > This is a little off topic but I do need some help. I have had IE 6 for > about a month now (just got a new computer in June and have been using IE6 > since). When I first started running it, it was fine. A few weeks ago, > though, all my font

RE: [PHP] Re: How to..

2003-07-21 Thread Chris W. Parker
ComexEP on Monday, July 21, 2003 1:48 PM said: >> this is the problem, i have thought of the solution i.e. divide the >> functions into files. and then include only that file that has the >> function. but i thought i would ask you people how you handle this. >> may b

Re: [PHP] Changing numbers

2003-07-21 Thread justin gruenberg
Curt Zirzow wrote: * Thus wrote zavaboy ([EMAIL PROTECTED]): I have the following numbers: 12.400 666.75 23 369.2 3.234 How can I make them have at least 2 decimal places? So, they will output: 12.40 666.75 23.00 269.20 3.234 Thanks in advance! What I dont understand is that your examples are

Re: [PHP] Re: How to..

2003-07-21 Thread Comex
<[EMAIL PROTECTED]> Chris W. Parker: > ComexEP > on Monday, July 21, 2003 1:48 PM said: > >>> this is the problem, i have thought of the solution i.e. divide the >>> functions into files. and then include only that file that has the >>> function. but i thought i would

Re: [PHP] Problem with Adding info into an array

2003-07-21 Thread CPT John W. Holmes
> I have 7 checkboxes, which make up the array information. I currently use > implode to make the array, however that array only consists of the > information that it checked. > > What I need to do now is make it so the array will always be 7 items, but if > there isnt a checkbox for the item, I wa

Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
> In my first post I showed that one of the versions of the logout page > that I used had this line in it. > > setcookie("user_info","",(time()-3600),"/"); > > Shouldn't that take care of the cookie? Like someone else said, that'll take care of a cookie called "user_info". Your session cookie is n

Re: [PHP] Re: How to..

2003-07-21 Thread Doug La Farge
<[EMAIL PROTECTED]> Haseeb: hi, i have heard a lot of people commenting about the coding style of other programmers. i think everyone has his own style. but i also say that there should be a standard that should be followed by everyone. A nice idea that can never fly. It might work for basic pro

RE: [PHP] Changing numbers

2003-07-21 Thread Roger B.A Klorese
> From: justin gruenberg [mailto:[EMAIL PROTECTED] > Subject: Re: [PHP] Changing numbers > > > Curt Zirzow wrote: > > >* Thus wrote zavaboy ([EMAIL PROTECTED]): > > > > > >>I have the following numbers: > >> > >>12.400 > >>666.75 > >>23 > >>369.2 > >>3.234 > >> > >>How can I make them have at

[PHP] Oracle Odbc Connection Problem

2003-07-21 Thread angel
I'm trying to connect to a oracle database using the " Microsoft ODBC for Oracle " driver with the followin script: "; exit; } if ($result = odbc_Exec($conn, $query)) { print "Query returned : " . odbc_num_rows($result) . " rows"; odbc_result_all($result, "border = 1"

[PHP] Trouble connection to Postgres DB

2003-07-21 Thread Nelson Ferreira Jr
Hi, I have PHP 4.3.1 and PostgreSQL 7.3 running in a Mandrake 9.1 workstation. When trying to connect to the DB, the PHP execution just blocks in pg_connect() call, and it remain blocked for several minutes - until I cancel the request. Sometimes the call completes, but I am not sure i

[PHP] MIME decoder for use as the target of an Alias?

2003-07-21 Thread Larry Rosenman
I've got a strange request, maybe one of the experts here can help? I need to be able to take a mail message on stdin, bust it up into headers, and the constituent mime-parts if any, and be able to parse the headers, and get at any text/plain (or only) part, and shove the headers and text/plain

Re: [PHP] Changing numbers

2003-07-21 Thread Brad Pauly
Roger B.A Klorese wrote: * Thus wrote zavaboy ([EMAIL PROTECTED]): I have the following numbers: 12.400 666.75 23 369.2 3.234 How can I make them have at least 2 decimal places? So, they will output: 12.40 666.75 23.00 269.20 3.234 What's so hard about this? He wants two or more *significant*

[PHP] Re: MIME decoder for use as the target of an Alias?

2003-07-21 Thread James Rodenkirch
There are classes built into PEAR that handle that Larry Rosenman wrote: I've got a strange request, maybe one of the experts here can help? I need to be able to take a mail message on stdin, bust it up into headers, and the constituent mime-parts if any, and be able to parse the headers, and

RE: [PHP] Changing numbers

2003-07-21 Thread Roger B.A Klorese
> From: Brad Pauly [mailto:[EMAIL PROTECTED] > Sent: Monday, July 21, 2003 2:45 PM > To: Roger B.A Klorese > Cc: 'justin gruenberg'; 'Curt Zirzow'; 'PHP-General' > Subject: Re: [PHP] Changing numbers > > > I am not sure what he is after, but I don't think it has to do with > significant figures

Re: [PHP] Auto session timeout

2003-07-21 Thread John W. Holmes
Hardik Doshi wrote: > There is still one problem. On so many forms on my education intranet application, students are submitting the final projects with the supporting documents and images. Once they submit the final project, my script is performing serveral error checking for the file size, exten

[PHP] Socket programming with PHP risky?

2003-07-21 Thread René Fournier
I've noticed in the PHP docs "EXPERIMENTAL" is marked over all the socket functions. Would it be risky to develop a PHP socket app using those functions? It seems they could change with the next release and my app would instantly stop working. On the other hand, I've found a lot of tutorials ex

[PHP] Running PHP as CGI

2003-07-21 Thread David Goodchild
Can someone direct me as to how to install PHP on a linux system as CGI? I wish to attempt to use posix_setuid() functions. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] fsockopen

2003-07-21 Thread Doug La Farge
Is there a way to get fsockopen to suppress the header information it returns. I have no use for the crap, have no idea how to use a regexp to get it out of there (nor does anyone on this list it would seem either). I'd like to be able to grab a web page as it is presented to the browsers (as

[PHP] backtick operator and zombie processes

2003-07-21 Thread jeff
When using the backtick operator: $rsh = split("\n", `rsh 10.0.0.2 sysstat -c 5 -xs 5 2>&1 /dev/null 2>&1 nagios1484 0.7 1.2 6416 3176 ?S15:44 0:00 \_ /usr/local/bin/php /home/jeff/at.php nagios1537 0.0 0.3 1952 848 ?S15:44 0:00 \_ s

[PHP] same operation to multiple files

2003-07-21 Thread jwulff
I've built a CSV parser that I want to run on every file in a folder. How do I do this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Converting a MySQL result into a complex array

2003-07-21 Thread jwulff
How would I take the results of the following MySQL statement and put it into an array as follows? SELECT * FROM numbers WHERE type=`1`; SELECT * FROM numbers WHERE type=`2`; $example_data = array( array("1",25,8), array("2",10,8) ); All the results of type=`1` would be in the first nested arr

[PHP] replacing everything between 2 strings

2003-07-21 Thread Matt Palermo
Is there a way to replace everything between 2 given strings if it exists? Say I have: $str = "replace anything and everything in here."; Now I want to replace everything between the word "replace" and "here.", so the new string could read something like this: $str = "replace NOTHING here.";

RE: [PHP] replacing everything between 2 strings

2003-07-21 Thread Daryl Meese
look into opendir and readdir with opendir you can open a handle to a directory and use readdir in a loop to look at every file (fopen or whatever to load each file) then parse your files. readdir may help you verify the files you are working on at least have the right extension. Daryl -Ori

RE: [PHP] replacing everything between 2 strings

2003-07-21 Thread Matt Palermo
That doesn't really help much... I think you just replied to the wrong post. That answer really doesn't have anything to do with my question, I don't think... Thanks anyway. Matt -Original Message- From: Daryl Meese [mailto:[EMAIL PROTECTED] Sent: Monday, July 21, 2003 8:09 PM To: Mat

Re: [PHP] Converting a MySQL result into a complex array

2003-07-21 Thread Curt Zirzow
* Thus wrote jwulff ([EMAIL PROTECTED]): > How would I take the results of the following MySQL statement and put it > into an array as follows? > > SELECT * FROM numbers WHERE type=`1`; > SELECT * FROM numbers WHERE type=`2`; > > $example_data = array( > array("1",25,8), > array("2",10,8) > );

Re: [PHP] Register Globals

2003-07-21 Thread Justin French
What is your aim? a) to have the site *work* on a server with rg off, or; b) to re-engineer your site to be safer and more secure, taking advantage of the REASONS rg was turned off by default? If it's a, then look at my example on weberdev, or just switch them back on with something like a .ht

[PHP] Re: News Reader

2003-07-21 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Could someone advise me of a good news reader. I'm using MS Outlook at the > moment, and if I reply to any post it sends it to the users email and not to > the news server. Plus, its not that great in general terms. > > Thanks > > Dave

Re: [PHP] replacing everything between 2 strings

2003-07-21 Thread Curt Zirzow
* Thus wrote Matt Palermo ([EMAIL PROTECTED]): > Is there a way to replace everything between 2 given strings if it > exists? Say I have: > > $str = "replace anything and everything in here."; > > Now I want to replace everything between the word "replace" and "here.", > so the new string coul

Re: [PHP] same operation to multiple files

2003-07-21 Thread Curt Zirzow
* Thus wrote jwulff ([EMAIL PROTECTED]): > I've built a CSV parser that I want to run on every file in a folder. How > do I do this? For starters, no sense in re-inventing the wheel: http://php.net/fgetcsv Second : http://php.net/dir Curt -- "I used to think I was indecisive, but now I'm

[PHP] Re: same operation to multiple files

2003-07-21 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I've built a CSV parser that I want to run on every file in a folder. How > do I do this? Get the filenames with opendir() and readdir() and go from there. Cheers -- Quod subigo farinam -- PHP General Mailing List (http://www.php.n

[PHP] Re: Running PHP as CGI

2003-07-21 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Can someone direct me as to how to install PHP on a linux system as CGI? I > wish to attempt to use posix_setuid() functions. > > Thanks If you are compiling from source, use your normal configure but without reference to --with-apxs

Re: [PHP] fsockopen

2003-07-21 Thread Curt Zirzow
* Thus wrote Doug La Farge ([EMAIL PROTECTED]): > Is there a way to get fsockopen to suppress the header information it > returns. I have no use for the crap, have no idea how to use a regexp > to get it out of there (nor does anyone on this list it would seem > either). I have plenty of use f

[PHP] Re: replacing everything between 2 strings

2003-07-21 Thread Lee Doolan
> "Matt" == Matt Palermo <[EMAIL PROTECTED]> writes: Matt> Is there a way to replace everything between 2 given strings Matt> if it exists? Say I have: Matt> $str = "replace anything and everything in here."; Matt> Now I want to replace everything between the word "replace

Re: [PHP] Socket programming with PHP risky?

2003-07-21 Thread Curt Zirzow
* Thus wrote René Fournier ([EMAIL PROTECTED]): > I've noticed in the PHP docs "EXPERIMENTAL" is marked over all the > socket functions. Would it be risky to develop a PHP socket app using > those functions? It seems they could change with the next release and > my app would instantly stop worki

Re: [PHP] Socket programming with PHP risky?

2003-07-21 Thread Chris Shiflett
--- Curt Zirzow <[EMAIL PROTECTED]> wrote: > > On the other hand, I've found a lot of tutorials extolling PHP's > > socket functions, and since I know PHP a bit now I would rather > > use it for my TCP socket application than learn C and implement > > it there. > > > > What do you think? > > if y

Re: [PHP] Socket programming with PHP risky?

2003-07-21 Thread Curt Zirzow
* Thus wrote Chris Shiflett ([EMAIL PROTECTED]): > > Disclaimer: Things listed as experimental should always be treated as such and > never relied upon to have a consistent API or not break. > > That said, I recall that the current sockets extension maintainer desires to > label the extension sta

[PHP] controlling winamp with COM

2003-07-21 Thread John Herren
Is there any way to control an open winamp application in php? I want to use php as a scheduler to play Winamp. The API has system calls to do so, but I don't know how to implement the windows calls. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsu

Re: [PHP] controlling winamp with COM

2003-07-21 Thread Diego Fulgueira
Look, i don't know if you already received a reply for your message, but i can tell you i know a lot about PHP and i have absolutely no idea how to do this. I will just remind you that PHP is intended to be used as a server to client technology and that it might have some indirect interaction with

Re: [PHP] controlling winamp with COM

2003-07-21 Thread Robert Cummings
Depending on exactly how you intend to use this technology there are several ways to go about it. One is to create a PHP C extension that you compile into the PHP engine itself -- this I imagine can hook into the API to control the open application. Then you can choose to use these new extension fu

RE: [PHP] controlling winamp with COM

2003-07-21 Thread Joseph Blythe
I know nothing about using php and COM under windows but a good place to start would be: http://www.php.net/manual/en/ref.com.php regards, Joseph > -Original Message- > From: Diego Fulgueira [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 22 July 2003 1:10 PM > To: John Herren; [EMAIL PROTEC

[PHP] feof() problem

2003-07-21 Thread chandrakant Reddy
Hi My Code : "; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir . $_FILES['userfile']['name'])) { print "File is valid, and was successfully uploaded. Here's some more debugging info:\n"; print_r($_FILES); $filename = $uploaddir

[PHP] Array cookie

2003-07-21 Thread Shantanu Oak
Hi, I have written a feed reader for my personal use. The php code given below does work. But it works only with a single feed. How can I save multiple cookies (array?) and display a few more RSS feeds. The example page can be found at... http://shantanuoak.com/test1.php &align=left&width=300&f

<    1   2