This topic covers the following aspects of P4Web administration:
P4Web is a Perforce client program that runs on any platform. It can be used either in Standard mode or Viewer mode:
P4Web communicates with the Perforce server using the Perforce C++ API. It also communicates with your web browser, sending HTML and receiving URL requests and form input. To your web browser, P4Web looks like a web server. To a Perforce server, P4Web looks like any other Perforce client program.
P4Web is available for Macintosh, Windows, and Unix. For download information, please go to the Perforce Downloads page.
Download the p4web executable for your Unix platform, and put it in a directory in your path. If you are installing it for everyone to use, put it in /usr/local/bin or equivalent. Make sure the p4web file has execute permission.
If you do not already have p4 (the Perforce command line client) on your system, download the executable from the Perforce Downloads page and install it.
Download the P4Web installer program, perforce.exe, and run it on your Windows workstation. When prompted, select User installation. This option installs the P4Web executable, p4web.exe and the Perforce command line client, p4.exe, if it is not already installed.
If you have administrative permissions, you can install P4Web to run as a service on your Windows machine.
Download the P4Web installer program, perforce.exe, and run it on your Windows workstation. When prompted, select one of the following options:
The port number that P4Web uses when running as a service is specified by setting the environment variable P4WEBPORT. When using P4Web as a service, point your browser to: http://localhost:P4WEBPORT.
To change the user when running P4Web as a service, you must first stop the service, then set the user, then start the service again. At the DOS prompt, issue the following commands:
There are two ways to start P4Web: on Windows as a service, or on all supported platforms from the command line.
On Windows, you can start the P4Web you configured during installation by choosing Start>Programs>Perforce>P4Web. You can also start a P4Web with an alternate configuration using the p4web command, as described below. Run p4web in the Start>Run window or by issuing the p4web command at the DOS prompt.
If you are running P4Web as a service on Windows, P4Web is started immediately after you install it. To verify that it has started, go to the Windows Control Panel. Under Administrative Tools>Component Services, click on Services and find Perforce Web. If P4Web is not started, click Start the service in the left-hand column.
To start an instance of P4Web, issue the p4web command. The p4web command syntax is as follows:
p4web [-w port] [-b or -B] [-l] [-ss] [global_options] [-h] [-V] [-L logfilename]
On Windows and Macintosh, the default port for P4Web is 8080. On UNIX and related platforms, the port used by P4Web is the 5000 plus the P4Web user's UID. For example, if the user's UID is 525, then, by default, P4Web uses port 5525. You can start multiple instances of P4Web using on different port numbers regardless of the port number chosen during installation. To override the default port, specify another port using the -w option.
-L logfilename: log all requests sent to P4Web.
-u user (Perforce user name) Note: This
option cannot be used with the -B flag (see above)
-P password (Perforce user password) Note:
This option can only be used with the -b flag (see above)
-c client (Perforce client name)
-H host (Perforce client host)
-p host:port (Perforce server host and port number)
-C charset (Character set used for translation
of unicode files)
For more information about these flags, see the Perforce Command Reference.
Other flags:
When P4Web starts, it displays the Perforce user, client, and server port it is using, and the URL to be used by browsers to connect to the instance.
For example, to set up stunnel with P4Web on Windows:
P4Web RSS feeds also support https, if you configure stunnel to provide valid certificates and if your RSS reader accepts https requests.
A favicon (short for "favorites icon") is an icon associated with a particular website or webpage. To override P4Web's default favicon, either add the desired icon as //depot/favicon.ico or set P4WEBFAVICON to the depot path of the desired icon file in your depot. The favicon is served to Firefox and Safari browsers, and to Opera browsers unless the user was logged into the browser session using a cookie. (Opera fails to serve the cookie when it requests /favicon.ico so the internal version will be served instead. For details about why P4Web uses cookies to log users in, see the P4Web release notes.)
To enable Internet Explorer to display the P4Web favicon, you must be running version 6 or higher. To display the icon, your users must perform the following steps:
To connect to an instance of P4Web, enter the following URL in the addess bar of your browser:
http://localhost:nnnn/ (where nnnn is your P4Web's port address.)The port address is set in the environment variable P4PORT, unless you are running P4Web as a service on Windows. If you are running P4Web as a service, the port address is set in the environment variable P4WEBPORT.
Note: If your browser and P4Web are runing on different machines, specify the name of the machine where P4Web is running instead of "localhost".
When prompted, enter your Perforce username and password (if any).
To stop a P4Web program:
After you've pointed your browser to P4Web, use its online help to view the user documentation. You can also access the online help from the Perforce web site, as follows: