PageBox |
|
Rationale | FAQ | Dev site | PHP version | Install | Security | Customization | Demo | Distributed Application |
PageBox for PHP installation and user guide
You can use PHP in combination with other HTTP servers as explained in the Presentation. However Apache is the most popular server and BadBlue is probably the smallest one. In this section we present the Apache installation.
You can download Apache from the Apache site. If you don!#8217;t plan to recompile it, choose a binary installation and follow installation instructions.
Once Apache is installed, you should have this 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/... |
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
Copy php4ts.dll in %SYSTEMROOT%\system32.
Copy php_dir/php.ini-optimized into %SYSTEMROOT%\php-ini.
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:
Add a loadmodule instruction. For instance: LoadModule php4_module d:/php406/sapi/php4apache.dll
Add an addmodule instruction: AddModule mod_php4.c
Add a mime type for PHP with: AddType application/x-httpd-php .php .phtml
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:
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.
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.
Download BadBlue from BadBlue.com and follow the installation instructions.
You can change the installation port on the configuration panel when BadBlue is stopped:
Install PHP as described above.
To connect PHP to BadBlue, edit the EXT.INI file in the BadBlue installation directory (typically c:\program files\badblue\pe) by adding
[SERVICES] extension1=php,full_path_of_php.exe |
Download the PageBox for PHP and the Repository as described in the Customization guide.
Follow instructions of the Customization guide to configure inflate.pb and delete.pb (PageBox) and upload.rep, adminUsers.rep and users.rep (Repository).
Note:
Define adminUsers.rep and users.rep only if you have set security as described in the Security guide.
.
To configure BadBlue with PageBox use your browser. Assuming that you installed BadBlue on your machine and set the port at 1080, you should get that display.
Select advanced web server functions | Define virtual directories to add the Repository or the PageBox.
You need PEAR SOAP only if you use the Web service clients and servers.
These services are needed to return the list of the peer subscribers to distributed applications.
For more information look at the customization guide.
To get PEAR SOAP, the !#8220;official solution!#8221; is to use CVS:
You can get the SOAP package from CVS: cvs -d :pserver:cvsread@cvs.php.net:/repository login (enter phpfi as the password) cvs -d :pserver:cvsread@cvs.php.net:/repository co pear/SOAP |
The only problems are that the product is not stable yet and that you don!#8217;t necessarily have CVS installed, especially if you are a Windows user. So we packaged a version downloaded on May 6 2002. We made all our tests with this version. You can download it here.
PEAR SOAP requires PEAR.
If you have a recent version of PHP, PEAR is included but not added to the include path.
Inflate the pearsoap.zip archive in the PEAR directory
Update php.ini on Windows, for instance:
include_path = ".;c:\php4.2.0\pear" |
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:
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.
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:
But if you are sure of the path of the presentation, click on Browse button.
Then you are displayed a File chooser dialog:
Select a file and click Open.
We recommend that:
You put the presentation documentation on the Web
You set the Documentation URL field with the URL of the documentation
This documentation should explain:
Who you are
The purpose of the presentation
The supported environments and recommended inflate.pb and delete.pb
The presentation prerequisites. Should other archives be installed?
The Web Services that the presentation invokes
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:
Its name
Its last modified date
The user (owner) that published the presentation
The documentation URL
The size of the presentation
The presentation has been published on every subscriber. Therefore if you display again subscriber.php you should get this:
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:
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.
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:
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.
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:
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:
If you click on the presentation checkbox:
The presentation is added to the subscribed presentation list
When you click refresh the presentation is deployed on the PageBox
If you uncheck the presentation checkbox:
The presentation is removed from the subscribed presentation list
When you click refresh the presentation is undeployed on the PageBox
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:
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.
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 PageBox is needed.
No automatic presentation update is possible
The download site is not stored on the repository
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 and Apache listens on port 2080, you should be able to query audit.php with http://localhost:2080/repository/audit.php:
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.
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:
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.
QueryClient is a PageBox server page that lists the other subscribers to an archive.
QueryClient was written to test the PageBox API for distributed applications. You can use it for testing if you modify the PageBox code or just to get the information.
Starts Apache. Assuming you have installed PageBox in htdocs/pagebox3 and Apache listens on port 2080, you should be able to query QueryClient.php with http://localhost:2080/pagebox3/QueryClient.php:
Enter the archive name in the text box and click on the Query button.
You get the list of the other subscribers to this archive.
The local PageBox (whose URL is displayed on the top) is not included.
QueryClient also displays on the top the URL of the local Query.php Web service. It is this URL that you should use in your distributed applications to call the Query.php Web service. See the customization guide for more information about Web service invocations.
You can click on the Log link to see log entries related to the API invocation.
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.
log.php is a PageBox server page that displays events occurred on PageBox side during the Web service invocations.
Events related to Web service invocations and occurred on Repository are displayed by audit.php.
Starts Apache. Assuming you have installed PageBox in htdocs/pagebox3 and Apache listens on port 2080, you should be able to query Log.php with http://localhost:2080/pagebox3/log.php:
Click on the Clear button to remove the log 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.
RepoQueryClient is a Repository server page that lists the other subscribers to an archive.
RepoQueryClient was written to test the Repository API for distributed applications. You can use it for testing if you modify the Repository code or for troubleshooting.
Starts Apache. Assuming you have installed the Repository in htdocs/repository, the repository Web service in htdocs/repoQuery and Apache listens on port 2080, you should be able to query RepoQueryClient.php with http://localhost:2080/repoQuery/RepoQueryClient.php:
Enter the archive name and the URL of the subscribing PageBox to ignore and click on the Query button.
You get the list of the other subscribers to this archive.
RepoQueryClient also displays on the top the URL of the RepoQuery.php Web service.
You can click on the Log link to see log entries related to the API invocation.
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-2004 Alexis Grandemange.
Last modified
.