Tag-Archive for » cgi script «

Simple cgi script to check the Server uptime?

The following script you can use to check the Server uptime?

root@Gunjan [/usr/local/apache/cgi-bin]# nano loads
#!/bin/bash

echo Content-type: text/plain
echo

echo $(hostname)
echo “=>”
echo $(uptime)

Problem with cgi script?

Most of the time cgi script is not working properly after uploading by using FTP but script is working fine on local machine, why?

Because you need to be upload cgi script in ASCII Mode and Perl in BINARY Mode to run it without any problem.