[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 //You must enter YOUR email address ($myemail on line below). 3 $myemail ="YOUR_EMAIL_ADDRESS_GOES_HERE"; 4 5 // **************************************************************** 6 // * TECHSUPP.PHP 7 // * v1.2h March 21, 2007 8 // * 9 // * Tech Support tool to collect server and Zen Cart config info 10 // * Results can then be reported when requesting tech support on 11 // * the Zen Cart forums at www.zen-cart.com 12 // * 13 // * This file can be uploaded to /zencart and run directly 14 // * as http://myserver.com/zencart/techsupp.php 15 // * OR 16 // * This file can be uploaded to anywhere on your server, and it 17 // * will report system info, but will skip the Zen Cart specific items. 18 // * 19 // * Contributed by: DrByte 20 // * @version $Id: techsupp.php 6531 2007-06-26 00:55:30Z drbyte $ 21 // ***************************************************************** 22 // * v1.2h- added SCRIPT_URI to the list of reported data 23 // * v1.2g- removed requirement for Register Globals in order to use email test 24 // * v1.2f- added ability to list suggested paths for specific Zen Cart configure.php parameters 25 // * v1.2e- minor bugfixes 26 // * v1.2d- minor bugfixes and code to prevent ZC info if running from zc_install folder 27 // * v1.2c- added support for testing emails via PHP 28 // * v1.2b- added support for checking numerous additional system var's 29 // * v1.2 - added support for checking additional system var's 30 // * (these "may" give errors if safe_mode has ini_get disabled) 31 // * v1.1 - revised to work with or without Zen files available 32 // * - added some CSS for easier reading 33 // ***************************************************************** 34 35 // If the email you send is properly received, then your mailserver (PHP) configuration settings are fine. 36 // If the emails you send from this tool are "not" received, then you should check with your 37 // webhosting provider to see whether there are special requirements for sending mail 38 // or perhaps you need to use an authentication method such as SMTPAUTH (which this tool cannot test). 39 // Further, you might check the mailserver logs to see what happens to your messages 40 // if they are not being received at the destination you entered in $myemail above. 41 42 43 44 // suppress errors 45 error_reporting(E_ALL & ~E_NOTICE); 46 if (!isset($PHP_SELF)) $PHP_SELF = $_SERVER['PHP_SELF']; 47 48 ?> 49 <html><head> 50 <title>Technical Support -- System Specs</title> 51 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 52 <style type="text/css"> 53 <!-- 54 h1 { 55 color: #B56224; 56 } 57 h2 { 58 color: #D67732; 59 } 60 h3 { 61 color: #D67630; 62 } 63 .red { 64 color: #FF0000; 65 font-weight: bolder; 66 } 67 .green {color: #009900; 68 font-weight: bolder; 69 } 70 --> 71 </style> 72 </head> 73 74 <body> 75 <?php if ($myemail !='YOUR_EMAIL_ADDRESS_GOES_HERE' && $myemail !='') { ?> 76 <form method="POST" action="<?php echo basename(__FILE__); ?>"> 77 78 <!-- DO NOT change ANY of the php sections --> 79 <?php 80 ?> 81 Your Name: <input type="text" name="visitor" size="35"><br> 82 Your Email: <input type="text" name="visitormail" size="35"><br><br> 83 Mail Message:<br> 84 <textarea name="notes" rows=4 cols=40>You may optionally enter a message here.</textarea><br> 85 <input type="submit" name="submit" VALUE="Send Mail"> 86 </form> 87 88 89 <?php 90 $em_visitormail = (isset($_POST['visitormail'])) ? $_POST['visitormail'] : ''; 91 $em_visitor = (isset($_POST['visitor'])) ? $_POST['visitor'] : ''; 92 $em_notes = (isset($_POST['notes'])) ? strip_tags($_POST['notes']) : ''; 93 if (!isset($em_visitormail)) echo "Please fill in the fields and click Send.<br>(No content to process yet.) $ip"; 94 95 $todayis = date("l, F j, Y, g:i a"); 96 $subject = "EMAIL SYSTEM -- This is a TEST MESSAGE"; 97 $ipi = $_SERVER['REMOTE_ADDR']; 98 $httprefi = $_SERVER['HTTP_REFERER']; 99 $httpagenti = $_SERVER['HTTP_USER_AGENT']; 100 $message = " $todayis \n 101 Message: " . $em_notes . "\n 102 From: $em_visitor ($em_visitormail)\n 103 This email is a simple verification test to demonstrate that your server's \"PHP\" method for sending mail is working properly. If you have received this message, then it is likely that your Zen Cart shop can easily use the \"PHP\" method for Email Transport in your Admin->Configuration->Email Options area. \n\n 104 Additional Info : IP = $ipi \n 105 Browser Info: $httpagenti \n 106 Referral : $httprefi \n 107 "; 108 109 $from = "From: $myemail\r\n"; 110 111 if ($myemail != "" && isset($_POST['submit']) && $em_visitormail != '' ) { 112 mail($myemail, $subject, $message, $from); 113 ?> 114 115 <p align=center><b> 116 Date: <?php echo $todayis; ?> 117 <br> 118 Thank You : <?php echo $em_visitor ?> ( <?php echo $em_visitormail; ?> ) 119 <br> 120 <?php echo $ip; ?></b> 121 122 <br><br> 123 <a href="<?php echo basename(__FILE__); ?>"> Send Another </a> 124 </p> 125 <?php 126 } 127 } else { 128 echo '<span class=green><em>{if you wish to enable email-testing support, please edit this file ('.basename(__FILE__).') and enter your email address at the top on the 3rd line}</span></em><br />'; 129 } 130 ?> 131 132 <h1>Server Configuration Details</h1> 133 134 <h2>Server Info</h2> 135 <ul> 136 <li><strong>Webserver: </strong><?=getenv("SERVER_SOFTWARE")?></li><br /><br /> 137 <?php 138 $disk_freespaceGB=round(@diskfreespace(__FILE__)/1024/1024/1024,2); 139 $disk_freespaceMB=round(@diskfreespace(__FILE__)/1024/1024,2); 140 ?> 141 <li><?php echo '<strong>Server Free Disk Space Reported</strong> = '.$disk_freespaceGB; ?> GB</li><br /><br /> 142 <li><?php echo '<strong>MySQL Version Reported </strong>= '. @mysql_get_server_info(); ?></li> 143 <li><?php echo '<strong>PHP MySQL Support</strong> = '.(function_exists( 'mysql_connect' ) ? ON : OFF); ?></li> 144 <li><?php echo '<strong>PHP PostGres SQL Support</strong> = '.(function_exists( 'pg_connect' ) ? ON : OFF); ?></li> 145 </ul> 146 147 <h2>PHP Info</h2><ul> 148 <li><strong>PHP version: </strong> 149 <?php if (phpversion()=="4.1.2") { 150 echo "<span class='red'>".phpversion()." {You SHOULD upgrade this!}</span>"; 151 } else { 152 echo phpversion(); 153 } ?></li> 154 <li><?php echo '<strong>PHP API version</strong>= '.@php_sapi_name(); ?></li> 155 156 <li><strong>PHP Safe Mode</strong>= 157 <?php if (ini_get("safe_mode")) { 158 echo "<span class='red'>ON</span>"; 159 } else{ 160 echo "OFF"; 161 } ?></li> 162 163 <li><?php echo '<strong>PHP Register Globals</strong> = '.(ini_get('register_globals') ? ON : OFF); ?></li> 164 <li><?php echo '<strong>PHP set_time_limit</strong> (max execution time) = '.ini_get("max_execution_time"); ?></li> 165 <li><?php echo '<strong>PHP Disabled Functions </strong>= '.ini_get("disable_functions"); ?></li> 166 <li><?php echo '<strong>PHP open_basedir </strong>= '.ini_get("open_basedir"); ?></li> 167 <li><?php echo '<strong>PHP Sessions Support </strong>= '.(@extension_loaded('session') ? ON : OFF); ?></li> 168 <li><?php echo '<strong>PHP session.auto_start</strong> = '.(ini_get('session.auto_start') ? ON : OFF); ?></li> 169 <li><?php echo '<strong>PHP session.use_trans_sid</strong> = '.(ini_get('session.use_trans_sid') ? ON : OFF); ?></li> 170 <li><?php echo '<strong>PHP session.save_path = </strong>'.ini_get("session.save_path"); ?></li> 171 <li><?php echo '<strong>PHP Magic_Quotes_Runtime</strong> = '.(@get_magic_quotes_runtime() > 0 ? ON : OFF); ?></li> 172 <li><?php echo '<strong>PHP Output Buffering (gzip)</strong> = '.(@ini_get("output_buffering") > 0 ? ON : OFF); ?></li> 173 <li><?php echo '<strong>PHP GD Support</strong> = '.(@extension_loaded('gd')? ON : OFF); ?></li> 174 <li><?php echo '<strong>PHP ZLIB Support</strong> = '.(@extension_loaded('zlib')? ON : OFF); ?></li> 175 <li><?php echo '<strong>PHP OpenSSL Support</strong> = '.(@extension_loaded('openssl') ? ON : OFF); ?></li> 176 <li><?php echo '<strong>PHP CURL Support</strong> = '.(@extension_loaded('curl') ? ON : OFF); ?></li> 177 <li><?php echo '<strong>PHP File Uploads</strong> = '.(@ini_get('file_uploads') ? ON : OFF); ?></li> 178 <li><?php echo '<strong>PHP File Upload Max Size</strong> = '.@ini_get('upload_max_filesize'); ?></li> 179 <li><?php echo '<strong>PHP Post Max Size</strong> = '.@ini_get('post_max_size'); ?></li> 180 <li><?php echo '<strong>PHP File Upload TMP Dir</strong> = '.ini_get("upload_tmp_dir"); ?></li> 181 <li><?php echo '<strong>PHP XML Support </strong>= '.(function_exists('xml_parser_create') ? ON : OFF); ?></li> 182 <li><?php echo '<strong>PHP FTP Support</strong> = '.(@extension_loaded('ftp') ? ON : OFF); ?></li> 183 <li><?php echo '<strong>PHP PFPRO Support</strong> = '.(@extension_loaded('pfpro') ? ON : OFF); ?></li> 184 <li><?php echo '<strong>PHP Sendmail_FROM</strong> = '.ini_get("sendmail_from"); ?></li> 185 <li><?php echo '<strong>PHP Sendmail_PATH</strong> = '.ini_get("sendmail_path"); ?></li> 186 <li><?php echo '<strong>PHP SMTP Settings</strong> = '.ini_get("SMTP"); ?></li> 187 <li><?php echo '<strong>PHP include_path = </strong>'.ini_get("include_path"); ?></li> 188 189 </ul> 190 <h2>Webserver/Page Info</h2> 191 <ul> 192 <li><?php echo '<strong>HTTP_HOST= </strong>"'.$_SERVER['HTTP_HOST'].'"'; ?></li> 193 <li><?php echo '<strong>HTTPS= </strong>"'.$_SERVER['HTTPS'].'"'; ?></li> 194 <li><?php echo '<strong>HTTP_USER_AGENT= </strong>"'.$_SERVER['HTTP_USER_AGENT'].'"'; ?></li> 195 <li><?php echo '<strong>HTTP_REFERRER= </strong>"'.$_SERVER['HTTP_REFERRER'].'"'; ?></li> 196 <li><?php echo '<strong>HTTP_ACCEPT= </strong>"'.$_SERVER['HTTP_ACCEPT'].'"'; ?></li> 197 <li><?php echo '<strong>HTTP_ACCEPT_LANGUAGE= </strong>"'.$_SERVER['HTTP_ACCEPT_LANGUAGE'].'"'; ?></li> 198 <li><?php echo '<strong>HTTP_ACCEPT_CHARSET= </strong>"'.$_SERVER['HTTP_ACCEPT_CHARSET'].'"'; ?></li> 199 <li><?php echo '<strong>HTTP_KEEP_ALIVE</strong>= "'.$_SERVER['HTTP_KEEP_ALIVE'].'"'; ?></li> 200 <li><?php echo '<strong>HTTP_CONNECTION</strong>= "'.$_SERVER['HTTP_CONNECTION'].'"'; ?></li> 201 <li><?php echo '<strong>PATH</strong>= "'.$_SERVER['PATH'].'"'; ?></li> 202 <li><?php echo '<strong>SERVER_ADMIN</strong>= "'.$_SERVER['SERVER_ADMIN'].'"'; ?></li> 203 <li><?php echo '<strong>SERVER_SOFTWARE</strong>= "'.$_SERVER['SERVER_SOFTWARE'].'"'; ?></li> 204 <li><?php echo '<strong>SERVER_NAME</strong>= "'.$_SERVER['SERVER_NAME'].'"'; ?></li> 205 <li><?php echo '<strong>DOCUMENT_ROOT</strong>= "'.$_SERVER['DOCUMENT_ROOT'].'"'; ?></li> 206 <li><?php echo '<span class=red>SCRIPT_URI= "'.$_SERVER['SCRIPT_URI'].'"</span>'; ?></li> 207 <li><?php echo '<span class=red>REQUEST_URI= "'.$_SERVER['REQUEST_URI'].'"</span>'; ?></li> 208 <li><?php echo '<span class=red>SCRIPT_NAME= "'.$_SERVER['SCRIPT_NAME'].'"</span>'; ?></li> 209 <li><?php echo '<span class=red>PHP_SELF= "'.$_SERVER['PHP_SELF'].'"</span>'; ?></li> 210 <li><?php echo '<span class=red>SCRIPT_FILENAME= "'.$_SERVER['SCRIPT_FILENAME'].'"</span>'; ?></li> 211 <li><?php echo '<span class=red>PATH_TRANSLATED= "'.$_SERVER['PATH_TRANSLATED'].'"</span>'; ?></li> 212 <li><?php echo '<span class=red>PHP __FILE__: "'.__FILE__.'"</span>'; ?></li> 213 <li><?php echo '<span class=red>PHP basename: "'.basename($PHP_SELF).'"</span>'; ?></li> 214 <li><?php echo '<span class=red>PHP dirname(self): "'.dirname($PHP_SELF).'"</span>'; ?></li> 215 <li><?php echo '<strong>SERVER_ADDR</strong>= "'.$_SERVER['SERVER_ADDR'].'"'; ?></li> 216 <li><?php echo '<strong>SERVER_PORT</strong>= "'.$_SERVER['SERVER_PORT'].'"'; ?></li> 217 <li><?php echo '<strong>REMOTE_HOST</strong>= "'.$_SERVER['REMOTE_HOST'].'"'; ?></li> 218 <li><?php echo '<strong>REMOTE_ADDR</strong>= "'.$_SERVER['REMOTE_ADDR'].'"'; ?></li> 219 <li><?php echo '<strong>REMOTE_PORT</strong>= "'.$_SERVER['REMOTE_PORT'].'"'; ?></li> 220 <li><?php echo '<strong>HTTP_X_FORWARDED_FOR</strong>= "'.$_SERVER['HTTP_X_FORWARDED_FOR'].'"'; ?></li> 221 <li><?php echo '<strong>HTTP_CLIENT_IP</strong>= "'.$_SERVER['HTTP_CLIENT_IP'].'"'; ?></li> 222 <li><?php echo '<strong>GATEWAY_INTERFACE</strong>= "'.$_SERVER['GATEWAY_INTERFACE'].'"'; ?></li> 223 <li><?php echo '<strong>SERVER_PROTOCOL</strong>= "'.$_SERVER['SERVER_PROTOCOL'].'"'; ?></li> 224 <li><?php echo '<strong>REQUEST_METHOD</strong>= "'.$_SERVER['REQUEST_METHOD'].'"'; ?></li> 225 <li><?php echo '<strong>QUERY_STRING</strong>= "'.$_SERVER['QUERY_STRING'].'"'; ?></li> 226 <li><?php echo '<strong>SERVER_SIGNATURE</strong>= "'.$_SERVER['SERVER_SIGNATURE'].'"'; ?></li> 227 </ul> 228 229 <h2>Zen Cart SUGGESTED path settings</h2> 230 <ul><h3>/includes/configure.php</h3> 231 <ul> 232 <li><strong>HTTP_SERVER: </strong> <?php echo 'http://'.$_SERVER['SERVER_NAME']; ?></li> 233 <li><strong>HTTPS_SERVER: </strong> <?php echo 'see Note...<span class=red>**</span>'; ?></li> 234 <li><strong>DIR_WS_CATALOG: </strong> <?php echo dirname($PHP_SELF); ?>/</li> 235 <li><strong>DIR_FS_CATALOG: </strong> <?php echo str_replace(basename($PHP_SELF),'',__FILE__); ?></li> 236 <li><strong>DIR_FS_SQL_CACHE: </strong> <?php echo str_replace(basename($PHP_SELF),'',__FILE__); ?>cache/</li> 237 </ul> 238 <h3>/admin/includes/configure.php</h3> 239 <ul> 240 <li><strong>HTTP_SERVER: </strong> <?php echo 'http://'.$_SERVER['SERVER_NAME']; ?></li> 241 <li><strong>HTTPS_SERVER: </strong> <?php echo 'see Note...<span class=red>**</span>'; ?></li> 242 <li><strong>HTTP_CATALOG_SERVER: </strong> <?php echo 'http://'.$_SERVER['SERVER_NAME']; ?></li> 243 <li><strong>HTTPS_CATALOG_SERVER: </strong> <?php echo 'see Note...<span class=red>**</span>'; ?></li> 244 <li><strong>DIR_WS_ADMIN: </strong> <?php echo dirname($PHP_SELF); ?>/admin/</li> 245 <li><strong>DIR_WS_CATALOG: </strong> <?php echo dirname($PHP_SELF); ?>/</li> 246 <li><strong>DIR_FS_ADMIN: </strong> <?php echo str_replace(basename($PHP_SELF),'',__FILE__); ?>admin/</li> 247 <li><strong>DIR_FS_CATALOG: </strong> <?php echo str_replace(basename($PHP_SELF),'',__FILE__); ?></li> 248 <li><strong>DIR_FS_SQL_CACHE: </strong> <?php echo str_replace(basename($PHP_SELF),'',__FILE__); ?>cache/</li> 249 </ul> 250 <span class="red">**</span> NOTE: This depends on your hosting arrangements. Talk to your hosting company for how to configure SSL on your server. 251 <br /></ul> 252 <br /> 253 254 <?php 255 // Report the Zen Cart System info, if available. 256 if (file_exists('includes/application_top.php')) { 257 $path = (substr_count(__FILE__,'zc_install') || file_exists('mysql_zencart.sql')) ? '../' : ''; 258 ?> 259 <h2>Zen Cart System Info:</h2><ul> 260 <h3>System Folder Checkup</h3><ul> 261 <?php 262 //check folders status 263 foreach (array('cache'=>'777 read/write/execute', 264 'images'=>'777 read/write/execute (INCLUDE SUBDIRECTORIES TOO)', 265 'includes/languages/english/html_includes'=>'777 read/write (INCLUDE SUBDIRECTORIES TOO)', 266 'pub'=>'777 read/write/execute', 267 'admin/backups'=>'777 read/write', 268 'admin/images/graphs'=>'777 read/write/execute') 269 as $folder=>$chmod) { 270 $status = (@is_writable($path.$folder))? OK :(UNWRITABLE . ' ' . $chmod); 271 echo '<li><strong>Folder:</strong> '.$path.$folder . ' <strong>' . $status .'</strong></li>'; 272 } ?> 273 </ul> 274 <?php if (substr_count(__FILE__,'zc_install') <1 && !file_exists('mysql_zencart.sql') ) { 275 if (headers_sent) echo 'YOU CAN SAFELY IGNORE THE FOLLOWING "Headers already sent" ERRORS:'; 276 include ('includes/application_top.php'); ?> 277 <h3>From APPLICATION_TOP.PHP</h3><ul> 278 <li><strong>Version: </strong><? echo PROJECT_VERSION_NAME; ?></li><br /> 279 <li><strong>Version Major: </strong><? echo PROJECT_VERSION_MAJOR; ?></li><br /> 280 <li><strong>Version Minor: </strong><? echo PROJECT_VERSION_MINOR; ?></li> 281 </ul> 282 283 <h3>Settings from Zen Cart Database:</h3><ul> 284 <li><strong>Installed Payment Modules: </strong><? echo MODULE_PAYMENT_INSTALLED; ?></li><br /> 285 <li><strong>Installed Order Total Modules: </strong><? echo MODULE_ORDER_TOTAL_INSTALLED; ?></li><br /> 286 <li><strong>Installed Shipping Modules: </strong><? echo MODULE_SHIPPING_INSTALLED; ?></li><br /> 287 <li><strong>Default Currency: </strong><? echo DEFAULT_CURRENCY; ?></li><br /> 288 <li><strong>Default Language: </strong><? echo DEFAULT_LANGUAGE; ?></li><br /> 289 <li><strong>Enable Downloads: </strong><? echo DOWNLOAD_ENABLED; ?></li><br /> 290 <li><strong>Enable GZip Compression: </strong><? echo GZIP_LEVEL; ?></li><br /> 291 <li><strong>Admin Demo Status: </strong><? echo ADMIN_DEMO; ?></li> 292 </ul> 293 <?php 294 } //endif check if we're in zc_install 295 ?> 296 </ul> 297 <?php 298 } //endif exists app_top 299 ?> 300 301 <br /><strong><h2>PHP Modules:</h2></strong><ul> 302 <?php 303 $le = get_loaded_extensions(); 304 foreach($le as $module) { 305 print "<li>$module</li>"; 306 } 307 ?> 308 </ul> 309 <h2>PHP Info</h2><?php phpinfo(); ?> 310 311 <?php 312 echo "<br /><strong>SERVER variables:</strong><br />"; 313 foreach($_SERVER as $key=>$value) { 314 echo "$key => $value<br />"; 315 } 316 // now break it out into objects and arrays, if relevant 317 foreach($_SERVER as $key=>$value) { 318 if (is_object($value)) { 319 foreach($value as $subvalue) { 320 if (is_object($subvalue) || is_array($subvalue)) { 321 foreach($subvalue as $subvalue2) { 322 echo $key.'['.$value.']['.$subvalue.'] => '.$subvalue2.'<br />'; 323 } 324 } else { 325 echo $key.'['.$value.'] => '.$subvalue.'<br />'; 326 } 327 } 328 } else if (is_array($value)) { 329 foreach($value as $subvalue) { 330 if (is_array($subvalue)) { 331 foreach($subvalue as $subvalue2) { 332 echo $key.'['.$value.']['.$subvalue.'] => '.$subvalue2.'<br />'; 333 } 334 } else { 335 echo $key.'['.$value.'] => '.$subvalue.'<br />'; 336 } 337 } 338 } else { 339 // echo "$key => $value<br />"; 340 } 341 } 342 343 ?> 344 345 </body> 346 </html>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 16:45:43 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |