If you haven’t done so already, download Baguette AMF.
Baguette AMF is distributed in a zip that contains the following:
This is the php extension that you should install on your server. Versions compiled for a wide variety of systems are included here. Use the “installer.php” PHP script to help you install it.
This is the plugin needed for Baguette AMF to work with AmfPHP. AmfPHP must be version 2.0 or later. See http://www.baguetteamf.com/documentation/baguette-amf-with-amfphp/ for more information.
– Baguette AMF Server.
This is the standalone PHP integration of Baguette AMF. See http://www.baguetteamf.com/documentation/baguette-amf-server/ for more information.
– The installer. installer.php. The installer puts the right PHP extension in the right folder, checks or gets a license file, and edits your php.ini Warning: The installer can only be used if the PHP Command Line php.ini is also used by your web server’s php.ini.
Linux/ OSX installation
If PHP is installed on either of these platforms, the PHP interpreter should be available simply by opening a terminal and typing “php” . So just run “php installer.php”.
PHP versions 5.2 to 5.6 are currently supported by Baguette AMF for Linux and OSX. To check your PHP version, run “php -v” in the terminal
On Windows PHP is available through a variety of products, the most common of which are listed below, along with an url where to find the product and an example of the path to the php.exe file to use. Baguette AMF has been tested with all of these. On Windows Baguette aMF supports PHP 5.3 and 5.6.
PHP with IIS
http://www.microsoft.com/web/platform/phponwindows.aspx make sure to take PHP 5.3
“C:\Program Files (x86)\PHP\v5.3\php.exe”
XAMPP uses PHP 5.5 by default, which is not supported yet by Baguette AMF. You can however download a version of XAMPP with PHP 5.4.
“C:\Program Files (x86)\Ampps\php\php.exe”
Baguette AMF with Amfphp or standalone?
Once you have installed Baguette AMF, choose if you want to use Baguette AMF Server or use Baguette AMF with Amfphp. See http://www.baguetteamf.com/documentation/baguette-amf-with-amfphp/ and http://www.baguetteamf.com/documentation/baguette-amf-server/ for more information. If in doubt try with Amfphp first, it’s easier and better documented.
If you can’t use the installer, please follow the instructions below:
1) Choose the right PHP extension file for your system
Check your phpinfo(). It should tell you :
- if your PHP is 32 or 64 bit
- what PHP version you are using (PHP 5.2.x, 5.3.x, 5.4.x are currently supported)
Please note that debug builds of PHP are not supported. If you use Linux or OSX, that’s all you need to choose your file. Choose accordingly in the zip’s “php_extension” folder. If you use Windows, read on.
For Windows Users : Thread-safe or non-thread-safe?
Baguette AMF comes compiled for thread-safe and non-thread-safe systems.Non-thread-safe is faster on Windows servers, but isn’t supported by all servers.
You should therefore use:
- thread-safe for Apache(WAMP, XAMPP and the like) for development purposes. This is the xxx-windows_TS.dll file.
- non-thread-safe for production. This is typically IIS + fastcgi.
You must use a .dll file for Windows, so choose accordingly in the zip’s “php_extension” folder.
2) Once you have the PHP extension file
- copy the file into the extension folder of PHP. You can find the current extension folder this by looking for ‘extension_dir’ in your phpinfo output.
- update your php.ini file. add this line:
extension=the extension file.
For example: extension=baguetteamf-php5.2-x86-32bit-linux.so
- Get a license(demo or commercial) then drop the license file next to the extension file in the extension folder.
- run the test_extension_loaded.php script to see if the extension was properly loaded.
- if the extension was properly loaded, restart your server so that can load the extension.
Testing that the PHP extension is properly installed and available
Create a PHP script that calls phpinfo(), and call it via your Web server. For example put the following text in a “phpinfo.php” at the root of your server, then open “http://yourserver/phpinfo.php” with your browser.
<?php phpinfo(); ?>
Look for Baguette AMF. If it’s not there, the extension is not installed. You should see this: