Jump to content
xisto Community
Sign in to follow this  
nightfox1405241487

CentOS: Test Server Reporting Errors!

Recommended Posts

Hello!

I've got a test server launched using CentOS 4.3 Final and installed phpSysInfo on it to monitor it. Well, when I ran it as Debian, I never got the following errors on the output:

common_functions.php 294 file_exists(/proc/scsi/scsi) the file does not exist on your machinecommon_functions.php 294 file_exists(/proc/bus/usb/devices) the file does not exist on your machine
common_functions.php 158 /bin/df /bin/df: `/proc': Permission denied /bin/df: `/sys': Permission denied /bin/df: `/dev/pts': Permission denied /bin/df: `/proc/bus/usb': Permission denied /bin/df: `/dev/shm': Permission denied /bin/df: `/proc/sys/fs/binfmt_misc': Permission denied /bin/df: `/var/lib/nfs/rpc_pipefs': Permission denied


You can see this more formatted properly here: http://forums.xisto.com/no_longer_exists/.

My other (paid) web host uses the EXACT same OS as their server operating system, but yet the output doesn't give those errors: http://forums.xisto.com/no_longer_exists/

If you can help me with my test server, that would be awesome!

[N]F

Edit: Sorry, this is in the wrong forum... I should have put it under the Linux forum!
Edited by nightfox (see edit history)

Share this post


Link to post
Share on other sites

How much Linux experience do you have?First two errors, file does not exist, you should verify if that is true or not. Now the question is, do you really need that in your script, if not, then where it checks for /proc/scsi/scsi and /proc/bus/usb/devices you should test for the condition that they exist before trying to use them, e.g. if(file_exists('/proc/scsi/scsi')) { ... then that part of the code; } and the same with the other. Another reason could be CentOS may have a different file structure, so paths maybe different.The other errors are all related to permission errors and possibly why those other two files don't exist because the script was denied. It's quite a security issue to allow permission for your script to be dealing with it this way, I would suggest using something like using suPHP.Cheers,MC

Share this post


Link to post
Share on other sites

well, I'm sorry to say this, but I'm not that experienced. that's what all of this is for. It is a learning experience so I can easily adapt later on. I'm just sick of always taking "the easy way out." Any idiot can run an IIS server under Windows, heck- the same idiot can use Apache under Windows using the "packs" like PHPTriad or XAMPP. Also, I'd like to migrate over to Linux as much as possible. It's a task, yes, but I have yet to give up on a task. Plus, on the bright side, it's free and open source! You have no idea of how many operating systems are located on my external drive! lolI'll try and get this figured out..[N]F

Share this post


Link to post
Share on other sites

NEVER try to figure out such problems out by chmodding system files.xboxrulz, sorry, but you really shouldn't advice something untill you really know what you are saying :lol: .As mastercomputers said, that first two files really don't exist in CentOS, neither do all the rest. The problem with the message "Permission denied" is that df returns the same exit code to php, no matter file exist or permission is denied. You should either use php version adopted for CentOS, or write it yourself :) , or rewrite your script not using buggy functions. You can also try to point df's output (including stderr) to /dev/null, but I don't know wether it will work. Anyway, it's harmless, not like chmodding sysfiles :lol:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.