###################################################################### Installation - phpWebSite 0.8.x ###################################################################### Language phpWebSite comes in different languages. Make sure get the language you want to use. Do not use the unprocessed source code of phpWebSite for your site. You will get TRANSLATE[[...]] statements everywhere. Requirements phpWebSite requires PHP v4.0.6 or higher This can be downloaded at: http://www.php.net/ You need to have PHP session support compiled in! You also need to have register globals set to ON! For more info on how to configure those options read the related chapter below. phpWebSite also requires MySQL. This can be downloaded at: http://www.mysql.com/ You must have create privilages on the database you are going to use! ###################################################################### Instructions Installing phpWebSite 0.8.x ###################################################################### 1. Gunzip the phpWebSite tarball into the web directory of your choice. 2. Edit the config.php file to match your system and your preferences. The config.php file is commented to help you with this task. *IMPORTANT* The Database Config section MUST be complete. Decide your database name now. You should at least have a look at security_hash and cookiePrefix, and pay special attention to all path names. 3. Create a database in MySQL using the name you declared for your database in the config.php file above Ex. # mysql -uroot -p mysql> create database database_name; mysql> exit Alternatively, you can also create the database with phpMyAdmin. phpMyAdmin can be downloaded from: http://www.phpwizard.net/projects/phpMyAdmin/ or (better) from SourceForge https://sourceforge.net/projects/phpmyadmin/ 4. Read _carefully_ the notes below about common PHP configuration pitfalls and configure your site or server accordingly, if neeeded 5. Set permissions for the images directory so you can upload images. we recommend the following: # chown -R nobody.nobody images/ # chown -R nobody.nobody mod/mainpage/images/ # chown -R nobody.nobody mod/userpage/images/ # chown -R nobody.nobody mod/userpage/uploads/ This assumes your websever runs as the user "nobody" and that you can do this (i.e. have root access) on your server. If you cannot do this (your running on a host), do folowing: # chmod -R 777 images/ # chmod -R 777 mod/mainpage/images/ # chmod -R 777 mod/userpage/images/ # chmod -R 777 mod/userpage/uploads/ 6. phpWebSite has a completely web-based install - point your browser to: http://your_phpWebSite_powered_site.com and follow the onscreen instructions. 7. Point your web browser at your new phpWebSite powered site. You can administer your site by going to: http://your_phpWebSite_powered_site.com/admin.php and logging in using the following: Username: admin Password: phpwebsite Remember to change the admin password (Edit Admins) in order to protect your site! 8. Delete or move the setup folder when you have confirmed your successful installation. 9. If you want to install the calendar module delivered with the package, you need to point your browser to calendar_setup.php. After you installed the module, you may delete or move the calendar_setup.php files. ###################################################################### Common PHP configuration pitfalls ###################################################################### Chapter index: 1 - Sessions 2 - The register_globals flag 3 - Error meggages handling 1. Sessions ----------- To make phpWebSite work you need PHP to be compiled with session support in. This can only be done at compile time; you can check if sessions support in built-in reading the output of a script like: The are two common issues with sessions, which can be easily solved. a) When you try to validate your site with the W3C XTML validator it outputs a lot of errors like: * Line 77, column 35: ...

