/*----------------------------------------------------------------- * * Practical work at the University of Applied Science Winterthur * * Framework for a Webshop in PHP4 * * Professor: Patrik Feisthammel * * Students: José Fontanil Reto Glanzmann * fontajos@zhwin.ch reto.glanzmann@schweiz.org * * Webshop homepage: http://phpserver.zhwin.ch/~fontajos/PA1/index_english.html * * * ---------- Installation documentation in English --------- * * Version: v.1.03d incl. Kategorie Management BETA! (v.1.04) * */---------------------------------------------------------------- This text is a short extract of the chapter 9.2 of the german documtentation of this shop. It also includes the readme-file. The following installation documentation requiers: UNIX / LINUX, APACHE, MySQL It was tested on an Intel/X86 (PII-266MHz, 128MB RAM) SuSE Linux v.7.1, Apach 1.3.14, MySQL 3.23.35 Installing the Webshop Framework in PHP4: -------------------------------------------------- You first have to: 1.) Install a webserver (e.g. apache 1.3.x) 2.) Install the MySQL database 3.) Install PHP4 interpreter (e.g. apache 'plug-in' or in CGI-mode) --> also configure the apache-server 4.) Now copy all the files of the webshop-directory into appropriate directories on the webserver. Instead of hans_muster, it should be your account name or id: /home/hans_muster/Datenbank/ /home/hans_muster/Dokumentation/ (only if you have downloaded it) /home/hans_muster/htdocs/index.html /home/hans_muster/htdocs/index.php /home/hans_muster/htdocs/shop/ 5.) Before you now set up the shop database, you should change the access passwords that your copy of the Webshop-Framework will use. Otherwise, everybody who can read the documentation could have access to your shop database...: 5.1.)In the file htaccess/shop/initialize.php in the row 39: ROW 39: $Database = new TMySQLDatabase("localhost", "shopdb", "shopuser", "gibshop"); 5.2.)In the file htaccess/shop/Admin/ADMIN_initialize.php in the row 42: ROW 42: $Admin_Database = new TMySQLDatabase("localhost", "shopdb", "shopadmin", "machshop"); 5.3)In the Datenbank(means database)-directory in the file shopdb_create.sql in the rows 31 and 33 you also have to change the passwords: ROW 31: VALUES("localhost","shopadmin",PASSWORD('machshop')); ROW 33: VALUES("localhost","shopuser",PASSWORD('gibshop')); --> What do you have to change exactly: gibshop (Shop users) and machshop (Shop admin) 6.) Now we can start to set up the shop database. In the Datenbank-directory type the following command shell expressions: mysql -u root -p <./shopdb_create.sql mysql -u root -p <./shopdb_insert.sql If you want to delete the shop database use this command: mysql -u root -p <./shopdb_del.sql 7.) You should now edit the htaccess configuration file in the ../shop/Admin/ directory and also put a password there that not everybody knows. 8.) You have to create the following links in the according directories. See the shell commands below: cd /home/hans_muster/htdocs/shop/Admin/ ln -s ../USER_SQL_BEFEHLE.php USER_SQL_BEFEHLE.php ln -s ../artikel_def.php artikel_def.php ln -s ../bestellung_def.php bestellung_def.php ln -s ../bild_view.php bild_view.php ln -s ../database.php database.php ln -s ../initialize.php initialize.php ln -s ../Bilder/ Bilder cd ../Frameset/ ln -s ../USER_SQL_BEFEHLE.php USER_SQL_BEFEHLE.php ln -s ../artikel_def.php artikel_def.php ln -s ../database.php database.php ln -s ../initialize.php initialize.php ln -s ../Bilder/ Bilder 9.) To be compatible with the Netscape 4.7x browsers you have to copy the css-file shopstyles.css into the subdirectory Frameset. We're working on a better solution ;-) 10.) We now have to define the access rights for all the files: /home/hans_muster/htdocs/shop/ chown -R root * chmod -R 755 * We have to give the files root, because of the ability to upload pictures (bild_up.php). If you prefer to disable the PHP safe_mode restriction, you can leave this step aside (but we don't recommend it). You can try if you can upload pictures to the database, without changing the owner to root --> There is a possibility that the PHP-developers have fixed this after PHP 4.05. 11.) The last thing to do: Please restart the MySQL database, so that the new users are recognized by the system (...the same as flushing). //------------------------------------------------------------------------------------------------------------ For an updated bugfix history, please visit the shop's homepage: http://phpserver.zhwin.ch/~fontajos/PA1/index_english.html //------------------------------------------------------------------------------------------------------------ If you encounter further problems, please don't hesitate to mail us, we will help as good as we can :-) José Fontanil: fontajos@phpeppershop.com Reto Glanzmann: glanzret@phpeppershop.com //============================================================================================================ jf_v_1_1 27. of August 2001