Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 2000051

Re: [PHP3] Guys please help me ! From: Ryan Gaul (ryangaul <email protected>)
Date: 05/16/00

$ = fopen('/tmp/info.txt', 'a+');
if (!$) {echo 'Error!!!';exit;}
fwrite($,'OK');
fclose($);

if that's the code, i don't think $ can be a variable all on its own. try $a or
$b. like this

$fp = fopen('/tmp/info.txt', 'a+');
if (!($fp)) {echo 'Error!!!';exit;}
fwrite($fp,'OK');
fclose($fp);

Also, looks like the webserver can't read or write where you're trying to read and write.
The error -
Warning: SAFE MODE Restriction in effect. The script whose uid is 26900 is not
allowed to access /tmp/info.txt owned by uid 0 in
/web/sites/120/phpeditor/www.phpeditor.f2s.com/test.php3 on line 7

says that the script can't access /tmp/info.txt because it's owned by root (uid
0) and your webserver is uid 26900. If you can't change the permissions in
/tmp, write the file somewhere below the webserver root, and give the webserver
read/write permissions to that directory.

hope that helps.

Ryan Gaul

  On Tue, 16 May 2000, Marian Vasile wrote:
> User: phpeditor
> Password: 1busines
>
> www.phpeditor.f2s.com
>
> Why test.php3 from tmp directory is not working ?
>
> ,----------------------.---------------------------------.
> / Marian Vasile \ Web sites: /
> / softglitter <email protected> \ http://mariancos.tripod.com /
> / marian_2001 <email protected> \ http://marian.8k.com /
> `-----------------------------`------------------------
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Messenger.
> http://im.yahoo.com
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe <email protected>
> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin <email protected>

-- 
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-list-admin <email protected>