blackcell Posted June 21, 2011 Share Posted June 21, 2011 Hey, I am wondering if anybody can point me in the right direction for disk_total_space("E:") to work. I wrote a script to check server resources such as hard drive space because we had an issue with the hard drive filling up. It would send a text to me letting me know. I can't remember but I do believe I had to do some php.ini configuring or something to get this to work. Long story shorter, I am trying to re-create this resource monitor for a home server but it doesn't work. I take it to the server at work(origin of this script) and it works fine but at home with a fresh xampp install, it can't read the drive. I've searched google and this forum. Any help out there? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/239999-php-disk_total_spacee-setting/ Share on other sites More sharing options...
Alex Posted June 21, 2011 Share Posted June 21, 2011 Are you getting any errors or what? You should have error reporting all the way up; put this at the top of the file: error_reporting(E_ALL); Quote Link to comment https://forums.phpfreaks.com/topic/239999-php-disk_total_spacee-setting/#findComment-1232818 Share on other sites More sharing options...
blackcell Posted June 23, 2011 Author Share Posted June 23, 2011 <b>Warning</b>: disk_free_space() [<a href='function.disk-free-space'>function.disk-free-space</a>]: The system cannot find the path specified. in <b>D:\xampp\htdocs\netresmon\ajax\ajax.check.drivespace.php</b> on line <b>28</b><br /> I transported this script from my server at work. It worked. No modification to the files. Checking the same drive letter... Quote Link to comment https://forums.phpfreaks.com/topic/239999-php-disk_total_spacee-setting/#findComment-1233649 Share on other sites More sharing options...
Alex Posted June 23, 2011 Share Posted June 23, 2011 Are you sure you want to check E: and not D:? Quote Link to comment https://forums.phpfreaks.com/topic/239999-php-disk_total_spacee-setting/#findComment-1233651 Share on other sites More sharing options...
blackcell Posted June 23, 2011 Author Share Posted June 23, 2011 I am checking all my drives, C E and D. They are independent running scripts (ajax) updating a status on a page. They are all failing, I only used D as an example. All errors are the same except the drive letter. Quote Link to comment https://forums.phpfreaks.com/topic/239999-php-disk_total_spacee-setting/#findComment-1233917 Share on other sites More sharing options...
efficacious Posted June 23, 2011 Share Posted June 23, 2011 wheres the code? how do you know that you did not forget a piece of the puzzle on your work server? possibly a function that was created by the author of the script that gets included through a file that you did not anticipate. This is the most likely cause of your problem...either that or it has something to do with the way the two servers handle things. In any case we can't help because there has been zero code posted Quote Link to comment https://forums.phpfreaks.com/topic/239999-php-disk_total_spacee-setting/#findComment-1233926 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.