|
Author |
Message |
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sat Nov 09, 2002 8:38 pm (21 years, 5 months ago) |
|
I just put together a script to output the amount of space your site is using, in PHP.
To download it, visit http://www.4webhelp.net/scripts/php/space.php
Please let me know if it works, and if not, what errors you get. If you get errors relative to safe mode, I already know about them. |
________________________________
|
|
|
|
Jos
Ex Team Member
Joined: 08 Jan 2002
Posts: 36
Location: The Netherlands
|
Posted:
Sun Nov 10, 2002 8:42 pm (21 years, 5 months ago) |
|
Daniel
Change the line :
$space = $space[0] / 1024;
in
$space = $space[0] / 2048;
Then it's almost the quota that you'll see when you login in the siteadmin.
Sometimes it's gives only 0Mb (when refreshing the browers quickly)
The reason is when using Unix commands in PHP is sometimes a problem because the du command needs time to completed. So it's better to build a time delay before display the output ($space) |
________________________________ Jos
** Team Member ** http://www.josvanras.com ** |
|
|
|
adam
Forum Moderator & Developer
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Sun Nov 10, 2002 9:15 pm (21 years, 5 months ago) |
|
Jos wrote: | Daniel
Change the line :
$space = $space[0] / 1024;
in
$space = $space[0] / 2048;
Then it`s almost the quota that you`ll see when you login in the siteadmin.
Sometimes it`s gives only 0Mb (when refreshing the browers quickly)
The reason is when using Unix commands in PHP is sometimes a problem because the du command needs time to completed. So it`s better to build a time delay before display the output ($space) | I'm a little confused, why divide by 2048 not 1024? |
________________________________ It's turtles all the way down... |
|
|
|
Jos
Ex Team Member
Joined: 08 Jan 2002
Posts: 36
Location: The Netherlands
|
Posted:
Mon Nov 11, 2002 6:58 am (21 years, 5 months ago) |
|
adam wrote: | I'm a little confused, why divide by 2048 not 1024? |
Because Unix systems are working with another blocks as on your local PC. This mean when the output of this script is 10MB then it's not the Space what you'll see on your local PC when you use the property command. The Siteadmin of 34SP show the quota of a PC system. |
________________________________ Jos
** Team Member ** http://www.josvanras.com ** |
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.119161 seconds :: 19 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |