[PHP] Php 4 Deleteing Cookies: Trying to set and delete a cookie in samepage

2002-06-06 Thread John Weez


Hi all.

I'm trying to delte a cookie and then set it to a new value in a php 
page. The problem is that once the cookie is set. PHP will not delete it.

I use PhP 4. Here is the code...The pgp file name is testcookie.php...so 
the page goes back to itself again..i'm testing to see my code was 
allowing me to update the cookie to new values...etc...any ideas???

?php
setcookie(username,);
setcookie(username,$username);
?
HTML
BODY
FORM NAME=FORM ACTION=./testcookie.php
Your name:INPUT TYPE=TEXT NAME=username
INPUT TYPE=submit NAME=submit value=submit
/FORM
/BODY
/HTML



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] chown ..opperation not permitted

2002-04-15 Thread John Weez


Hi all,


My config is Apache 1.3 with PhP4 loaded as a module.

I have a script which makes a directory. This directory is owned by 
nobody.nobody because that is what apache runs as. But, I want this 
directory to be owned by a differrent user. So, After making the 
directory i use the php command chown to change the directory ownership. 
Now, I get an error saying opperation not permitted.

  I figured this is because of some security problems... So i try 
dropping in to the shell using teh backtick operator and by also setting 
up sudo to give access to the chown command to user nobodythis does 
not work from my php script BUT, it does work fine if i enter it on a 
shell line...

There must be a simple way that I can implement the chown function in 
php? Any ideas???

John



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] chown ..opperation not permitted

2002-04-15 Thread John Weez



No, user nobody does not have access to chown command. This is part of 
my problem i suspect.

Erik Price wrote:





 Are you saying that when you are logged in as nobody, you can 
 execute chown otheruser directoryname?  If that is so then PHP, 
 which runs under Apache which runs as nobody, should also be able to 
 execute that command. 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] chmod error?

2002-04-10 Thread John Weez


Hi all...I want to change the ownership of a file that is created via 
php..so i uses  chmod command in my php script.. Upon execution of the 
script i get an error saying command not permitted with a line number 
pointing to my chmod command.

I'm running apache as user nobody for security reasons.

any hints as to how i can get chmod to work would be great...

John



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Parsing out numbers from a string

2001-12-30 Thread John Weez


Hi all

I have a small program which captures the output of a webpage and puts the
data in to a string variable.
I then use teh strip tags function of php to clean it up a bit.

then i want to use regular expressions to extract all the numbers from the
page ..they are like this usually numbers.numbers (IE: 40.40 ).

For some reason my expressions are not matching anything in the string
unless i type exactly what i am looking for... could the fact that there
are line reurns in the string be causing a problem? or do i need to
somehow tell php to goto the next line?

I had an older version of the program which saved teh data to a file and
then PhP scanned the file line by line..this worked...but i'm trying to
make a more elegant solution that won;t kill my hard drive faster ;)

Any tips appreciated...

John
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]