Hosting websites : Hosting PHP websites
 
Hosting PHP websites
Note  The following information is for server administrators.
Custom Web Publishing with PHP lets you use the PHP scripting language to integrate data from FileMaker databases with your customized webpage layouts. In your webpages, you call the FileMaker API for PHP, which is a PHP class created by FileMaker that accesses databases hosted by FileMaker Server. This PHP class connects to the Web Publishing Engine and makes data available to the web server’s PHP engine.
For more information on developing a PHP website and preparing a database, see FileMaker Server Custom Web Publishing with PHP on the Start Page.
To host a website that uses Custom Web Publishing with PHP:
1. In FileMaker Pro, open the database and edit the privilege set for the account that will access the database. Enable the extended privilege Access via PHP Web Publishing - FMS only.
Note  If your FileMaker database solution uses more than one FileMaker database file, all of the database files accessed using PHP must use this privilege set with the extended privilege Access via PHP Web Publishing - FMS only enabled.
2. In FileMaker Server Admin Console, use the Deployment assistant to enable Custom Web Publishing with PHP and choose whether to install your own version of PHP or use the default PHP on your operating system, if you haven’t already.
Choose Server menu > Edit Deployment on the Status pane. In the Deployment assistant, confirm your settings and click Next until you reach the Enable Web Publishing Technologies step. For more information, see Enabling technologies for data sharing and web publishing.
3. In Admin Console, configure the settings on the Web Publishing > PHP tab.
For more information on configuring Custom Web Publishing with PHP, see PHP web publishing settings.
4. Verify that Custom Web Publishing with PHP is working in your FileMaker Server deployment. See Testing FileMaker Server for instructions.
5. Upload the database file to FileMaker Server. See Hosting databases.
Note  If your FileMaker database solution uses more than one FileMaker database file, all of the database files must be on the same computer.
6. Copy your PHP files to the web server’s root folder. This folder is on the machine in your FileMaker Server deployment where the web server is running. The following shows the default locations:
For IIS (Windows) through HTTP or HTTPS:
[drive]:\Program Files\FileMaker\FileMaker Server\HTTPServer\Conf
where [drive] is the drive on which the Web Publishing Engine component of your FileMaker server deployment resides.
For Apache (OS X) through HTTP:
/Library/FileMaker Server/HTTPServer/htdocs
For Apache (OS X) through HTTPS:
/Library/FileMaker Server/HTTPServer/htdocs/httpsRoot
On OS X, make sure the folder ownership and permissions allow members of the fmsadmin group to edit the PHP files. See Users, groups, and permissions (OS X).
7. If you have not already done so, copy or move any referenced container objects to the appropriate directory on the web server machine.
If a database container field stores a file reference instead of an actual file, then the referenced container object will be stored in the FileMaker Pro Web folder when the record is created or edited. To host your site on FileMaker Server, you must then copy or move the referenced containers to a folder with the same relative location in the root folder of the web server software.
See Custom Web Publishing with PHP for additional information about using container fields with PHP solutions.
8. To access your PHP website, use the following URL syntax:
<scheme>://<host>[:<port>]/<path>/<filename>
where:
<scheme> is the HTTP or HTTPS protocol.
<host> is the IP address or domain name of the host computer where the web server is installed.
<port> is optional and specifies the port that the web server is listening on. If no port is specified, then the default port for the protocol is assumed (port 80 for HTTP, or port 443 for HTTPS).
<path> is optional and specifies the folder inside the web server root folder where the PHP file is located.
<filename> is the filename of a page in your website.
For example:
http://192.168.123.101/my_site/home.php
Related topics 
PHP web publishing settings
Hosting websites