php_value session.use_trans_sid 0 Please note that this solution only works with the Apache WebServer If you're using another web server and you find a viable solution to the problem, please report it to the phpWebSite Development Team via online forums or writing to phpWebSite Development Mail-List and we'll add it to this document. - Leave session transient support enabled but make it XHTML compatible: Edit your php.ini and modify it to include the line: arg_separator.output = "&" In some versions of php the above line exists as: ;arg_separator.output = "&" change it to the one listed above. Restart your webserver - Leave session transient support enabled but make it XHTML compatible: If you do not have access neither to PHP itself nor to php.ini (which is typical on hosted domains) you have to create or modify a file named .htaccess in your phpwebsite directory with this content: #php.ini configuration php_value arg_separator.output "&" Please note that this solution only works with the Apache WebServer If you're using another web server and you find a viable solution to the problem, please report it to the phpWebSite Development Team via online forums or writing to phpWebSite Development Mail-List and we'll add it to this document. b) When you access the mainpage of your phpWebSite based site you get errors like: Warning: open(/tmp/sess_b04835d83ff9ee8f0c19a6214827f389, O_RDWR) failed: Permission denied (13) in Unknown on line 0 Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 you can solve this problem in one of these two ways: At first, create a sessions directory in your phpwebsite installation dir Change its attributes and owner to make it safe (usually this is done changing the owner to the one of the webspace or the one which owns the webserver process and then changing directory attributes to 700). - Edit your php.ini and modify it to include the line: session.save_path = whatever_path_you_like In some versions of php the above line exists as: session.save_path = /tmp change it to the one listed above. Be sure that whatever_path_you_like is a directory which can be accessed in read and write mode by PHP Restart your webserver - If you do not have access neither to PHP itself nor to php.ini (which is typical on hosted domains) you have to: create a sessions directory in your phpwebsite installation dir. Change its attributes and owner to make it safe (usually this is done changing the owner to the one of the webspace or the one which owns the webserver process and then changing directory attributes to 700). create or modify a file name .htaccess in your phpwebsite directory with this content: #php.ini configuration php_value session.save_path "./sessions" Please note that this solution only works with the Apache WebServer If you're using another web server and you find a viable solution to the problem, please report it to the phpWebSite Development Team via online forums or writing to phpWebSite Development Mail-List and we'll add it to this document. For more info on the PHP sessions mechanism please read the relative page on the manual: http://www.php.net/manual/en/ref.session.php For more info on the Apache WebServer configuration directives please refer to the Apache WebServer Project homepage: http://httpd.apache.org/ 2. The register_globals flag ---------------------------- In recent versions of PHP, the register_globals flag is set by default to Off. This will cause phpWebSite to be unable to login admins and users successfully. you can solve this problem in one of these two ways: - Edit your php.ini and modify it to include the line: register_globals = On In some versions of php the above line exists as: register_globals = Off change it to the one listed above. Restart your webserver - If you do not have access neither to PHP itself nor to php.ini (which is typical on hosted domains) you have to: create or modify a file name .htaccess in your phpwebsite directory with this content: #php.ini configuration php_flag register_globals on Please note that this solution only works with the Apache WebServer If you're using another web server and you find a viable solution to the problem, please report it to the phpWebSite Development Team via online forums or writing to phpWebSite Development Mail-List and we'll add it to this document. For more info on the PHP setting please read the relative page on the manual: http://www.php.net/manual/en/configuration.php For more info on the Apache WebServer configuration directives please refer to the Apache WebServer Project homepage: http://httpd.apache.org/ 3. Error messages handling -------------------------- Recent versions of PHP come out with a too much aggressive errors report behaviour by default. This will cause phpWebSite to display LOT of errors. you can solve this problem in one of these two ways: - Edit your php.ini and modify it to include the line: error_reporting = E_ALL & ~E_NOTICE In some versions of php the above line exists as: error_reporting = E_ALL change it to the one listed above. Restart your webserver - If you do not have access neither to PHP itself nor to php.ini (which is typical on hosted domains) you have to: create or modify a file name .htaccess in your phpwebsite directory with this content: #php.ini configuration php_value error_reporting 7 Please note that this solution only works with the Apache WebServer If you're using another web server and you find a viable solution to the problem, please report it to the phpWebSite Development Team via online forums or writing to phpWebSite Development Mail-List and we'll add it to this document. For more info on the PHP setting please read the relative page on the manual: http://www.php.net/manual/en/configuration.php For more info on the Apache WebServer configuration directives please refer to the Apache WebServer Project homepage: http://httpd.apache.org/ ###################################################################### Some tips and tricks ###################################################################### If you need to change the filename suffix from .php so something else, e. g. .php4, because of your hosting environment, you may use the script extchg.sh in the setup directory. It should be called with the old suffix as the first, and the new suffix as the second parameter. It will backup your files to a directory called bak, so you should be on the safe side... Afterwards you will have to change some links which are in the database. Have a look at main_page_content and menu. If you want to contribute to translations, you may want to have a look at http://www.irnis.net/, there a (windows only) software can be found, which helps with the translation process. Thank You, The phpWebSite Development Team