Script configuration :


Download the script as text file to your computer. (ViewView)
Open the text with Notepad or any other text editor. Be careful with programs that format a text (like Wordstar, Wordpad, Word), it must stay plain text.
Near the top of the script there are 5 lines marked with the comment MODIFY. These are
   define ("UNZIP", '/usr/bin/funzip/');
   $PLocal='/obj';
   $Jpg404='/textures/qmark2.jpg';
   $Zip404='/models/qmark2.zip';
   $WorkDir = $DocRoot.'/wrk';
  
These are the entries that configure the script to the server, where your objects are stored. All are case-sensitive!
define ("UNZIP", '/usr/bin/funzip');
funzip is a program that the script needs for scaling and rotation of existing 3D objects. It can extract the contents of ZIP files (both GZip and PKZip supported) to the screen (downloads). My web space provider already had it in it's standard location for Linux installations, it is available for several platforms.
If you have trouble to find the infozip packages, you can download only the funzip executable files from here.
Note : This path entry is not related to your WWW address but to the server root! If you uploaded the program yourself you either have to find out it's absolute address on the server or use a relative address, that does not start with / or c:\ !
$PLocal='/obj';
This is the base location of your object path, relative to your WWW address. If your object path is "www.server.dom/myworld/objects" this entry has to be $PLocal='/myworld/objects'; . It starts with a slash and does not end with a slash.
$Jpg404='/textures/qmark2.jpg';
$Zip404='/models/qmark2.zip';
These two files are sent by the script, if a requested texture or model cannot be found on the object path. The ZIP file replaces the small black triangle, a default JPG instead of missing textures does not exist in AW at all. Both entries are relative to the object path base and start with a slash. I use JPG and ZIP.
$WorkDir = $DocRoot.'/wrk';
As PHP3 cannot (PHP4 can!) GZip-compress data direct to the browser without using an intermediate file, this script needs a working directory, where it can temporarily store the dynamic generated compressed output.
I use a folder within the range of my WWW directories so I specify it relative to the document root. You can as well use an absolute server location if your installation allows this. I recommend an empty folder that is not used for anything else, but any folder would work too.
Save the modified script and rename it to ".php" instead of ".txt"

Script installation and diagnostics :


Upload the script (extension ".php"!) to a place on your server that can be accessed via HTTP. If you did not use any relative paths any location will do, no need to have it in the object path.
The Script has a built-in self test that checks all directory and file entries that you modified in the "configuration" step. This self test is done by just loading the script file in your web browser without supplying any parameters:
http://www.server.dom/path/fetch.php
The script will check the paths and files and send the results to the web browser. A line prefixed with FAILED : indicates a problem that you should fix. If everything seems to be fine you should receive 8 lines, all starting with OK :. If you have 8xOK the script is ready to be used as a world object path.

If you receive the script source instead of the diagnostics you have to enable PHP parsing. Refer to your web space providers documentation to see how to do that. On an Apache you need to create a file with the name .htaccess (including the dot) that contains the line:
AddType x-mapp-php3 .php
or
AddType x-mapp-php4 .php
either in your document root (WWW root) or in the folder where your uploaded the script.

World configuration :


If your script location is http://www.server.dom/path/fetch.php the entry in World options->Object path has to be
www.server.dom/path/fetch.php?
with no leading http:// and including the trailing question mark.
After you made this change you should close your AW browser, remove the files "world.dat" and "world.idx" from your browser cache and restart the browser and everything should load through the script.
Use the calculator program to test the dynamic features and share the program with your builders. And have fun with some billions of possible new objects :)


cd / Back to my home
cd / Back to my PHP playground
cd /aw Back to my ActiveWorlds page
replace (ATNOSPAM)! Report problems to me,
please write only in english or german

Valid HTML 4.0!