Fatal error: Class 'xhp_a' not found in /home/me/public_html/test.php on line 3
Here's the code I tested with: <?php
$href = 'http://www.facebook.com';
echo <a href={$href}>Facebook</a>;
I tried running the code through the xhpize tool, and got the following output: <?php
$href='http://www.facebook.com';
echo new xhp_a(array('href' => $href,), array('Facebook',), __FILE__, 3);
Which produces the same "class not found" error. Fatal error: Class 'xhp_span' not found in ...
Any ideas on how to fix would be appreciated. Google and Bing have nothing so far and the module configuration info on the GitHub page is limited: http://wiki.github.com/facebook/xhp/I get strange errors after I build and add the extension to php.ini
Benefits: I can use apt-get and have all the other conveniences of a true *nix environment. I can update and try out new software easily (I had XHP running in about 5 minutes). Also, I can create snapshots of my OS so that when my environment is just the way I like it, I can always revert right back to it.
I interact with certain paths on my virtual linux filesystem just as though they were local (like my ~/Sites dir) and have various dev domains in my /etc/hosts file pointing to the VM (which has it's own internal ip).
Cons: It's a standalone VM so it consumes a consistent 250mb of memory. Never really looked at what mysql/apache were doing on my Mac previously (I would assume far less) but I haven't really ran into an issue where the VM is a big issue yet. The convenience far outweighs the chuck of memory it eats up :)
I haven't had a single configuration problem yet ;) For developers the popular phrase is reversed, Debian "just works" and OS X is a pain in my ass.
However I'm still getting 'xhp_a' class not found errors with the basic tests from the wiki, the same as the other comments in the sibling thread.
It seems to happen on several platforms so its probably a configuration error somewhere.
Any help would be appreciated.
EDIT: Figured it out. You need to include 'init.php' from 'php-lib' in your php scripts. I copied the directory from the xhp source to my site directory and included them from there.