PageBox: servlet running in sandbox on J2EE PageBox

for
support@pagebox.net PageBox: servlet running in sandbox on J2EE Word version of this document Printer-friendly version of this document Cuckoo generated
Rationale FAQ Dev site PHP version Install Security Customization Demo Distributed Application

PageBox for PHP installation and user guide

Apache installation

You can use PHP in combination with other HTTP servers as explained in the Presentation. However Apache is the most popular server. Therefore we chose to present here Apache installation.

You can download Apache from the Apache site. If you don't plan to recompile it, choose a binary installation and follow installation instructions.

Once Apache is installed, you should have this directory structure:

Explorer window with Apache directory structure

For a no-brainer installation, you should install PageBox for PHP in the htdocs directory.

You also need to modify the Apache configuration file, htdocs/httpd.conf.

In a test environment it is often useful to change the Apache listening port, for instance:

Port 2080

As it is not the default HTTP port, you also need to change the URL on the browser:

http://localhost:2080/...

PHP installation

We recommend installing the most recent version of PHP from Zend site.

PHP 4 can be used as a CGI executable (php.exe) or as a module (SAPI module in PHP documentation).

We present here SAPI configuration because SAPI provides significantly improved performance and some new functionality.

On Windows

  1. Copy php4ts.dll in %SYSTEMROOT%\system32.

  2. Copy php_dir/php.ini-optimized into %SYSTEMROOT%\php-ini.

  3. Modify %SYSTEMROOT%\php-ini extension-dir to point on php_dir, for instance:

extension_dir = D:\php406 ; directory in which the loadable extensions (modules) reside

The next step is to configure Apache to use the SAPI module:

  1. Add a loadmodule instruction. For instance: LoadModule php4_module d:/php406/sapi/php4apache.dll

  2. Add an addmodule instruction: AddModule mod_php4.c

  3. Add a mime type for PHP with: AddType application/x-httpd-php .php .phtml

PageBox installation

Download the PageBox for PHP as described in the Customization guide and install it in htdocs/pagebox.

Follow instructions of the Customization guide to configure inflate.pb and delete.pb.

Starts Apache. Assuming you have installed PageBox in htdocs/pagebox and Apache listens on port 2080, you should be able to query update.php with http://localhost:2080/pagebox/update.php:

Browser displaying the update.php page. No presentation deployed.

If you click on the PageBox icon you go to PageBox for PHP documentation.

You can also click on the mail icon to send us a mail.

Repository installation

Download the PageBox for PHP repository as described in the Customization guide and install it in htdocs/repository.

Follow instructions of the Customization guide to configure upload.rep, adminUsers.rep and users.rep.

Note:

Define adminUsers.rep and users.rep only if you have set security as described in the Security guide.

Subscription

Assuming you have installed the PageBox repository in htdocs/repository and Apache listens on port 2080, you should be able to query subscriber.php with http://localhost:2080/repository/subscriber.php:

Browser displaying the subscriber.php page. A PageBox has been successfully subscribed.

In the deployment URL, simply paste the URL of the PageBox update.php.

You can subscribe a new PageBox with the Subscribe button and unsubscribe with the Unsub, Unsubscribe and Force buttons. See the Customization guide to understand the difference between Unsubscribe and Force.

If you click on the PageBox icon you go to PageBox for PHP documentation.

You can click on the mail icon to send us a mail.

Publication

Assuming you have installed the PageBox repository in htdocs/repository and Apache listens on port 2080, you should be able to query publisher.php with http://localhost:2080/repository/publisher.php:

Browser displaying the publisher.php window. A presentation has been successfully uploaded.

But if you are sure of the path of the presentation, click on Browse button.

Then you are displayed a File chooser dialog:

File chooser

Select a file and click Open.

We recommend that:

  1. You put the presentation documentation on the Web

  2. You set the Documentation URL field with the URL of the documentation

This documentation should explain:

  1. Who you are

  2. The purpose of the presentation

  3. The supported environments and recommended inflate.pb and delete.pb

  4. The presentation prerequisites. Should other archives be installed?

  5. The Web Services that the presentation invokes

  6. How to use the presentation

See the Customization guide for the inflate.pb and delete.pb syntax.

Then click on Publish to publish the archive.

For an presentation are displayed:

  1. Its name

  2. Its last modified date

  3. The user (owner) that published the presentation

  4. The documentation URL

  5. The size of the presentation

The presentation has been published on every subscriber. Therefore if you display again subscriber.php you should get this:

Browser displaying the subscriber.php page. A presentation has been successfully deployed.

If the repository fails to deploy the archive on the PageBox the status is "pending active".

If you display again update.php, you should get this:

Browser displaying the update.php page. A presentation is deployed.

You can unpublish a presentation with the Delete and Force buttons. See the Customization guide to understand the difference between Delete and Force.

If you click on the PageBox icon you go to PageBox for PHP documentation.

You can click on the mail icon to send us a mail.

Administration

