Re: [PHP] file maniputation??

2001-10-04 Thread Mukul Sabharwal

Hi,

It looks most certainly like a file permission error,
however if you have concurrent users maybe it's over
riding the file contents, and screwing up something
somewhere.

So use flock(), a tutorial :

http://www.paphe.com/php/tutorials/111000.php

=
*
Know more about me:
http://www.geocities.com/mimodit
*

__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
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]




Re: [PHP] file maniputation??

2001-10-04 Thread Gerard Samuel

The code is being written for both Unix and windows boxes, so I had to 
include the 'b' option

Maxim Maletsky (PHPBeginner.com) wrote:

 Not sure, but this 'wb' looks suspicious to me.
 
From the manual:
 
 The mode may contain the letter 'b'. This is useful only on systems
 which differentiate between binary and text files (i.e. Windows. It's
 useless on Unix). If not needed, this will be ignored. 
 
 Can you ignore it as well?
 
 Maxim Maletsky
 www.PHPBeginner.com
 
 
 -Original Message-
 From: Gerard Samuel [mailto:[EMAIL PROTECTED]] 
 Sent: mercoledi 3 ottobre 2001 23.08
 To: PHP
 Subject: [PHP] file maniputation??
 
 
 Hey all.  I have a script that uses that creates/manipulates files, and 
 it works great on my end.  Thats no question.  There is a small 
 percentage of my users that when they try to run the file it cannot 
 create or modify files.  I suspected file ownership may be wrong on 
 files and directories.  Just in case Im wrong, what else could be the 
 matter??
 
 Example code.
 $file = foo/bar/example.php;
 $config = array(x, y, z);
 if ($fp = fopen($config_file, wb)) {
  foreach ($config as $line) {
  fwrite($fp, $line\n);
  }
 
 Example error.
 Warning: fopen(foo/bar/example.php,wb) - Permission denied in
 /usr/local/psa/home/vhosts/httpsdocs/install.php on line 3429
 
 Thanks
 
 
 



-- 
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]




RE: [PHP] file maniputation??

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


Not sure, but this 'wb' looks suspicious to me.

From the manual:

The mode may contain the letter 'b'. This is useful only on systems
which differentiate between binary and text files (i.e. Windows. It's
useless on Unix). If not needed, this will be ignored. 

Can you ignore it as well?

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Gerard Samuel [mailto:[EMAIL PROTECTED]] 
Sent: mercoledi 3 ottobre 2001 23.08
To: PHP
Subject: [PHP] file maniputation??


Hey all.  I have a script that uses that creates/manipulates files, and 
it works great on my end.  Thats no question.  There is a small 
percentage of my users that when they try to run the file it cannot 
create or modify files.  I suspected file ownership may be wrong on 
files and directories.  Just in case Im wrong, what else could be the 
matter??

Example code.
$file = foo/bar/example.php;
$config = array(x, y, z);
if ($fp = fopen($config_file, wb)) {
 foreach ($config as $line) {
 fwrite($fp, $line\n);
 }

Example error.
Warning: fopen(foo/bar/example.php,wb) - Permission denied in
/usr/local/psa/home/vhosts/httpsdocs/install.php on line 3429

Thanks


-- 
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]



-- 
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]