[PHP] Functions in Safe Mode

2003-08-04 Thread Jay Fitzgerald
My code: echo number_format(filesize(news/final_1.txt));
 
The Warning: Warning: filesize() [
http://www.php.net/function.filesize function.filesize]: SAFE MODE
Restriction in effect. The script whose uid is 17704 is not allowed to
access news/final_1.txt owned by uid 65534 in
/home/***/public_html/news.php on line 10
0
 
The Question: Is there a way to get the file size of files if safe mode
is on? I need to do an IF/ELSE statement so that if the file size is
less than a certain size, then it does not display the text contained in
that file. Am I going about this the wrong way?
 

Jay Fitzgerald, Design Director
- Certified Professional Webmaster (CPW-A)
- Certified Professional Web Designer (CPWDS-A)
- Certified Professional Web Developer (CPWDV-A)
- Certified E-Commerce Manager (CECM-A)
- Certified Web Consultant for Small Business (CWCSB-A)
 
Bayou Internet - http://www.bayou.com http://www.bayou.com/ 
Toll Free: 888.30.BAYOU (22968)
Vox: 318.338.2034 / Fax: 318.338.2506
E-Mail: [EMAIL PROTECTED]
ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf

 


[PHP] Functions in Safe Mode?

2003-08-04 Thread Jay Fitzgerald
My code: echo number_format(filesize(news/final_1.txt));
The Warning: Warning: filesize() [
http://www.php.net/function.filesize function.filesize]: SAFE MODE
Restriction in effect. The script whose uid is 17704 is not allowed to
access news/final_1.txt owned by uid 65534 in
/home/***/public_html/news.php on line 10
0
The Question: Is there a way to get the file size of files if safe mode
is on? I need to do an IF/ELSE statement so that if the file size is
less than a certain size, then it does not display the text contained in
that file. Am I going about this the wrong way?
--
Jay Fitzgerald, Design Director - CPW-A, CPWDS-A, CPWDV-A, CECM-A, CWCSB-A
Bayou Internet - http://www.bayou.com
Toll Free: 888.30.BAYOU (22968)
Vox: 318.338.2034 / Fax: 318.338.2506
E-Mail: [EMAIL PROTECTED]
ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Functions in Safe Mode?

2003-08-04 Thread Jason Sheets
The problem is the owner of the script must be the owner of the file 
that you are accessing.  If you fix your file ownership for your news 
directory or change your php script to be the same owner as the news 
directoryo you will be able to access the files.

Look at the chown command,. you will need to execute it on the command line.

Jason

Jay Fitzgerald wrote:

My code: echo number_format(filesize(news/final_1.txt));
The Warning: Warning: filesize() [
http://www.php.net/function.filesize function.filesize]: SAFE MODE
Restriction in effect. The script whose uid is 17704 is not allowed to
access news/final_1.txt owned by uid 65534 in
/home/***/public_html/news.php on line 10
0
The Question: Is there a way to get the file size of files if safe mode
is on? I need to do an IF/ELSE statement so that if the file size is
less than a certain size, then it does not display the text contained in
that file. Am I going about this the wrong way?


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