====== PHP application ======
===== Preflight =====
- [[http://www.facebook.com/developers/apps.php|Facebook developer link]]
- [[http://wiki.developers.facebook.com/index.php/PHP|Facebook example php code]]
- The PHP5 client libraries are provided in the standard php include directory. [[http://developers.facebook.com/clientlibs/facebook-platform.tar.gz|The official facebook PHP5 libraries]] and includes the standard core components:
* facebookapi_php5_restlib.php
* facebook.php
* facebook_desktop.php
* "footprints" directory with a sample application.
- [[swphp]]
An example on how to edit the php.ini file is [[php#memcache| here for adding memcache]]
===== Installation =====
The [[http://wiki.developers.facebook.com/index.php/PHP|Facebook PHP documentation]]
- Configure your [[http://www.facebook.com/developers/apps.php|Facebook application]] to point to **http://xxxxxxxx.fb.joyent.us**
- SFTP as xxxxxxxx@xxxxxxxx.fb.joyent.us into your accelerator.
- Place your files into the /home/xxxxxxxx/web/public directory
===== Memcache =====
==== From Virtualmin ====
- In a browser log into http://xxxxxxxx.fb.joyent.us:10000/ as **admin**
- Select **Webmin** below **Joyent Accelerator**
- From the left-hand navigation select **Other**
- Select **PHP Configuration**
- From the right side select **Edit Manually**
- look for the line ;extension=memcache.so and change it to extension=memcache.so
- select **Save**
- From the left-hand navigation select **System**
- Select **Service Management Facility**
- On the right side check **network/http:apache**
- Select **Restart** pushbutton at the top to the right of //Apply to Checked Items//
- Select Include Disabled Services at the top
- Check **memcached**
- Select **Enable** pushbutton at the top and to the right of //Apply to Checked Items//
==== From SSH ====
- From your local machine, ssh admin@xxxxxxxx.fb.joyent.us
- nano /opt/local/etc/php.ini
- look for the line ;extension=memcache.so and change it to extension=memcache.so
- restart apache sudo svcadm restart apache
- enable memcache sudo svcadm enable memcached