Example #1
0
function isNewBrowscapVersion()
{
    if (!isset($_SESSION['user_browscap_version'])) {
        $_SESSION['user_browscap_version'] = getCurrentBrowscapRelease();
    }
    if (!isset($_SESSION['server_browscap_version'])) {
        $server_browscap_version = "";
        if (extension_loaded('soap')) {
            $http = new Http();
            $http->setTimeout(2);
            $http->execute("http://www.website-php.com/en/webservices/wsp-information-server.wsdl?wsdl");
            $wsdl = $http->getResult();
            if ($wsdl != "" && find($wsdl, "<?xml", 1) > 0) {
                $client = new WebSitePhpSoapClient("http://www.website-php.com/en/webservices/wsp-information-server.wsdl?wsdl");
                $server_browscap_version = $client->getBrowscapVersionNumber();
            }
        } else {
            /*$http = new Http();
            		$http->setTimeout(2);
            		$http->execute("http://browsers.garykeith.com/versions/version-number.asp");
            		$server_browscap_version = $http->getResult();*/
            $server_browscap_version = "";
        }
        if (trim($server_browscap_version) != "") {
            $_SESSION['server_browscap_version'] = $server_browscap_version;
        }
    }
    if (trim($_SESSION['user_browscap_version']) != trim($_SESSION['server_browscap_version'])) {
        return trim($_SESSION['server_browscap_version']);
    }
    return false;
}
Example #2
0
            }
        }
    }
    if (strlen($tmp_lang) != 2) {
        echo "No language defined in WSP lang folder (" . realpath($lang_folder) . ")\n";
        exit;
    }
    if (!rename('install.htaccess', '.htaccess')) {
        echo "The apache user has no right to rename the file install.htaccess to .htaccess. Please give the rights on this file to finalize the installation.\n";
        exit;
    } else {
        require_once dirname(__FILE__) . "/../class/utils/HTTP.class.php";
        $http = new Http();
        $http->execute(BASE_URL . $tmp_lang . "/");
        $http_error = $http->getError();
        $http_result = $http->getResult();
        if ($http->getStatus() >= 400) {
            rename('.htaccess', 'install.htaccess');
            echo "Please change your configuration to be compatible with <a href='http://www.website-php.com' target='_blank'>WebSite-PHP</a>:<br/>- Webserver needs to support \"<b>AllowOverride <font color='red'>All</font></b>\" for your website directory!<br/>&lt;Directory /your_directory&gt;<br/>&nbsp;&nbsp;&nbsp;AllowOverride all<br/>&lt;/Directory&gt;<br/>Edit the configuration file httpd.conf of your apache server. In this file you need to find the tag \"Directory\" concerning website folder (i.e.: www) and set the property AllowOverride with the parameter \"All\" as explained before.<br/><a href='http://httpd.apache.org/docs/current/mod/core.html#allowoverride' target='_blank'>http://httpd.apache.org/docs/current/mod/core.html#allowoverride</a><br/><br/>\n";
            echo "<b>If you want to use <font color='red'>Alias</font></b> with WebSite-PHP you need to uncomment and configure the line with \"RewriteBase /myAliasName/\" in the file install.htaccess of the framework.<br/><br/>\n";
            echo "If all the previous elements are already configured, then your apache server is configure correctly. But may be, do you have an <b>PHP error</b> (ie: memory_limit).<br/>Please, open your php_error.log file and check if there are no error at the time of your last page refresh. And if you find an erreur, correct it; probably in the configuration file php.ini.<br/>";
            exit;
        }
    }
}
if (!defined('FORCE_SERVER_NAME') || FORCE_SERVER_NAME == "") {
    $array_server_name = explode('.', $_SERVER['SERVER_NAME']);
} else {
    $array_server_name = explode('.', FORCE_SERVER_NAME);
}
if (sizeof($array_server_name) > 1) {