Re: Windows 2000, PHP, mySQL: multiple users and security

From: Date: Fri, 16 Mar 2001 10:26:16 +0000
Subject: Re: Windows 2000, PHP, mySQL: multiple users and security
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-44242@lists.php.net to get a copy of this message
Hello Alain, from my point of view, the easiest way would be to use Apache on Win2k ( I got 1.3.17 installed and running very fine) and use Apache to control access to user home directories which would be restricted realms. As for PHP, sapi module seems to be stable for me. Download the full php 4.0.4Pl1 archive from http://www.php4win.de, unpack to desired directory, move the php4ts.dll to winnt\system32 directory, and copy/move php4apache.dll to apache's modules directory. Then add: LoadModule php4_module modules/php4apache.dll directive to httpd.conf under modules directive, uncomment lines: AddType application/x-httpd-php .php .php3 .phtml .inc .php4 (I add couple more extensions to be sure that all scripts are parsed with php, and inc is important if you use include files) AddType application/x-httpd-php-source .phps And configure apache as desired. Add index.php, default.php to autoindex files, etc. If you don't want to create restricted directories for each group, you could create 16 http.conf files, where the only difference would be webroot and docroot directory. For example using c:\wwwroot as uppermost directory for storing documents, create 16 directories like group01, group02 ... group16 which will be root directories for each group. Then in httpd.conf01 the DocumentRoot will look like this DocumentRoot "c:/webroot/group01" and also Directory directive <Directory "c:/webroot/group01"> For group02 change group01 to group02, etc. Then the only thing you'd need would be copy corresponding httpd.confxy to \apache\conf\httpd.conf and restart apache. Php.ini and my.ini shouldn't need any change. When configuring php, I found one small gotcha, if you want to use curl library, you have to copy SSLeay32.dll and libeay32.dll from \php\dlls to winnt\system32 directory. If you want to use gd functions with gif creations, enable gd_gif.dll in extensions directives. For mysql I'd create one database per group and allow access only to that group. Or allow access to everyone, and assign full rights to the owning group. just my .02 cents. hth Dezider. Alain Fontaine wrote: > Hello, > > My former school has invited me to teach a small course (32 hours) about web > development, and I will of course teach PHP and mySQL. The question I now > have is the following: How shall I best go about installing PHP and mySQL on > a Windows 2000 computer (no Linux, sorry) so that each of the 16 groups of > students have access to their files, databases, etc, without having problems > with security ? I know how to configure mySQL access rights, so that will be > fine. I can also install a small FTP server so that everyone has access to a > subdirectory of the wwwroot directory. But how about PHP? > > If anyone has already done this, I'd be more than happy to hear from you. > Basically, I am in the situation of setting up a "micro hosting provider" > with PHP, mySQL support, running Win2k ;) > > Thanks ! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#44242) next »