Not logged in. · Lost password · Register
Forum: General Help and Support Server Setup RSS
Unable to Install DokuWiki
Avatar
Felix834 #1
Member since Jul 2009 · 4 posts
Group memberships: Members
Show profile · Link to this post
Subject: Unable to Install DokuWiki
Hello,

I've been trying to install dokuwiki 2008-08-05 on a Windows 2003 server.  I've installed php manually according to thge instructions on http://www.iisadmin.co.uk/?p=4.  However, every time I attempt to open the install.php file from Internet Explorer, I end up in an endless do you wnat to open/save the file.  If I attempt to open the file through FireFox, I receive the error below.  I have never used a php installation and don't know were to begin troubleshooting. 
Any idea what may be going on? 

Thanks in advance.
*/ if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/'); if(!defined('DOKU_CONF')) define('DOKU_CONF',DOKU_INC.'conf/'); if(!defined('DOKU_LOCAL')) define('DOKU_LOCAL',DOKU_INC.'conf/'); // check for error reporting override or set error reporting to sane values if (!defined('DOKU_E_LEVEL')) { error_reporting(E_ALL ^ E_NOTICE); } else { error_reporting(DOKU_E_LEVEL); } // kill magic quotes if (get_magic_quotes_gpc() && !defined('MAGIC_QUOTES_STRIPPED')) { if (!empty($_GET)) remove_magic_quotes($_GET); if (!empty($_POST)) remove_magic_quotes($_POST); if (!empty($_COOKIE)) remove_magic_quotes($_COOKIE); if (!empty($_REQUEST)) remove_magic_quotes($_REQUEST); @ini_set('magic_quotes_gpc', 0); define('MAGIC_QUOTES_STRIPPED',1); } @set_magic_quotes_runtime(0); @ini_set('magic_quotes_sybase',0); // language strings require_once(DOKU_INC.'inc/lang/en/lang.php'); $LC = preg_replace('/[^a-z\-]+/','',$_REQUEST['l']); if(!$LC) $LC = 'en'; if($LC && $LC != 'en' ) { require_once(DOKU_INC.'inc/lang/'.$LC.'/lang.php'); } // initialise variables ... $error = array(); $dokuwiki_hash = array( '2005-09-22' => 'e33223e957b0b0a130d0520db08f8fb7', '2006-03-05' => '51295727f79ab9af309a2fd9e0b61acc', '2006-03-09' => '51295727f79ab9af309a2fd9e0b61acc', '2006-11-06' => 'b3a8af76845977c2000d85d6990dd72b', '2007-05-24' => 'd80f2740c84c4a6a791fd3c7a353536f', '2007-06-26' => 'b3ca19c7a654823144119980be73cd77', '2008-05-04' => '1e5c42eac3219d9e21927c39e3240aad', ); // begin output header('Content-Type: text/html; charset=utf-8'); ?>

\n"; include(DOKU_INC.'inc/lang/en/install.html'); print "
\n"; } ?>
'.$lang['i_problems'].'

'; print_errors(); print_retry(); }elseif(!check_configs()){ echo '

'.$lang['i_modified'].'
'; print_errors(); }elseif($_REQUEST['submit']){ if(!check_data($_REQUEST['d'])){ print_errors(); print_form($_REQUEST['d']); }elseif(!store_data($_REQUEST['d'])){ echo '

'.$lang['i_failure'].'
'; print_errors(); }else{ echo '

