doc/install/windows/auth-server

Version 1 (modified by Robin Jones, 12 years ago)

Installing Auth on Windows XP

Installing WiFiDog on Windows XP

THIS GUIDE IS IN PROGRESS

After a huge effort, I have managed to get WiFidog? Auth running on Windows XP. Here is how I did it...

Perquisites

Installation

Installing Postgres

Run the msi and select all default options, creating users and passwords when prompted.

Installing Apache

Run the msi and select all defaults.

Installing PHP

Run the msi when prompted select “Apache 2.2.x Module”

Make sure ONLY the following Extensions are selected for installation

Installing WiFiDog

Extract Wifidog to “C:\wwwroot\” (create the folder if it doesn't exist)

Extract Smarty using a utility such as 7ZIP to “c:\wwwroot\wifidog-auth\wifidog\lib\”

Configuration

goto Start > All Programs > Apache > httpd.conf

find the line

documentroot = "C:\Program Files\Apache\htdocs"

And replace it with

"document root = C:\wwwroot\wifidog-auth\wifidog"

Work Arounds

Install script freezes at Permissions page:

Replace the following code in install.php (note this may change if install.php is updated)

 
385         $process_info_user_id = posix_getpwuid(posix_getuid()); 
386  
387         if($process_info_user_id){ 
388             $process_username = $process_info_user_id['name']; 
389         } 
390         else { 
391             //Posix functions aren't available on windows 
392             $process_username = 'unknown_user'; 
393         } 
394         $process_info_group_id = posix_getgrgid(posix_getegid()); 
395         if($process_info_group_id){ 
396             $process_group = $process_info_group_id['name']; 
397         } 
398         else { 
399             //Posix functions aren't available on windows 
400             $process_group = 'unknown_group'; 
401         } 
402         $cmd_mkdir = ''; 
403         $cmd_chown = ''; 
404         $error = 0; 
405  
406         print "<p><em>HTTP daemon UNIX username/group</em>: $process_username/$process_group</p>"; 
407         #    print "<p><em>HTTPD group</em>: $process_group<BR</p>"; 
408         print "<p><table BORDER=\"1\"><tr><td><b>Directory</b></td></td><td><b>Owner</b></td><td><b>Writable</b></td></tr>\n"; 
409  
410         foreach ($dir_array as $dir) { 
411             print "<tr><td>$dir</td>"; 
412             if (!file_exists(WIFIDOG_ABS_FILE_PATH . "$dir")) { 
413                 print "<TD COLSPAN=\"2\" STYLE=\"text-align:center;\">Missing</td></tr>\n"; 
414                 $cmd_mkdir .= WIFIDOG_ABS_FILE_PATH . "$dir "; 
415                 $cmd_chown .= WIFIDOG_ABS_FILE_PATH . "$dir "; 
416                 $error = 1; 
417                 continue; 
418             } 
419  
420             $dir_info = posix_getpwuid(fileowner(WIFIDOG_ABS_FILE_PATH . "$dir")); 
421             if($dir_info) { 
422                 $dir_owner_username = $dir_info['name']; 
423             } 
424             else { 
425                 //Posix functions aren't available on windows 
426                 $dir_owner_username = fileowner(WIFIDOG_ABS_FILE_PATH . "$dir"); 
427             } 
428             print "<td>$dir_owner_username</td>"; 
429  
430             if (is_writable(WIFIDOG_ABS_FILE_PATH . "$dir")) { 
431                 print "<td>YES</td>"; 
432             } 
433             else { 
434                 print "<td>NO</td>"; 
435                 $cmd_chown .= WIFIDOG_ABS_FILE_PATH . "$dir "; 
436                 $error = 1; 
437             } 
438             print "</tr>\n"; 
439         } 
440         print "</table>\n"; 

with:

Mandatory PHP extentions are missing:

  • Make sure the right extensions have been installed by going to Start > All Programs > PHP > PHP.ini and check that the missing extensions are referenced.
  • create a file called phpinfo.php in C:\wwwroot\ and add the following code:
    <?
    phpinfo()
    ?>
    

then run the file to make sure PHP is configured correctly

Warning: locale English-UnitedStates?.ISO...

No Work Around yet

WarningSmarty?(Secure)

In classes\SmartyWifidog?.php Find the line

136         $this->security = true; 

and change it to

136         $this->security = false;