Hacker News new | past | comments | ask | show | jobs | submit login

I just installed this on a fresh Linode with a basic Ubuntu 9.10 LAMP stack. It built ok, and the module shows up in phpinfo(), but when I try to run any of the example code, I get an error:

  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.



I'm having exactly the same problem, same system (Ubuntu Karmic Koala). Prerequisites installed, XHP module installed, it's listed in my phpinfo. For any XHTML tag I include (a, span, ...) the error message says class not included:

  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/


So, it seems you need to include init.php. Not sure why that doesn't happen automatically.

http://github.com/facebook/xhp/issues#issue/2




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: