Gossamer Forum
Home : General : Perl Programming :

find PC configuration with perl or php

Quote Reply
find PC configuration with perl or php
Do you know the way to find what is the computer configuration on my host, RAM, CPU and HDD by perl or php?
Quote Reply
Re: [Troja] find PC configuration with perl or php In reply to
Hi,

this php script may help?

<?

echo phpinfo();
?>

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] find PC configuration with perl or php In reply to
Thanks for you answer I find the right script phpSysInfo

in anybody nead them http://phpsysinfo.sourceforge.net/
Quote Reply
Re: [Troja] find PC configuration with perl or php In reply to
Hmm thats quite a useful script.
Quote Reply
Re: [tandat] find PC configuration with perl or php In reply to
Hmm it doesn't seem to work for me. Half the info is missing:

http://www.wiredon.net/sys/index.php
Quote Reply
Re: [RedRum] find PC configuration with perl or php In reply to
Hm...

Sorry I can help you :(

Read the install there is samothing about php.ini maybe there is you problem
Quote Reply
Re: [Troja] find PC configuration with perl or php In reply to
Nah its ok Im writing my own in perl ;)

http://www.wiredon.net/cgi-bin/dev/index.cgi

....and frankly its going to be better than phpSysInfo... Angelic

Last edited by:

RedRum: Feb 1, 2002, 6:16 AM
Quote Reply
Re: [Troja] find PC configuration with perl or php In reply to
Ok whilst I was eating lunch I wrote my own script in perl.

It is attached below for those who want to try it out.

Installation:

Upload all files to the same directory (one cgi script and 3 templates).

Chmod env.cgi to 755 and that's it.

Edit: I should point out it is only for *nix servers and has only been tested on RedHat.

Last edited by:

RedRum: Feb 1, 2002, 8:47 AM
Quote Reply
Re: [RedRum] find PC configuration with perl or php In reply to
Error: (Unix - BSD, Apache 1.3) - 2 different servers

Quote:

Can't read /proc/version: No such file or directory


Works fine on another server running Linux RedHat.

Anyone interested in running it on UNIX systems will probably confront errors as I have.

But decent script, Paul.
========================================
Buh Bye!

Cheers,
Me

Last edited by:

Heckler: Feb 1, 2002, 10:08 AM
Quote Reply
Re: [Heckler] find PC configuration with perl or php In reply to
That's because it will only work on linux machines. *BSD, Solaris, etc use a different /proc.

Adrian
Quote Reply
Re: [Heckler] find PC configuration with perl or php In reply to
To skip past those /proc/ errors on line 164 change:

open P, "</proc/$_[0]" or error("Can't read /proc/$_[0]: $!", 1);

to...

open P, "</proc/$_[0]";

...it should work then but won't show as much information.

....I'll have to investigate the different proc on those other OS's to make it more reliable.

Last edited by:

RedRum: Feb 1, 2002, 12:04 PM