Note: Please read the Release Notes.
How P4Web Works
·
How to Install P4Web
·
How to Start P4Web
·
The 'p4web' Command
Connecting to P4Web
·
How to Stop P4Web
·
User Documentation
P4Web is 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 very much 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 as well.
Download the P4Web installer program, perforce.exe, and run it on your Windows workstation. When prompted, select User installation. This installs the P4Web executable, p4web.exe. It will also install the Perforce command line client, p4.exe, if it's not already installed.
The installer assumes you want to run P4Web on port 5501. You can override those defaults during the installation. You can also start up additional P4Webs on different port numbers regardless of the port number chosen on installation; see How to Start P4Web, below.
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. Depending on how you want the P4Web service to run, select one of the following options:
The port number that P4Web uses when running as a service is set in the environment variable P4WEBPORT. When using P4Web as a service, point your browser to: http://localhost:value of 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. Use the following commands to do this:
Before you can point your browser to it, the P4Web program must be up and running.
On Windows, you can start the P4Web you configured during installation by clicking 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 with the p4web command in a Command Prompt window.
If you are running P4Web as a service on Windows, P4Web is already running as soon as 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 it is not started, click Start the service in the left-hand column.
On Mac OSX and Unix, start the P4Web program with p4web command, as described below.
From a command shell, run the p4web command to start a P4Web program . When P4Web starts up, it displays information about the Perforce user, client, and server port it's using, and the URL your browser should use to connect to it. The p4web command syntax is:
p4web [-w port] [-b or -B] [-l] [global_options] [-h] [-V]
On Unix, the default port number is unique to each user and is displayed by the p4web command at startup. (If the default P4Web port number for your username conflicts with a port address used by another process on your system, you'll have to override it with the -w option.)
On Windows the default P4Web port is 5051.
-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 Global Options section in the Perforce Command Reference.
Once you've started a P4Web, you can connect to it with your Web browser. Point your browser to:
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 is running on a different machine than P4Web, use the name of the machine P4Web is running on instead of "localhost".
Enter your Perforce username and password at your browser's prompt to begin using P4Web.
To stop a P4Web program running on...
Once you've pointed your browser to P4Web you can use its Help links to access P4Web user documentation. You can also access the same documentation on our web site via these links: