[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 <?php 2 /********************************************************************************* 3 * The contents of this file are subject to the SugarCRM Public License Version 1.1.2 4 * ("License"); You may not use this file except in compliance with the 5 * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL 6 * Software distributed under the License is distributed on an "AS IS" basis, 7 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 8 * the specific language governing rights and limitations under the License. 9 * The Original Code is: SugarCRM Open Source 10 * The Initial Developer of the Original Code is SugarCRM, Inc. 11 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.; 12 * All Rights Reserved. 13 * Contributor(s): ______________________________________. 14 ********************************************************************************/ 15 /********************************************************************************* 16 * $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/install/1checkSystem.php,v 1.16 2005/03/08 12:01:36 samk Exp $ 17 * Description: Executes a step in the installation process. 18 ********************************************************************************/ 19 20 //get php configuration settings. requires elaborate parsing of phpinfo() output 21 ?> 22 <html> 23 <?php 24 25 26 ob_start(); 27 eval("phpinfo();"); 28 $info = ob_get_contents(); 29 ob_end_clean(); 30 31 foreach(explode("\n", $info) as $line) { 32 if(strpos($line, "Client API version")!==false) 33 $mysql_version = trim(str_replace("Client API version", "", strip_tags($line))); 34 } 35 36 37 38 39 40 41 42 43 44 ob_start(); 45 phpinfo(INFO_GENERAL); 46 $string = ob_get_contents(); 47 ob_end_clean(); 48 49 $pieces = explode("<h2", $string); 50 $settings = array(); 51 foreach($pieces as $val) 52 { 53 preg_match("/<a name=\"module_([^<>]*)\">/", $val, $sub_key); 54 preg_match_all("/<tr[^>]*> 55 <td[^>]*>(.*)<\/td> 56 <td[^>]*>(.*)<\/td>/Ux", $val, $sub); 57 preg_match_all("/<tr[^>]*> 58 <td[^>]*>(.*)<\/td> 59 <td[^>]*>(.*)<\/td> 60 <td[^>]*>(.*)<\/td>/Ux", $val, $sub_ext); 61 foreach($sub[0] as $key => $val) { 62 if (preg_match("/Configuration File \(php.ini\) Path /", $val)) { 63 $val = preg_replace("/Configuration File \(php.ini\) Path /", '', $val); 64 $phpini = strip_tags($val); 65 } 66 } 67 68 } 69 70 $gd_info_alternate = 'function gd_info() { 71 $array = Array( 72 "GD Version" => "", 73 "FreeType Support" => 0, 74 "FreeType Support" => 0, 75 "FreeType Linkage" => "", 76 "T1Lib Support" => 0, 77 "GIF Read Support" => 0, 78 "GIF Create Support" => 0, 79 "JPG Support" => 0, 80 "PNG Support" => 0, 81 "WBMP Support" => 0, 82 "XBM Support" => 0 83 ); 84 $gif_support = 0; 85 86 ob_start(); 87 eval("phpinfo();"); 88 $info = ob_get_contents(); 89 ob_end_clean(); 90 91 foreach(explode("\n", $info) as $line) { 92 if(strpos($line, "GD Version")!==false) 93 $array["GD Version"] = trim(str_replace("GD Version", "", strip_tags($line))); 94 if(strpos($line, "FreeType Support")!==false) 95 $array["FreeType Support"] = trim(str_replace("FreeType Support", "", strip_tags($line))); 96 if(strpos($line, "FreeType Linkage")!==false) 97 $array["FreeType Linkage"] = trim(str_replace("FreeType Linkage", "", strip_tags($line))); 98 if(strpos($line, "T1Lib Support")!==false) 99 $array["T1Lib Support"] = trim(str_replace("T1Lib Support", "", strip_tags($line))); 100 if(strpos($line, "GIF Read Support")!==false) 101 $array["GIF Read Support"] = trim(str_replace("GIF Read Support", "", strip_tags($line))); 102 if(strpos($line, "GIF Create Support")!==false) 103 $array["GIF Create Support"] = trim(str_replace("GIF Create Support", "", strip_tags($line))); 104 if(strpos($line, "GIF Support")!==false) 105 $gif_support = trim(str_replace("GIF Support", "", strip_tags($line))); 106 if(strpos($line, "JPG Support")!==false) 107 $array["JPG Support"] = trim(str_replace("JPG Support", "", strip_tags($line))); 108 if(strpos($line, "PNG Support")!==false) 109 $array["PNG Support"] = trim(str_replace("PNG Support", "", strip_tags($line))); 110 if(strpos($line, "WBMP Support")!==false) 111 $array["WBMP Support"] = trim(str_replace("WBMP Support", "", strip_tags($line))); 112 if(strpos($line, "XBM Support")!==false) 113 $array["XBM Support"] = trim(str_replace("XBM Support", "", strip_tags($line))); 114 } 115 116 if($gif_support==="enabled") { 117 $array["GIF Read Support"] = 1; 118 $array["GIF Create Support"] = 1; 119 } 120 121 if($array["FreeType Support"]==="enabled"){ 122 $array["FreeType Support"] = 1; } 123 124 if($array["T1Lib Support"]==="enabled") 125 $array["T1Lib Support"] = 1; 126 127 if($array["GIF Read Support"]==="enabled"){ 128 $array["GIF Read Support"] = 1; } 129 130 if($array["GIF Create Support"]==="enabled") 131 $array["GIF Create Support"] = 1; 132 133 if($array["JPG Support"]==="enabled") 134 $array["JPG Support"] = 1; 135 136 if($array["PNG Support"]==="enabled") 137 $array["PNG Support"] = 1; 138 139 if($array["WBMP Support"]==="enabled") 140 $array["WBMP Support"] = 1; 141 142 if($array["XBM Support"]==="enabled") 143 $array["XBM Support"] = 1; 144 145 return $array; 146 147 }'; 148 149 ?> 150 151 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 152 <html> 153 <head> 154 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 155 <title>vtiger CRM 5 - Configuration Wizard - Installation Check</title> 156 <link href="include/install/install.css" rel="stylesheet" type="text/css"> 157 </head> 158 159 <body class="small cwPageBg" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"> 160 161 <br><br><br> 162 <!-- Table for cfgwiz starts --> 163 164 <table border=0 cellspacing=0 cellpadding=0 width=80% align=center> 165 <tr> 166 <td class="cwHeadBg" align=left><img src="include/install/images/configwizard.gif" alt="Configuration Wizard" hspace="20" title="Configuration Wizard"></td> 167 <td class="cwHeadBg" align=right><img src="include/install/images/vtigercrm5.gif" alt="vtiger CRM 5" title="vtiger CRM 5"></td> 168 </tr> 169 </table> 170 <table border=0 cellspacing=0 cellpadding=0 width=80% align=center> 171 <tr> 172 <td background="include/install/images/topInnerShadow.gif" align=left><img src="include/install/images/topInnerShadow.gif" ></td> 173 174 </tr> 175 </table> 176 <table border=0 cellspacing=0 cellpadding=10 width=80% align=center> 177 <tr> 178 <td class="small" bgcolor="#4572BE" align=center> 179 <!-- Master display --> 180 <table border=0 cellspacing=0 cellpadding=0 width=97%> 181 <tr> 182 <td width=20% valign=top> 183 184 <!-- Left side tabs --> 185 <table border=0 cellspacing=0 cellpadding=10 width=100%> 186 <tr><td class="small cwUnSelectedTab" align=right><div align="left">Welcome</div></td></tr> 187 <tr><td class="small cwSelectedTab" align=right><div align="left"><b>Installation Check</b></div></td></tr> 188 <tr><td class="small cwUnSelectedTab" align=right><div align="left">System Configuration</div></td></tr> 189 <tr><td class="small cwUnSelectedTab" align=right><div align="left">Confirm Settings</div></td></tr> 190 <tr><td class="small cwUnSelectedTab" align=right><div align="left">Config File Creation</div></td></tr> 191 <tr><td class="small cwUnSelectedTab" align=right><div align="left">Database Generation</div></td></tr> 192 <tr><td class="small cwUnSelectedTab" align=right><div align="left">Finish</div></td></tr> 193 </table> 194 195 </td> 196 <td width=80% valign=top class="cwContentDisplay" align=left> 197 <!-- Right side tabs --> 198 <table border=0 cellspacing=0 cellpadding=10 width=100%> 199 <tr><td class=small align=left><img src="include/install/images/confWizInstallCheck.gif" alt="Pre Installation Check" title="Pre Installation Check"><br> 200 <hr noshade size=1></td></tr> 201 <tr> 202 <td align=left class="small" style="padding-left:20px"> 203 <table cellpadding="10" cellspacing="1" width="90%" border="0" class="small" style="background-color:#cccccc"> 204 <tr bgcolor="#efefef"><td colspan=2><span style="color:#003399"><strong>Core Components</strong></span></td></tr> 205 <tr bgcolor="#fafafa"> 206 <td valign=top ><strong>PHP version</strong><BR></td> 207 <td valign=top bgcolor="white"><?php $php_version = phpversion(); echo (str_replace(".", "", $php_version) < "430") ? "<strong><font color=\"#FF0000\">Failed.</strong><br> Invalid version ($php_version) Installed</font>" : "<strong><font color=\"#00CC00\">Passed</strong><br>Version $php_version Installed</font>"; ?></td> 208 </tr> 209 <tr bgcolor="#fafafa"> 210 <td valign=top ><strong>IMAP Support Availability</strong></td> 211 <td valign=top bgcolor=white><?php echo function_exists('imap_open')?"<strong><font color=\"#00CC00\">Passed</strong><br>IMAP library available</font>":"<strong><font color=\"#FF0000\">Failed</strong><br>Not Available</font>";?></td> 212 </tr> 213 <tr bgcolor="#fafafa"> 214 <td valign=top ><strong>GD graphics library</strong><br> version 2.0 or later</td> 215 <td valign=top bgcolor="white"><?php 216 if (!extension_loaded('gd')) { 217 echo "<strong><font size=-1 color=\"#FF0000\">GD Graphics Library not configured. </strong>.<br>Check out our <a href='http://sourceforge.net/docman/?group_id=107819'>online documentation</a> for tips on enabling this library. You can ignore this error and continue your vtiger CRM installation, however the chart images simply won't work.</font>"; 218 } 219 else { 220 if (!function_exists('gd_info')) 221 { 222 eval($gd_info_alternate); 223 } 224 $gd_info = gd_info(); 225 226 if (isset($gd_info['GD Version'])) { 227 $gd_version = $gd_info['GD Version']; 228 $gd_version=preg_replace('%[^0-9.]%', '', $gd_version); 229 230 if ($gd_version > "2.0") { 231 echo "<strong><font color=\"#00CC00\">Passed</strong><br>Version $gd_version Installed</font>"; 232 } 233 else { 234 echo "<strong><font color=\"#00CC00\">Passed</strong><br>Version $gd_version Installed.</font>"; 235 } 236 } 237 else { 238 echo "<strong><font size=-1 color=\"#FF0000\">GD Library available, but not properly configured in your PHP installation</strong>.<br>You can ignore this error and continue your vtiger CRM installation, however the chart images simply won't work.</font>"; 239 } 240 } 241 ?> 242 </td> 243 </tr> 244 <tr bgcolor="#efefef"><td colspan=2><strong><span style="color:#003399">Read/Write Access</span></strong></td></tr> 245 <tr bgcolor="#fafafa"> 246 <td valign=top ><strong>PHP Configuration</strong><br>(config.inc.php)</strong></td> 247 <td valign=top bgcolor="white" ><?php echo (is_writable('./config.inc.php') || is_writable('.'))?"<strong><font color=\"#00CC00\">Writeable</font>":"<strong><font color=\"#FF0000\">Failed</strong><br>Not Writeable</font>"; ?></td> 248 </tr> 249 <tr bgcolor="#fafafa"> 250 <td valign=top ><strong>Cache Directory </strong> <br>(cache/)</td> 251 <td valign=top bgcolor="white" ><?php echo (is_writable('./cache/'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</font></strong>"; ?></td> 252 </tr> 253 254 <tr bgcolor="#fafafa"> 255 <td valign=top ><strong>Uploads Directory</strong><br> (storage/)</td> 256 <td valign=top bgcolor="white"><?php echo (is_writable('./storage/'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</strong> <br>You might experience problems with the file vtiger_attachments feature. Refer <a href=http://www.vtiger.com/forums/viewtopic.php?t=24&highlight=permission>File vtiger_attachments issue</a> for more details </font>"; ?></td> 257 </tr> 258 <tr bgcolor="#fafafa"> 259 <td valign=top ><strong>Install Directory</strong><br> (install/)</td> 260 <td valign=top bgcolor="white"><?php echo (is_writable('./install/'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</strong> <br>You might experience problems with the last step of installation.</font>"; ?></td> 261 </tr> 262 <tr bgcolor="#fafafa"> 263 <td valign=top ><strong>Installation file</strong><br> (install.php)</td> 264 <td valign=top bgcolor="white"><?php echo (is_writable('./install.php'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</strong> <br>You might experience problems with the last step of installation.</font>"; ?></td> 265 </tr> 266 <tr bgcolor="#fafafa"> 267 <td valign=top ><strong>Tabdata File Permission </strong><br> (tabdata.php) </td> 268 <td valign=top bgcolor="white"><?php echo (is_writable('./tabdata.php'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</strong> <br>You will not be able to work with the product</font>";?></td> 269 </tr> 270 271 <tr bgcolor="#fafafa"> 272 <td valign=top ><strong>ParentTabdata File Permission </strong><br> (parent_tabdata.php) </td> 273 <td valign=top bgcolor="white"><?php echo (is_writable('./parent_tabdata.php'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</strong> <br>You will not be able to work with the product</font>";?></td> 274 </tr> 275 276 <tr bgcolor="#fafafa"> 277 <td valign=top ><strong>User Privileges</strong><br> (user_privileges/)</td> 278 <td valign=top bgcolor="white"><?php echo (is_writable('./user_privileges/'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</strong><br> You will not be able to login </font>"; ?></td> 279 </tr> 280 281 282 <tr bgcolor="#fafafa"> 283 <td valign=top ><strong>Smarty Cache Directory </strong><br> (Smarty/cache)</td> 284 <td valign=top bgcolor="white"><?php echo (is_writable('./Smarty/cache/'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</strong>";?></td> 285 </tr> 286 <tr bgcolor="#fafafa"> 287 <td valign=top ><strong>Smarty Compile Directory </strong><br> (Smarty/templates_c)</td> 288 <td valign=top bgcolor="white"><?php echo (is_writable('./Smarty/templates_c/'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</strong> <br>You will not be able to login </font>";?></td> 289 </tr> 290 291 <tr bgcolor="#fafafa"> 292 <td valign=top ><strong>Email Templates Directory</strong><br> (modules/Emails/templates/)</td> 293 <td valign=top bgcolor="white"><?php echo (is_writable('./modules/Emails/templates/'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</strong><br> You might experience problems with the email templates feature. Refer <a href= http://www.vtiger.com/forums/viewtopic.php?t=388&highlight=permission>Email templates issue </a> for more details </font>"; ?></td> 294 </tr> 295 296 <tr bgcolor="#fafafa"> 297 <td valign=top ><strong>Mail Merge Template Directory </strong><br>(test/wordtemplatedownload/)</td> 298 <td valign=top bgcolor="white"><?php echo (is_writable('./test/wordtemplatedownload/'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</strong><br> You might experience issues with the word template feature. Visit <a href=\"http://www.vtiger.com/discussions/viewtopic.php?p=2200#2200\" target=\"_blank\">forums</a> for more details </font>"; ?></td> 299 </tr> 300 301 <tr bgcolor="#fafafa"> 302 <td valign=top ><strong>Product Image Directory</strong><br> (test/product/)</td> 303 <td valign=top bgcolor="white"><?php echo (is_writable('./test/product/'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</strong> <br>You might experience problems while attaching image for Products.Refer <a href=http://www.vtiger.com/forums/viewtopic.php?t=24&highlight=permission>File vtiger_attachments issue</a> for more details </font>"; ?></td> 304 </tr> 305 <tr bgcolor="#fafafa"> 306 <td valign=top ><strong>User Image Directory</strong><br> (test/user/)</td> 307 <td valign=top bgcolor="white"><?php echo (is_writable('./test/user/'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</strong> <br>You might experience problems while attaching image for Users. Refer <a href=http://www.vtiger.com/forums/viewtopic.php?t=24&highlight=permission>File vtiger_attachments issue</a> for more details </font>"; ?></td> 308 </tr> 309 <tr bgcolor="#fafafa"> 310 <td valign=top ><strong>Contact Image Directory</strong><br> (test/contact/)</td> 311 <td valign=top bgcolor="white"><?php echo (is_writable('./test/contact/'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</strong> <br>You might experience problems while attaching image for Contacts. Refer <a href=http://www.vtiger.com/forums/viewtopic.php?t=24&highlight=permission>File vtiger_attachments issue</a> for more details </font>"; ?></td> 312 </tr> 313 <tr bgcolor="#fafafa"> 314 <td valign=top ><strong>Logo Directory</strong><br> (test/logo/)</td> 315 <td valign=top bgcolor="white"><?php echo (is_writable('./test/logo/'))?"<strong><font color=\"#00CC00\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</strong> <br>You might experience problems with the company logo in the pdf generation. Refer <a href=http://www.vtiger.com/forums/viewtopic.php?t=24&highlight=permission>File vtiger_attachments issue</a> for more details </font>"; ?></td> 316 </tr> 317 318 319 </table> 320 <br><br> 321 <!-- Recommended Settings --> 322 <table cellpadding="10" cellspacing="1" width="90%" border="0" class="small" style="background-color:#cccccc"> 323 <tr bgcolor="#efefef"><td colspan=2><span style="color:#003399"><strong>Recommended Settings: We strongly suggest that you check for the following values in your php.ini file </strong></span></td></tr> 324 <tr bgcolor="#ffffff"> <td valign=top ><strong>Safe Mode Off</strong></tr> 325 <tr bgcolor="#ffffff"> <td valign=top ><strong>Display Errors On</strong></tr> 326 <tr bgcolor="#ffffff"> <td valign=top ><strong>File Uploads On</strong></tr> 327 <tr bgcolor="#ffffff"> <td valign=top ><strong>Register Globals Off</strong></tr> 328 <tr bgcolor="#ffffff"> <td valign=top ><strong>Max Execution Time 600</strong></tr> 329 <tr bgcolor="#ffffff"> <td valign=top ><strong>output_buffering= On</strong></tr> 330 <tr bgcolor="#ffffff"> <td valign=top ><strong>Change the memory limit = 32M</strong></tr> 331 <tr bgcolor="#ffffff"> <td valign=top ><strong>error_reporting = E_WARNING & ~E_NOTICE</strong></tr> 332 <tr bgcolor="#ffffff"> <td valign=top ><strong>allow_call_time_reference = On</strong></tr> 333 <tr bgcolor="#ffffff"> <td valign=top ><strong>log_errors = Off</strong></tr> 334 <tr bgcolor="#ffffff"> <td valign=top ><strong>short_open_tag= On</strong></tr> 335 <tr bgcolor="#ffffff"> <td valign=top ><a href="http://www.vtiger.com/products/crm/help/vtiger_CRM_Linux_Dependencies.pdf" target="_blank">Linux installation pre-requisites</a></tr> 336 </table> 337 </td> 338 </tr> 339 <tr> 340 <td align=center> 341 <form action="install.php" method="post" name="installform" id="form"> 342 <input type="hidden" name="file" value="2setConfig.php" /> 343 <input type="image" src="include/install/images/cwBtnNext.gif" alt="Next" border="0" title="Next" onClick="window.document.installform.submit();"> 344 </form><br> 345 <br></td> 346 </tr> 347 </table> 348 </td> 349 </tr> 350 </table> 351 <!-- Master display stops --> 352 <br> 353 </td> 354 </tr> 355 </table> 356 <table border=0 cellspacing=0 cellpadding=0 width=80% align=center> 357 <tr> 358 359 <td background="include/install/images/bottomGradient.gif"><img src="include/install/images/bottomGradient.gif"></td> 360 </tr> 361 </table> 362 <table border=0 cellspacing=0 cellpadding=0 width=80% align=center> 363 <tr> 364 <td align=center><img src="include/install/images/bottomShadow.jpg"></td> 365 </tr> 366 </table> 367 <table border=0 cellspacing=0 cellpadding=0 width=80% align=center> 368 369 <tr> 370 <td class=small align=center> <a href="http://www.vtiger.com" target="_blank">www.vtiger.com</a></td> 371 </tr> 372 </table> 373 </body> 374 </html>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |