root/dev/install/install_step2.php @ 203

Revision 88, 3.3 KB (checked in by exi, 14 years ago)

Added the new installer and modified readme.txt for this.
The needed SQl data will be supplied later.

Line 
1<?php
2$stoppage = false;
3
4// graphics
5echo '<div class="block-header2">Graphics</div>';
6if (function_exists('imagecreatefromstring'))
7{
8    echo 'GD is available.<br/>';
9    if (!function_exists('imagecreatetruecolor'))
10    {
11        echo 'Your GD is outdated though and will cause problems, please contact your system administrator to upgrade to GD 2.0 or higher.<br/>';
12    }
13    echo 'Now let\'s see if you got the FreeType library needed for painting TrueType .ttf fonts onto images<br/>';
14    if (function_exists('imagettftext'))
15    {
16        echo 'I found FreeType support, this is needed by the signaturemod. Good!<br/>';
17    }
18    else
19    {
20        echo 'Unfortunatly i was unable to locate FreeType support so you cannot use all available signatures. :(<br/>';
21    }
22}
23else
24{
25    echo 'GD is NOT available.<br/>The Killboard will be unable to output character portraits or corporation logos, please speak with your system administrator to install GD 2.0 or higher.<br/>';
26    echo 'However, you can continue the installation but the Killboard might not run smoothly.<br/>';
27}
28
29// directorys
30echo '<br/><div class="block-header2">Directory structure</div>';
31function checkdir($dir)
32{
33    if (!file_exists($dir))
34    {
35        echo 'Creating '.$dir.' for you...<br/>';
36        mkdir($dir);
37        chmod($dir, 0777);
38    }
39    if (is_writeable($dir))
40    {
41        echo 'Directory '.$dir.' is there and writeable, excellent.<br/>';
42    }
43    else
44    {
45        echo 'I cannot write into '.$dir.', you need to fix that for me before you can continue.<br/>';
46        echo 'Please issue a "chmod 777 '.$dir.'" on the commandline inside of this directory<br/>';
47        global $stoppage;
48        $stoppage = true;
49    }
50}
51
52if (is_writeable('../cache'))
53{
54    echo 'Cache directory is writeable, testing for subdirs now:<br/>';
55    checkdir('../cache/corps');
56    checkdir('../cache/data');
57    checkdir('../cache/map');
58    checkdir('../cache/portraits');
59    checkdir('../cache/templates_c');
60}
61else
62{
63    $stoppage = true;
64    echo 'I cannot write into ../cache, you need to fix that for me before you can continue.<br/>';
65    echo 'Please issue a "chmod 777 ../cache" and "chmod 777 ../cache/*" on the commandline inside of this directory<br/>';
66}
67
68echo '<br/><div class="block-header2">Connectivity</div>';
69// connectivity
70$url = 'http://sync.eve-dev.net/?a=sync_server';
71if (ini_get('allow_url_fopen'))
72{
73    echo 'allow_url_fopen is on, i will try to fetch a testpage from "'.$url.'".<br/>';
74    if (count(file($url)))
75    {
76        echo 'Seems to be ok, i got the file.<br/>';
77    }
78    else
79    {
80        echo 'I could not get the file this might be a firewall related issue or the eve-dev server is not available.<br/>';
81    }
82}
83else
84{
85    include('../common/class.http.php');
86    echo 'allow_url_fopen is disabled, nethertheless i will try a socket connect now.<br/>';
87
88    $http = new http_request($url);
89    if ($http->get_content())
90    {
91        echo 'Seems to be ok, i got the file.<br/>';
92    }
93    else
94    {
95        echo 'I could not get the file this might be a firewall related issue or the eve-dev server is not available.<br/>';
96    }
97}
98?>
99
100<?php if ($stoppage)
101{
102    return;
103}?>
104<p><a href="?step=<?php echo ($_SESSION['state']+1); ?>">Next Step</a></p>
Note: See TracBrowser for help on using the browser.