2 //required for normal operation because of recent changes in PHP:
5 //turn off PHP compatibility warnings
6 ini_set("session.bug_compat_warn","off");
10 $defhost = 'localhost';
11 $state = $_POST["state"];
13 //Below section is only for variables that require a path.
14 // The $manualPath variable can be edited by 3rd party
15 // installation scripts to manually set path. (this will
16 // allow straightforward use of this script by 3rd party
19 $dumpfile = $manualPath."sql/database.sql";
20 $icd9 = $manualPath."sql/icd9.sql";
21 $conffile = $manualPath."library/sqlconf.php";
22 $conffile2 = $manualPath."interface/globals.php";
23 $gaclConfigFile1 = $manualPath."gacl/gacl.ini.php";
24 $gaclConfigFile2 = $manualPath."gacl/gacl.class.php";
25 $docsDirectory = $manualPath."documents";
26 $billingDirectory = $manualPath."edi";
27 $gaclWritableDirectory = $manualPath."gacl/admin/templates_c";
28 $requiredDirectory1 = $manualPath."interface/main/calendar/modules/PostCalendar/pntemplates/compiled";
29 $requiredDirectory2 = $manualPath."interface/main/calendar/modules/PostCalendar/pntemplates/cache";
30 $gaclSetupScript1 = $manualPath."gacl/setup.php";
31 $gaclSetupScript2 = $manualPath."acl_setup.php";
33 //These are files and dir checked before install for
34 // existence and correct permissions.
35 $writableFileList = array($conffile, $conffile2, $gaclConfigFile1, $gaclConfigFile2);
36 $writableDirList = array($docsDirectory, $billingDirectory, $gaclWritableDirectory, $requiredDirectory1, $requiredDirectory2);
39 include_once($conffile);
43 <TITLE
>OpenEMR Setup Tool
</TITLE
>
44 <LINK REL
=STYLESHEET HREF
="interface/themes/style_blue.css">
48 <span
class="title">OpenEMR Setup
</span
>
53 if (strtolower(ini_get('register_globals')) != 'off' && (bool) ini_get('register_globals')) {
54 echo "It appears that you have register_globals enabled in your php.ini\n" .
55 "configuration file. This causes unacceptable security risks. You must\n" .
56 "turn it off before continuing with installation.\n";
65 <p
>Congratulations
! OpenEMR is now successfully installed
.</p
>
68 <li
>Please restore secure permissions on the four configuration files
: /openemr
/interface/globals
.php
,
69 /openemr
/library
/sqlconf
.php
, /openemr
/gacl
/gacl
.ini
.php
, and /openemr
/gacl
/gacl
.class.php files
.
70 In linux
, recommend changing file permissions with the
'chmod 644 filename' command
.</li
>
71 <li
>To ensure proper functioning of OpenEMR you must make sure your PHP
installation (normally
72 set in your php
.ini file
) has
"display_errors = Off", "register_globals = Off", and
73 "magic_quotes_gpc = Off".</li
>
74 <li
>In order to take full advantage of the patient documents capability you must make sure
75 your PHP
installation (normally set in your php
.ini file
) has
76 "file_uploads enabled", that
"upload_max_filesize" is appropriate
for your
77 use and that
"upload_tmp_dir" is set to a correct value
if the
default of
"/tmp"
78 won
't work on your system.</li>
79 <li>Access controls (php-GACL) are installed for fine-grained security, and can be administered in
80 OpenEMR's admin
->acl menu
.</li
>
81 <li
>Reading openemr
/includes
/config
.php
and openemr
/interface/globals
.php is a good idea
. These files
82 contain many options to choose from including themes
.</li
>
83 <li
>There
's much information and many extra tools bundled within the OpenEMR installation directory.
84 Please refer to openemr/Documentation. Many forms and other useful scripts can be found at openemr/contrib.</li>
85 <li>To ensure a consistent look and feel through out the application using
86 <a href='http
://www.mozilla.org/products/firefox/'>Firefox</a> is recommended.</li>
88 <p
>The
"openemrwebroot/documents" and "openemrwebroot/edi" contain patient information
, and
89 it is important to secure these directories
. This can be done by placing pertinent
.htaccess
90 files in these directories
or by pasting the below in your apache configuration file
:<br
>
91 <
;Directory
"<?php echo realpath($docsDirectory);?>">
;<br
>
94 <
;/Directory
>
;<br
>
95 <
;Directory
"<?php echo realpath($billingDirectory);?>">
;<br
>
98 <
;/Directory
>
;<br
>
101 <b
>The initial OpenEMR user is
"<?php echo $iuser; ?>" and the password is
"pass".</b
>
102 You should change this password
!
105 <a href
='./'>Click here to start using OpenEMR
. </a
>
115 $server = $_POST["server"];
116 $port = $_POST["port"];
117 $dbname = $_POST["dbname"];
118 $root = $_POST["root"];
119 $login = $_POST["login"];
120 $pass = $_POST["pass"];
121 $loginhost = $_POST["loginhost"];
122 $rootpass = $_POST["rootpass"];
123 $iuser = $_POST["iuser"];
124 $iuname = $_POST["iuname"];
125 $igroup = $_POST["igroup"];
126 $openemrBasePath = $_POST["openemrBasePath"];
127 $openemrWebPath = $_POST["openemrWebPath"];
131 if (($config == 1) && ($state != 4)) {
132 echo "OpenEMR is already configured. If you wish to re-configure the SQL server, edit $conffile, or change the 'config' variable to 0, and re-run this script.<br>\n";
138 echo "<b>Step $state</b><br><br>\n";
139 echo "Now I need to know whether you want me to create the database on my own or if you have already created the database for me to use. For me to create the database, you will need to supply the MySQL root password.\n
140 <span class='title'> <br />NOTE: clicking on \"Continue\" may delete or cause damage to data on your system. Before you continue please backup your data.</span>
142 <FORM METHOD='POST'>\n
143 <INPUT TYPE='HIDDEN' NAME='state' VALUE='2'>\n
144 <INPUT TYPE='RADIO' NAME='inst' VALUE='1' checked>Have setup create the database<br>\n
145 <INPUT TYPE='RADIO' NAME='inst' VALUE='2'>I have already created the database<br>\n
147 <INPUT TYPE='SUBMIT' VALUE='Continue'><br></FORM><br>\n";
151 echo "<b>Step $state</b><br><br>\n";
152 echo "Now you need to supply the MySQL server information and path information.
155 <INPUT TYPE='HIDDEN' NAME='state' VALUE='3'>
156 <INPUT TYPE='HIDDEN' NAME='inst' VALUE='$inst'>
158 <TR VALIGN='TOP'><TD COLSPAN=2><font color='red'>MYSQL SERVER:</font></TD></TR>
159 <TR VALIGN='TOP'><TD><span class='text'>Server Host: </span></TD><TD><INPUT TYPE='TEXT' VALUE='$defhost' NAME='server' SIZE='30'></TD><TD><span class='text'>(This is the IP address of the machine running MySQL. If this is on the same machine as the webserver, leave this as 'localhost'.)</span><br></TD></TR>
160 <TR VALIGN='TOP'><TD><span class='text'>Server Port: </span></TD><TD><INPUT TYPE='TEXT' VALUE='3306' NAME='port' SIZE='30'></TD><TD><span class='text'>(The default port for MySQL is 3306.)</span><br></TD></TR>
161 <TR VALIGN='TOP'><TD><span class='text'>Database Name: </span></TD><TD><INPUT TYPE='TEXT' VALUE='openemr' NAME='dbname' SIZE='30'></TD><TD><span class='text'>(This is the name of the OpenEMR database in MySQL - 'openemr' is the recommended)</span><br></TD></TR>
162 <TR VALIGN='TOP'><TD><span class='text'>Login Name: </span></TD><TD><INPUT TYPE='TEXT' VALUE='openemr' NAME='login' SIZE='30'></TD><TD><span class='text'>(This is the name of the OpenEMR login name in MySQL - 'openemr' is the recommended)</span><br></TD></TR>
163 <TR VALIGN='TOP'><TD><span class='text'>Password: </span></TD><TD><INPUT TYPE='PASSWORD' VALUE='' NAME='pass' SIZE='30'></TD><TD><span class='text'>(This is the Login Password for when PHP accesses MySQL - it should be at least 8 characters long and composed of both numbers and letters)</span><br></TD></TR>\n";
165 echo "<TR VALIGN='TOP'><TD><span class='text'>Name for Root Account: </span></TD><TD><INPUT TYPE='TEXT' VALUE='root' NAME='root' SIZE='30'></TD><TD><span class='text'>(This is name for MySQL root account. For localhost, it is usually ok to leave it 'root'.)</span><br></TD></TR>
166 <TR VALIGN='TOP'><TD><span class='text'>Root Pass: </span></TD><TD><INPUT TYPE='PASSWORD' VALUE='' NAME='rootpass' SIZE='30'></TD><TD><span class='text'>(This is your MySQL root password. For localhost, it is usually ok to leave it blank.)</span><br></TD></TR>\n";
167 echo "<TR VALIGN='TOP'><TD><span class='text'>User Hostname: </span></TD><TD><INPUT TYPE='TEXT' VALUE='$defhost' NAME='loginhost' SIZE='30'></TD><TD><span class='text'>(If you run Apache/PHP and MySQL on the same computer, then leave this as 'localhost'. If they are on separate computers, then enter the IP address of the computer running Apache/PHP.)</span><br></TD></TR>";
169 echo "<TR VALIGN='TOP'><TD> </TD></TR>";
170 echo "<TR VALIGN='TOP'><TD COLSPAN=2><font color='red'>OPENEMR USER:</font></TD></TR>";
171 echo "<TR VALIGN='TOP'><TD><span class='text'>Initial User:</span></TD><TD><INPUT SIZE='30' TYPE='TEXT' NAME='iuser' VALUE='admin'></TD><TD><span class='text'>(This is the login name of user that will be created for you. Limit this to one word.)</span></TD></TR>
172 <TR VALIGN='TOP'><TD><span class='text'>Initial User's Name:</span></TD><TD><INPUT SIZE='30' TYPE='TEXT' NAME='iuname' VALUE='Administrator'></TD><TD><span class='text'>(This is the real name of the 'initial user'.)</span></TD></TR>
173 <TR VALIGN='TOP'><TD><span class='text'>Initial Group:</span></TD><TD><INPUT SIZE='30' TYPE='TEXT' NAME='igroup' VALUE='Default'></TD><TD><span class='text'>(This is the group that will be created for your users. This should be the name of your practice.)</span></TD></TR>
175 echo "<TR VALIGN='TOP'><TD> </TD></TR>";
176 echo "<TR VALIGN='TOP'><TD COLSPAN=2><font color='red'>OPENEMR PATHS:</font></TD></TR>";
177 echo "<TR VALIGN='TOP'><TD COLSPAN=3></TD></TR>
178 <TR VALIGN='TOP'><TD><span class='text'>Absolute Path:</span></TD><TD><INPUT SIZE='30' TYPE='TEXT' NAME='openemrBasePath' VALUE='".realpath('./')."'></TD><TD><span class='text'>(This is the full absolute directory path to openemr. The value here is automatically created, and should not need to be modified. Do not worry about direction of slashes; they will be automatically corrected.)</span></TD></TR>
179 <TR VALIGN='TOP'><TD><span class='text'>Relative HTML Path:</span></TD><TD><INPUT SIZE='30' TYPE='TEXT' NAME='openemrWebPath' VALUE='/openemr'></TD><TD><span class='text'>(Set this to the relative html path, ie. what you would type into the web browser after the server address to get to OpenEMR. For example, if you type 'http://127.0.0.1/clinic/openemr/ to load OpenEMR, set this to '/clinic/openemr' without the trailing slash. Do not worry about direction of slashes; they will be automatically corrected.)</span></TD></TR>
183 <INPUT TYPE='SUBMIT' VALUE='Continue'><br></FORM><br>";
190 if ($login == "" ||
!isset($login)) {
191 echo "ERROR. Please pick a proper 'Login Name'.<br>\n";
192 echo "Click Back in browser to re-enter.<br>\n";
195 if (strpbrk($iuser,' ')) {
196 echo "ERROR. The 'Initial User' field can only contain one word and no spaces.<br>\n";
197 echo "Click Back in browser to re-enter.<br>\n";
200 if ($pass == "" ||
!isset($pass)) {
201 echo "ERROR. Please pick a proper 'Password'.<br>\n";
202 echo "Click Back in browser to re-enter.<br>\n";
206 echo "<b>Step $state</b><br><br>\n";
207 echo "Configuring OpenEMR...<br><br>\n";
211 echo "Connecting to MySQL Server...\n";
213 if ($server == "localhost")
214 $dbh = mysql_connect("$server","$root","$rootpass");
216 $dbh = mysql_connect("$server:$port","$root","$rootpass");
218 echo "ERROR. Check your login credentials.\n";
219 echo "<p>".mysql_error()." (#".mysql_errno().")\n";
224 echo "Creating database...\n";
226 if (mysql_query("create database $dbname",$dbh) == FALSE) {
227 echo "ERROR. Check your login credentials.\n";
228 echo "<p>".mysql_error()." (#".mysql_errno().")\n";
233 echo "Creating user with permissions for database...\n";
235 if (mysql_query("GRANT ALL PRIVILEGES ON $dbname.* TO '$login'@'$loginhost' IDENTIFIED BY '$pass'",$dbh) == FALSE) {
236 echo "ERROR when granting privileges to the specified user.\n";
237 echo "<p>".mysql_error()." (#".mysql_errno().")\n";
243 echo "Reconnecting as new user...\n";
247 echo "Connecting to MySQL Server...\n";
249 if ($server == "localhost")
250 $dbh = mysql_connect("$server","$login","$pass");
252 $dbh = mysql_connect("$server:$port","$login","$pass");
255 echo "ERROR. Check your login credentials.\n";
256 echo "<p>".mysql_error()." (#".mysql_errno().")\n";
261 echo "Opening database...";
263 if (mysql_select_db("$dbname",$dbh) == FALSE) {
264 echo "ERROR. Check your login credentials.\n";
265 echo "<p>".mysql_error()." (#".mysql_errno().")\n";
272 echo "Creating initial tables...\n";
273 mysql_query("USE $dbname",$dbh);
275 $fd = fopen($dumpfile, 'r');
277 echo "ERROR. Could not open dumpfile '$dumpfile'.\n";
284 $line = fgets($fd,1024);
285 $line = rtrim($line);
286 if (substr($line,0,2) == "--") // Kill comments
288 if (substr($line,0,1) == "#") // Kill comments
292 $query = $query.$line; // Check for full query
293 $chr = substr($query,strlen($query)-1,1);
294 if ($chr == ";") { // valid query, execute
295 $query = rtrim($query,";");
296 mysql_query("$query",$dbh);
303 echo "Adding Initial User...\n";
305 //echo "INSERT INTO groups VALUES (1,'$igroup','$iuser')<br>\n";
306 if (mysql_query("INSERT INTO groups (id, name, user) VALUES (1,'$igroup','$iuser')") == FALSE) {
307 echo "ERROR. Could not run queries.\n";
308 echo "<p>".mysql_error()." (#".mysql_errno().")\n";
312 if (mysql_query("INSERT INTO users (id, username, password, authorized, lname,fname) VALUES (1,'$iuser','1a1dc91c907325c69271ddf0c944bc72',1,'$iuname','')") == FALSE) {
313 echo "ERROR. Could not run queries.\n";
314 echo "<p>".mysql_error()." (#".mysql_errno().")\n";
320 /* echo "Inserting ICD-9-CM Codes into Database...\n";
322 $fd = fopen($icd9, 'r');
324 echo "ERROR. Could not open dumpfile.\n";
325 echo "<p>".mysql_error()." (#".mysql_errno().")\n";
332 $line = fgets($fd,1024);
333 $line = rtrim($line);
334 if (substr($line,0,2) == "--") // Kill comments
336 if (substr($line,0,1) == "#") // Kill comments
340 $query = $query.$line; // Check for full query
341 $chr = substr($query,strlen($query)-1,1);
342 if ($chr == ";") { // valid query, execute
343 $query = rtrim($query,";");
344 mysql_query("$query",$dbh);
353 echo "<br>Writing SQL Configuration...<br>";
354 @touch
($conffile); // php bug
355 $fd = @fopen
($conffile, 'w');
359 // Referenced from sql.inc
363 $it_died = 0; //fmg: variable keeps running track of any errors
365 fwrite($fd,$string) or $it_died++
;
366 fwrite($fd,"\$host\t= '$server';\n") or $it_died++
;
367 fwrite($fd,"\$port\t= '$port';\n") or $it_died++
;
368 fwrite($fd,"\$login\t= '$login';\n") or $it_died++
;
369 fwrite($fd,"\$pass\t= '$pass';\n") or $it_died++
;
370 fwrite($fd,"\$dbase\t= '$dbname';\n") or $it_died++
;
376 $sqlconf["host"]= $host;
377 $sqlconf["port"] = $port;
378 $sqlconf["login"] = $login;
379 $sqlconf["pass"] = $pass;
380 $sqlconf["dbase"] = $dbase;
381 //////////////////////////
382 //////////////////////////
383 //////////////////////////
384 //////DO NOT TOUCH THIS///
385 $config = 1; /////////////
386 //////////////////////////
387 //////////////////////////
388 //////////////////////////
391 ?
><?
// done just for coloring
393 fwrite($fd,$string) or $it_died++
;
395 //it's rather irresponsible to not report errors when writing this file.
397 echo "ERROR. Couldn't write $it_died lines to config file '$conffile'.\n";
403 echo "Successfully wrote SQL configuration.<BR><br>";
405 echo "Writing OpenEMR webserver paths to config file...<br>";
406 //edit interface/globals.php
407 //first, ensure slashes are in correct direction (windows specific fix)
408 $openemrBasePath = str_replace('\\\\', '/', $openemrBasePath);
409 $openemrBasePath = str_replace('\\', '/', $openemrBasePath);
410 $openemrWebPath = str_replace('\\\\', '/', $openemrWebPath);
411 $openemrWebPath = str_replace('\\', '/', $openemrWebPath);
413 $data = file($conffile2) or die("Could not read ".$conffile2." file.");
416 foreach ($data as $line) {
418 if ((strpos($line,"\$webserver_root = \"")) === false) {
423 $finalData .= "\$webserver_root = \"$openemrBasePath\";\n";
425 if ((strpos($line,"\$web_root = \"")) === false) {
430 $finalData .= "\$web_root = \"$openemrWebPath\";\n";
436 $fd = @fopen
($conffile2, 'w') or die("Could not open ".$conffile2." file.");
437 fwrite($fd, $finalData);
440 echo "Successfully wrote OpenEMR webserver paths to config file<br><br>";
443 echo "<FONT COLOR='red'>ERROR</FONT> writing openemr webserver root paths to config file ($conffile2). ($isCount)<br><br>\n";
446 echo "\n<br>Next step will install and configure access controls (php-GACL).<br>\n";
449 <FORM METHOD='POST'>\n
450 <INPUT TYPE='HIDDEN' NAME='state' VALUE='4'>
451 <INPUT TYPE='HIDDEN' NAME='host' VALUE='$server'>
452 <INPUT TYPE='HIDDEN' NAME='dbname' VALUE='$dbname'>
453 <INPUT TYPE='HIDDEN' NAME='port' VALUE='$port'>
454 <INPUT TYPE='HIDDEN' NAME='login' VALUE='$login'>
455 <INPUT TYPE='HIDDEN' NAME='pass' VALUE='$pass'>
456 <INPUT TYPE='HIDDEN' NAME='iuser' VALUE='$iuser'>
457 <INPUT TYPE='HIDDEN' NAME='iuname' VALUE='$iuname'>
459 <INPUT TYPE='SUBMIT' VALUE='Continue'><br></FORM><br>\n";
465 echo "<b>Step $state</b><br><br>\n";
466 echo "Installing and Configuring Access Controls (php-GACL)...<br><br>";
468 //first, edit two gacl config files
469 echo "Writing php-GACL configuration settings to config files...<br>";
471 $data = file($gaclConfigFile1) or die("Could not read ".$gaclConfigFile1." file.");
473 foreach ($data as $line) {
475 if ((strpos($line,"db_host")) === false) {
479 $finalData .= "db_host = \"${host}\"\n";
481 if ((strpos($line,"db_user")) === false) {
485 $finalData .= "db_user = \"${login}\"\n";
487 if ((strpos($line,"db_password")) === false) {
491 $finalData .= "db_password = \"${pass}\"\n";
493 if ((strpos($line,"db_name")) === false) {
497 $finalData .= "db_name = \"${dbname}\"\n";
503 $fd = @fopen
($gaclConfigFile1, 'w') or die("Could not open ".$gaclConfigFile1." file.");
504 fwrite($fd, $finalData);
507 // edit gacl.class.php
508 $data = file($gaclConfigFile2) or die("Could not read ".$gaclConfigFile2." file.");
510 foreach ($data as $line) {
512 if ((strpos($line,"var \$_db_host = ")) === false) {
516 $finalData .= "var \$_db_host = '$host';\n";
518 if ((strpos($line,"var \$_db_user = ")) === false) {
522 $finalData .= "var \$_db_user = '$login';\n";
524 if ((strpos($line,"var \$_db_password = ")) === false) {
528 $finalData .= "var \$_db_password = '$pass';\n";
530 if ((strpos($line,"var \$_db_name = ")) === false) {
534 $finalData .= "var \$_db_name = '$dbname';\n";
540 $fd = @fopen
($gaclConfigFile2, 'w') or die("Could not open ".$gaclConfigFile2." file.");
541 fwrite($fd, $finalData);
543 echo "Finished writing php-GACL configuration settings to config files.<br><br>";
545 //second, run gacl config scripts
546 require $gaclSetupScript1;
547 require $gaclSetupScript2;
550 //third, give the administrator user admin priviledges
551 $groupArray = array("Administrators");
552 set_user_aro($groupArray,$iuser,$iuname,"","");
553 echo "Gave the '$iuser' user (password is 'pass') administrator access.<br><br>";
555 echo "Done installing and configuring access controls (php-GACL). Click 'continue' to see further instructions.";
557 echo "<br><FORM METHOD='POST'>\n
558 <INPUT TYPE='HIDDEN' NAME='state' VALUE='5'>\n
559 <INPUT TYPE='HIDDEN' NAME='iuser' VALUE='$iuser'>\n
561 <INPUT TYPE='SUBMIT' VALUE='Continue'><br></FORM><br>\n";
567 echo "<p>Welcome to OpenEMR. This utility will step you through the installation and configuration of OpenEMR for your practice.</p>\n";
568 echo "<ul><li>Before proceeding, be sure that you have a properly installed and configured MySQL server available, and a PHP configured webserver.</li>\n";
570 echo "<li>Detailed installation instructions can be found in the <a href='INSTALL' target='_blank'><span STYLE='text-decoration: underline;'>'INSTALL'</span></a> manual file.</li>\n";
572 Echo "<li>If you are upgrading from a previous version, do NOT use this script. Please read the 'Upgrading' section found in the <a href='INSTALL' target='_blank'><span STYLE='text-decoration: underline;'>'INSTALL'</span></a> manual file.</li></ul>";
574 echo "<p>We will now ensure correct file permissions and directories before starting installation:</p>\n";
575 echo "<FONT COLOR='green'>Ensuring following files are world-writable...</FONT><br>\n";
577 foreach ($writableFileList as $tempFile) {
578 if (is_writable($tempFile)) {
579 echo "'".realpath($tempFile)."' file is <FONT COLOR='green'><b>ready</b></FONT>.<br>\n";
582 echo "<p><FONT COLOR='red'>UNABLE</FONT> to open file '".realpath($tempFile)."' for writing.<br>\n";
583 echo "(configure file permissions; see below for further instructions)</p>\n";
587 if ($errorWritable) {
588 echo "<p><FONT COLOR='red'>You can't proceed until all above files are ready (world-writable).</FONT><br>\n";
589 echo "In linux, recommend changing file permissions with the 'chmod 666 filename' command.<br>\n";
590 echo "Fix above file permissions and then click the 'Check Again' button to re-check files.<br>\n";
591 echo "<FORM METHOD='POST'><INPUT TYPE='SUBMIT' VALUE='Check Again'></p></FORM><br>\n";
595 echo "<br><FONT COLOR='green'>Ensuring following directories exist...</FONT><br>\n";
597 foreach ($writableDirList as $tempDir) {
598 if (file_exists($tempDir)) {
599 echo "'".realpath($tempDir)."' directory <FONT COLOR='green'><b>exists</b></FONT>.<br>\n";
602 $tempPath = realpath($tempDir);
603 if ($tempPath == "") {
604 //this is a fix specific to microsoft windows
605 $tempPath = realpath('./').DIRECTORY_SEPARATOR
.$tempDir;
606 $tempPath = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR
, $tempPath);
608 echo "<p><FONT COLOR='red'>UNABLE</FONT> to find directory '".$tempPath."'.<br>\n";
609 echo "(please create directory; see below for further instructions)</p>\n";
613 if ($errorWritable) {
614 echo "<p><FONT COLOR='red'>You can't proceed until all above directories exist.</FONT><br>\n";
615 echo "In linux, recommend using the 'mkdir directory_name' command<br>\n";
616 echo "Add above marked directories and then click the 'Check Again' button to re-check for directories.<br>\n";
617 echo "<FORM METHOD='POST'><INPUT TYPE='SUBMIT' VALUE='Check Again'></p></FORM><br>\n";
621 echo "<br><FONT COLOR='green'>Ensuring following directories have proper permissions...</FONT><br>\n";
623 foreach ($writableDirList as $tempDir) {
624 if (is_writable($tempDir)) {
625 echo "'".realpath($tempDir)."' directory is <FONT COLOR='green'><b>ready</b></FONT>.<br>\n";
628 echo "<p><FONT COLOR='red'>UNABLE</FONT> to open directory '".realpath($tempDir)."' for writing by web server.<br>\n";
629 echo "(configure directory permissions; see below for further instructions)</p>\n";
633 if ($errorWritable) {
634 echo "<p><FONT COLOR='red'>You can't proceed until all directories are ready.</FONT><br>\n";
635 echo "In linux, recommend changing owners of these directories to the web server. For example, in many linux OS's the web server user is 'apache', 'nobody', or 'www-data'. So if 'apache' were the web server user name, could use the command 'chown -R apache:apache directory_name' command.<br>\n";
636 echo "Fix above directory permissions and then click the 'Check Again' button to re-check directories.<br>\n";
637 echo "<FORM METHOD='POST'><INPUT TYPE='SUBMIT' VALUE='Check Again'></p></FORM><br>\n";
641 echo "<br>All required files and directories have been verified. Click to continue installation.<br>\n";
642 echo "<FORM METHOD='POST'><INPUT TYPE='HIDDEN' NAME='state' VALUE='1'><INPUT TYPE='SUBMIT' VALUE='Continue'><br></FORM><br>";