Assuming you have installed the PageBox repository in htdocs/repository and Apache listens on port 2080, you should be able to query admin.php with http://localhost:2080/repository/admin.php:

Browser displaying the admin.php page. A presentation is deployed.

You can unpublish a presentation with the Delete and Force buttons. See the Customization guide to understand the difference between Delete and Force.

If you click on the PageBox icon you go to PageBox for PHP documentation.

You can click on the mail icon to send us a mail.

If you have subscribers with presentations in pending state, you can click on the cleanup button. The cleanup retries deploying and undeploying presentations.

Select

You can subscribe to a subset of the presentations published on the repository with select.php and asubscribe.php. Assuming you have installed the PageBox repository in htdocs/repository and Apache listens on port 2080, you should be able to query select.php with http://localhost:2080/repository/select.php:

Browser displaying the select.php page. A PageBox is subscribed

In the deployment URL, simply paste the URL of the PageBox update.php.

You can subscribe a new PageBox with the Subscribe button and unsubscribe with the Unsub, Unsubscribe and Force buttons. See the Customization guide to understand the difference between Unsubscribe and Force.

If you click on the PageBox icon you go to PageBox for PHP documentation.

You can click on the mail icon to send us a mail.

You can click on the Archives button to display the presentations subscribed with asubscribe.php:

Browser displaying the asubscriber.php page. A presentation is selected and deployed.

If you click on the presentation checkbox:

  1. The presentation is added to the subscribed presentation list

  2. When you click refresh the presentation is deployed on the PageBox

If you uncheck the presentation checkbox:

  1. The presentation is removed from the subscribed presentation list

  2. When you click refresh the presentation is undeployed on the PageBox

Download

Assuming you have installed the PageBox repository in htdocs/repository, the download page in htdocs/download and Apache listens on port 2080, you should be able to query download.php with http://localhost:2080/download/download.php:

Browser displaying the download.php page. A presentation can be downloaded.

Click on the archive URL to download the presentation.

If you click on the PageBox icon you go to PageBox for PHP documentation.

You can click on the mail icon to send us a mail.

Difference between download, archive subscription and subscription

Difference between subscribe, archive subscribe and download.

In case of subscribe,

  • All repository presentations are deployed on the subscribing PageBox

  • If a new presentation is published it is automatically deployed on the subscribing PageBox

  • When a presentation is updated it is automatically redeployed on the subscribing PageBox

In case of archive subscribe, the subscriber selects the Presentations to deploy on the PageBox.

  • Selected presentations are deployed on the subscribing PageBox

  • When a presentation is updated it is automatically redeployed on the subscribing PageBox

In case of download, no presentation is needed.

  • No automatic presentation update is possible

  • The download site is not stored on the repository

Audit

Events taking place on the Repository are recorded. You can display them if you have administrator rights with audit.php. Assuming you have installed the PageBox repository in htdocs/repository, the audit page in htdocs/repository and Apache listens on port 2080, you should be able to query audit.php with http://localhost:2080/repository/audit.php:

Browser displaying the audit.php page. Events are displayed with their date, origin host, user and text.

The audit display answers the questions when? Who? What? With which result?

There are two kinds of entries:

  • Visit entries. You see here that publisher1 from 127.0.0.1 has queried publisher.php at 11:48 on Jan 8th.

  • Command entries. You see here that publisher1 has successfully published php-pagebox.zip. publisher1 has not provided a documentation URL (the documentation URL would be displayed after the comma (,).

Click on the Clear button to remove the audit file.

If you click on the PageBox icon you go to PageBox for PHP documentation.

You can click on the mail icon to send us a mail.

Batch

You can cleanup (retry deployments and undeployments) in batch using cleanup.php.

cleanup.php writes cleanup reports that you can display with batch.php if you have administrator rights. Assuming you have installed the PageBox repository in htdocs/repository, the batch page in htdocs/repository and Apache listens on port 2080, you should be able to query batch.php with http://localhost:2080/repository/batch.php:

Browser displaying the batch.php page. Batch report date and text are displayed.

For each invocation of cleanup.php are displayed:

  • The date

  • The execution report

Click on the Clear button to remove the batch report file.

If you click on the PageBox icon you go to PageBox for PHP documentation.

You can click on the mail icon to send us a mail.

Contact:support@pagebox.net
©2001 Alexis Grandemange. Last modified .

Version 0.0.2

  • PageBox only downloads supported presentation (whose extension is defined in inflate.pb)

  • Repository locking

  • Repository audit

  • Repository retry on deploy / undeploy (cleanup)

Version 0.0.3

  • Repository allows subscribing a subset of the Repository presentations (select.php and asubscribe.php)

  • Repository supports presentation download (download.php)

  • Repository allows specifying the URL of the presentation documentation

Table of Content
Apache installation
PHP installation
PageBox installation
Repository installation
Subscription
Publication
Administration
Select
Download
Difference between download, archive subscription and subscription
Audit
Batch