'.$lang['i_success'].'
'; } }else{ print_form($_REQUEST['d']); } ?>
driven by DokuWiki powered by PHP
/>
*/ function store_data($d){ global $LC; $ok = true; $d['policy'] = (int) $d['policy']; // create local.php $now = date('r'); $output = << # Don't modify the lines above # # Access Control Lists # # Auto-generated by install script # Date: $now EOT; if($d['policy'] == 2){ $output .= "* @ALL 0\n"; $output .= "* @user 8\n"; }elseif($d['policy'] == 1){ $output .= "* @ALL 1\n"; $output .= "* @user 8\n"; }else{ $output .= "* @ALL 8\n"; } $ok = $ok && fileWrite(DOKU_LOCAL.'acl.auth.php', $output); } return $ok; } /** * Write the given content to a file * * @author Chris Smith */ function fileWrite($filename, $data) { global $error; global $lang; if (($fp = @fopen($filename, 'wb')) === false) { $filename = str_replace($_SERVER['DOCUMENT_ROOT'],'{DOCUMENT_ROOT}/', $filename); $error[] = sprintf($lang['i_writeerr'],$filename); return false; } if (!empty($data)) { fwrite($fp, $data); } fclose($fp); return true; } /** * check installation dependent local config files and tests for a known * unmodified main config file * * @author Chris Smith */ function check_configs(){ global $error; global $lang; global $dokuwiki_hash; $ok = true; $config_files = array( 'local' => DOKU_LOCAL.'local.php', 'users' => DOKU_LOCAL.'users.auth.php', 'auth' => DOKU_LOCAL.'acl.auth.php' ); // main dokuwiki config file (conf/dokuwiki.php) must not have been modified $installation_hash = md5(preg_replace("/(\015\012)|(\015)/","\012", @file_get_contents(DOKU_CONF.'dokuwiki.php'))); if (!in_array($installation_hash, $dokuwiki_hash)) { $error[] = sprintf($lang['i_badhash'],$installation_hash); $ok = false; } // configs shouldn't exist foreach ($config_files as $file) { if (@file_exists($file)) { $file = str_replace($_SERVER['DOCUMENT_ROOT'],'{DOCUMENT_ROOT}/', $file); $error[] = sprintf($lang['i_confexists'],$file); $ok = false; } } return $ok; } /** * Check other installation dir/file permission requirements * * @author Chris Smith */ function check_permissions(){ global $error; global $lang; $dirs = array( 'conf' => DOKU_LOCAL, 'data' => DOKU_INC.'data', 'pages' => DOKU_INC.'data/pages', 'attic' => DOKU_INC.'data/attic', 'media' => DOKU_INC.'data/media', 'meta' => DOKU_INC.'data/meta', 'cache' => DOKU_INC.'data/cache', 'locks' => DOKU_INC.'data/locks', 'index' => DOKU_INC.'data/index', 'tmp' => DOKU_INC.'data/tmp' ); $ok = true; foreach($dirs as $dir){ if(!@file_exists("$dir/.") || !@is_writable($dir)){ $dir = str_replace($_SERVER['DOCUMENT_ROOT'],'{DOCUMENT_ROOT}', $dir); $error[] = sprintf($lang['i_permfail'],$dir); $ok = false; } } return $ok; } /** * Check the availability of functions used in DokuWiki and the PHP version * * @author Andreas Gohr */ function check_functions(){ global $error; global $lang; $ok = true; if(version_compare(phpversion(),'4.3.3','<')){ $error[] = sprintf($lang['i_phpver'],phpversion(),'4.3.3'); $ok = false; } $funcs = explode(' ','addslashes basename call_user_func chmod copy fgets '. 'file file_exists fseek flush filesize ftell fopen '. 'glob header ignore_user_abort ini_get mail mkdir '. 'ob_start opendir parse_ini_file readfile realpath '. 'rename rmdir serialize session_start unlink usleep '. 'preg_replace file_get_contents'); if (!function_exists('mb_substr')) { $funcs[] = 'utf8_encode'; $funcs[] = 'utf8_decode'; } foreach($funcs as $func){ if(!function_exists($func)){ $error[] = sprintf($lang['i_funcna'],$func); $ok = false; } } return $ok; } /** * Print language selection * * @author Andreas Gohr */ function langsel(){ global $lang; global $LC; $dir = DOKU_INC.'inc/lang'; $dh = opendir($dir); if(!$dh) return; $langs = array(); while (($file = readdir($dh)) !== false) { if(preg_match('/^[\._]/',$file)) continue; if(is_dir($dir.'/'.$file) && @file_exists($dir.'/'.$file.'/lang.php')){ $langs[] = $file; } } closedir($dh); sort($langs); echo '
'; echo $lang['i_chooselang']; echo ': '; echo ''; echo '
'; } /** * Print gloabl error array * * @author Andreas Gohr */ function print_errors(){ global $error; echo '

    * '; foreach ($error as $err){ echo "$err
      "; } echo '

'; } /** * remove magic quotes recursivly * * @author Andreas Gohr */ function remove_magic_quotes(&$array) { foreach (array_keys($array) as $key) { if (is_array($array[$key])) { remove_magic_quotes($array[$key]); }else { $array[$key] = stripslashes($array[$key]); } } }

Avatar
tomg #2
Member since Jul 2009 · 6 posts
Group memberships: Members
Show profile · Link to this post
That is not an error message that is php code it would suggest to me that you don't have the php mode installed correctly.

create a file called info.php  in your dokuwiki directory.  The file should contain one line as follows.

<?php phpinfo(); ?>

then browser to info.php and you should be a nice page showing you all sorts of information about your php configuration.

If you don't then your php install is broken.

Tom.
Avatar
Felix834 #3
Member since Jul 2009 · 4 posts
Group memberships: Members
Show profile · Link to this post
Thanks Tom,
I created the file and it doesn't contain any info.  Do you have a good guide for the PHP istall?
Avatar
-Martin- #4
Member since Jan 2009 · 422 posts · Location: Bayern Germany
Group memberships: Members
Show profile · Link to this post
http://www.php.net/manual/en/install.windows.php
Linux-Doku.de
Avatar
Felix834 #5
Member since Jul 2009 · 4 posts
Group memberships: Members
Show profile · Link to this post
OK.  What I've discovered my downloads have missing files.  For instance php5isapi.dll is nowhere to be found.  I've downloaded several zipped files an all have been either corrupt or missing at least the same file.  This would explain why nothing is working as it should.  Can you please provide me a link to a solid download?
Thanks,
Avatar
-Martin- #6
Member since Jan 2009 · 422 posts · Location: Bayern Germany
Group memberships: Members
Show profile · Link to this post
http://windows.php.net/download/
Can you try another webrowser for downloading the file? After downloading you also can check the MD5 key.
Linux-Doku.de
Avatar
Felix834 #7
Member since Jul 2009 · 4 posts
Group memberships: Members
Show profile · Link to this post
I've downloaded the files and uzipped it and the php5isapi.dll is still missing.  What's the big issue with running the msi installer?  Will DokuWiki still work if use this method?  Will there be other modifications required after running the installer?
Thanks,
Avatar
-Martin- #8
Member since Jan 2009 · 422 posts · Location: Bayern Germany
Group memberships: Members
Show profile · Link to this post
Why don't download the DLL: http://www.google.com/search?hl=en&q=php5isapi.dll

Here is an IIS install Guide: http://www.dokuwiki.org/install:iis
Linux-Doku.de
Avatar
iansane #9
Member since Jul 2009 · 1 post
Group memberships: Members
Show profile · Link to this post
I think a lot of the problem is with installing PHP. I get nothing but PHP code and then find that the installer didn't configure php.ini or httpd.conf like it should have. I'm doing this on Apache by the way and not IIS. The problem of PHP not working seems to be because the webserver doesn't know where php is and php doesn't know where the doc directory or extensions are from what I've seen in researching my problem. I wish it was as easy as a linux install.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20120620-dev, © 2003-2011 by Yves Goergen
Current time: 2014-04-24, 10:03:15 (UTC +02:00)