File "diag.php"

Full path: E:/sites/Single15/tinmung2007/webroot/TRUYENGIAO/RTDem14/album/res/diag.php
File size: 3.09 KiB (3160 bytes)
MIME-type:
Charset: utf-8

Download   Open   Back


<?php

//****************************************************************************************
// FotoPlayer Diagnostic tests for Server compatability v1.0
// Author : Dhinakaran Annamalai
// Protected under Creative Commons License. Attribution 2.0 United Kingdom
// Please refer readme.txt file for the usage details. 
//****************************************************************************************

error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors',true);

echo "<font face='Arial' size='2' color='#666666'> <BR><b>FotoPlayer Diagnostic Script:</b><BR><BR><BR>";

echo "<font face='Arial' size='2' color='#111111'>";
echo "PHP version : ". phpversion() ."<br>";
echo "OS : ". php_uname()."<br>";
echo "Server Software : ".$_SERVER['SERVER_SOFTWARE']."<br>";
echo "</font><br><br>";


if (ini_get('safe_mode')) {
   echo "1. PHP  running in Safe mode. Safe mode should be turned off.<BR>";
} else {
   echo "1. PHP  not running in safe mode.<BR>";
}

// Check Shoppingcart folder access

if (is_writable("./shoppingcart")) {
	echo "<BR>2. Shoppingcart folder (/shoppingcart) has got WRITE permission.<BR>";
}
else 
echo "<BR>2. Shoppingcart folder (/shoppingcart) is not writable. Change folder permission to chmod 777 for UNIX/Linux server and for windows use your website controlpanel file manager to set full write access to this folder<BR>";

// Check guestbook  folder access

if (is_writable("./guestbook")) {
	echo "<BR>2. Guestbook folder (/guestbook) has got WRITE permission.<BR>";
}
else 
echo "<BR>2.  Guestbook folder (/guestbook) is not writable. Change folder permission to chmod 777 for UNIX/Linux server and for windows use your website controlpanel file manager to set full write access to this folder<BR>";

// Check rating  folder access

if (is_writable("./rating")) {
	echo "<BR>3. Rating folder (/rating) has got WRITE permission.<BR>";
}
else 
echo "<BR>3.  Rating folder (/rating) is not writable. Change folder permission to chmod 777 for UNIX/Linux server and for windows use your website controlpanel file manager to set full write access to this folder<BR>";

// Check ecard  folder access

if (is_writable("./ecard")) {
	echo "<BR>4. E-Card folder (/ecard) has got WRITE permission.<BR>";
}
else 
echo "<BR>4.  E-Card folder (/ecard) is not writable. Change folder permission to chmod 777 for UNIX/Linux server and for windows use your website controlpanel file manager to set full write access to this folder<BR>";


echo "<br>5. Checking Email notification feature for guestbook and shopping cart order files. Enter email id and click send mail. If you receive the test message php mail is enabled.  <br>";


if (!isset($_POST['from'])) {
echo "<form method='post' action='diag.php'>";
echo " Email address:	<input type='text' name='from' size='35' />";
echo "	<input type='submit' value='Send Mail' />";
echo "</form>";
}

else {
mail($_POST['from'],"test","Ok, it works");
	echo "Script attempted to send a test email. If not received, your server doesn't support php mail() command.<br>";
}
echo "</font>";

exit();
?>

PHP File Manager