forked from facebookarchive/xhp-php5-extension
-
Notifications
You must be signed in to change notification settings - Fork 3
/
INSTALL
47 lines (31 loc) · 1.17 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
You can install XHP with Homebrew by first enabling some required
repositories:
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
Once completed, ensure gcc is installed:
brew install apple-gcc42
Then run any of the following commands:
* brew install php53-xhp --cc=gcc-4.2
* brew install php54-xhp --cc=gcc-4.2
* brew install php55-xhp --cc=gcc-4.2
To install manually, continue reading.
Building XHP requires:
* PHP 5.2.x or 5.3.x
* gcc 4.0 or higher
If you are NOT building from a release, you will also need:
* flex 2.5.35 or higher
* Bison 2.3 or higher
* re2c 0.13.5 or higher
You may have luck with different versions of these packages, but these are the
versions that have been tested to work.
If PHP was configured correctly, and you meet the system requirements (Linux)
you should be able to get XHP running just like you would most PHP extensions:
phpize
./configure
make
make install
Then add `extension=xhp.so` to your php.ini and you should be good to go. An
easy way to test if XHP is working is by running:
php -r 'echo "XHP!\n"; exit; <a />;'
If you get a syntax error then XHP is not working.