Location: PHPKode > projects > phpMyPrepaid > phpmyprepaid/www/install/step2.php
<?
        aff_header("PhpMyPrepaid Setup Wizard", "Verifying Configuration", 3);
?>
                <table cellpadding="0" cellspacing="0" border="0" width="100%" class="StyleDottedHr">
          <tr>
            <th align="left">Component</th>

            <th style="text-align: right;">Status</th>
          </tr>
          <tr>
            <td><b>PHP Version 5.X supported</b></td>
            <td align="right">
<?
        // Only support for php 4.X (no support for 5.X by now... jur jur)
        $return_false = 0;
                                $php_version = phpversion();

               if(str_replace(".", "", $php_version) < "500" && str_replace(".", "", $php_version) > "611"){
              // if(str_replace(".", "", $php_version) >= "500"){
                 echo "<b><span class=stop>Invalid version ($php_version) Installed</span></b>";
                                  $return_false = 1;
               } else {
            echo "<b><span class=go>OK (ver $php_version)</span></b>";
               }
            ?></td>
          </tr>
                        <?
                /*              
                print $_SESSION['setup_db_type'];
                if (isset($_SESSION['setup_db_type']) && !strcmp($_SESSION['setup_db_type'], "mysql")){
                    $db_name        = "MySQL Database (Not obligatory : may be external database)";
                    $function_name  = "mysql_connect";
                }
                */
                        ?>
          <!--
          <tr>
            <td><strong><?php //echo "$db_name"; ?></strong></td>

            <td align="right"><?php /*
               if( function_exists( $function_name ) ){
                  echo '<b><span class=go>OK</font></b>';
               } else {
                  echo '<b><span class=stop>Not Available</font></b>';
               } */
            ?></td>
          </tr>
          -->
<td><b>Writable PhpMyPrepaid Configuration File (phpmyprepaid.conf.php)</b></td>
            <td align="right"><?
                                if(is_writable('..')){
                        echo '<b><span class="go">OK</font></b>';
                        } else {
                        echo '<b><span class="stop">Warning: Not Writeable by webserver user</font></b>';
                                        echo '<br><b>NOTE:</b> chmod 777 phpmyprepaid_dir/www </b>';
                                $return_false = 1;
               }
            ?></td>
          </tr>
                          <?php
                                $memory_msg     = "";
                                $memory_limit   = ini_get('memory_limit');

                                // logic based on: http://us2.php.net/manual/en/ini.core.php#ini.memory-limit

                                if( $memory_limit == "" ){          // memory_limit disabled at compile time, no memory limit
                                        $memory_msg = "<b><span class=\"go\">OK (No Limit)</span></b>";
                                }
                                else if( $memory_limit == "-1" ){   // memory_limit enabled, but set to unlimited
                                        $memory_msg = "<b><span class=\"go\">OK (Unlimited)</span></b>";
                                }
                                else{
                                        rtrim($memory_limit, 'M');
                                        $memory_limit_int = (int) $memory_limit;
                                        if( $memory_limit_int < 16 ){
                                                $memory_msg = "<b><span class=\"stop\">Warning: $memory_limit (Set this to 16M or larger in your php.ini file)</span></b>";
                                        }
                                        else {
                                                $memory_msg = "<b><span class=\"go\">OK ($memory_limit)</span></b>";
                                        }
                                }
                        ?>
          <tr>
     <td><b>PHP Memory Limit >= 16 MB</b></td>
            <td align="right"><?php print( $memory_msg ); ?></td>
          </tr>
          <tr>
            <td><b>Check for your Operating System</b></td>
            <td align="right"><?
                                if(strncmp($_ENV["OS"], "Windows", 6)){
                                        echo '<b><span class="go">OK</font></b>';
                                } else {
                        echo '<b><span class="stop">OOOOOHH!!! Bad news... I don\'t like your taste.</font></b>';
                        echo '<br>Try with a real SO like Linux or *BSD';
                                    $return_false = 1;
               }
            ?></td>
          </tr>
        </table>
                <?

                aff_middle();
                $str = "<input class='button' type='submit' name='Recheck' value='Recheck' /><input class='button' type='submit' name='goto' value='Back' /><input class='button' type='submit' name='goto' value='Next' id='button_next'";
                if ($return_false)
                        $str .= " disabled";
                $str .= " />";
                print $str;
                aff_footer();
?>
Return current item: phpMyPrepaid