Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

test.php

Go to the documentation of this file.
00001 
00002 <style type="text/css">
00003 <!--
00004 h2.info {
00005         color:green;
00006         font-size:20px;
00007 }
00008 h2.error {
00009         color:red;
00010         font-size:20px;
00011 }
00012 -->
00013 </style>
00014 <?php
00015 /*
00016  *   This file is part of PhpCompta.
00017  *
00018  *   PhpCompta is free software; you can redistribute it and/or modify
00019  *   it under the terms of the GNU General Public License as published by
00020  *   the Free Software Foundation; either version 2 of the License, or
00021  *   (at your option) any later version.
00022  *
00023  *   PhpCompta is distributed in the hope that it will be useful,
00024  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00025  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00026  *   GNU General Public License for more details.
00027  *
00028  *   You should have received a copy of the GNU General Public License
00029  *   along with PhpCompta; if not, write to the Free Software
00030  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00031 */
00032 /* $Revision*/
00033 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
00034 include_once("ac_common.php");
00035 include_once("postgres.php");
00036 // Test the connection
00037 $a=DbConnect();
00038 if ( $a==false) {
00039    exit ("<h2 class=\"error\">__LINE__ test has failed !!!</h2>");
00040 
00041 }
00042 if ( ($Res=ExecSql($a,"select  * from ac_users") ) == false ) {
00043         exit ("<h2 class=\"error\">__LINE__ test has failed !!!</h2>");
00044 } else 
00045         print "Connect to database success <br>";
00046 
00047 // Verify some PHP parameters
00048 // magic_quotes_gpc = Off
00049 // magic_quotes_runtime = Off
00050 // magic_quotes_sybase = Off
00051 // include_path
00052 // register_global
00053 foreach (array('magic_quotes_gpc','magic_quotes_runtime') as $a) {
00054 
00055   if ( ini_get($a) == false ) print $a.': Ok  <br>';
00056   else {
00057         print ("<h2 class=\"error\">$a has a bad value  !!!</h2>");
00058   }
00059 
00060 }
00061 if ( ereg("\.\.\/include",ini_get('include_path')) == false )
00062   print ("<h2 class=\"error\">include_path incorrect  !!!".ini_get('include_path')."</h2>");
00063  else
00064    print 'include_path : ok ('.ini_get('include_path').')<br>';
00065 
00066 echo "<h2 class=\"info\"> Congratulation : Test successfull</h2>";
00067 
00068 ?>

Generated on Fri Jun 23 00:12:45 2006 for phpcompta by  doxygen 1.4.4