4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Used Space Script
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Sat Nov 09, 2002 8:38 pm (15 years ago) Reply with QuoteBack to Top

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.

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Jos
Ex Team Member



Joined: 08 Jan 2002
Posts: 36
Location: The Netherlands

PostPosted: Sun Nov 10, 2002 8:42 pm (15 years ago) Reply with QuoteBack to Top

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 **
OfflineView User's ProfileFind all posts by JosSend Personal MessageVisit Poster's Website
adam
Forum Moderator & Developer



Joined: 26 Jul 2002
Posts: 704
Location: UK

PostPosted: Sun Nov 10, 2002 9:15 pm (15 years ago) Reply with QuoteBack to Top

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...
OfflineView User's ProfileFind all posts by adamSend Personal MessageVisit Poster's Website
Jos
Ex Team Member



Joined: 08 Jan 2002
Posts: 36
Location: The Netherlands

PostPosted: Mon Nov 11, 2002 6:58 am (15 years ago) Reply with QuoteBack to Top

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 **
OfflineView User's ProfileFind all posts by JosSend Personal MessageVisit Poster's Website
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




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.078944 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme