Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Fatal error: Class 'xhp_a' not found #2

Closed
john-f opened this issue Feb 10, 2010 · 6 comments
Closed

Fatal error: Class 'xhp_a' not found #2

john-f opened this issue Feb 10, 2010 · 6 comments

Comments

@john-f
Copy link

john-f commented Feb 10, 2010

I just installed this on a fresh Linode with a basic Ubuntu 9.10 LAMP stack with all the latest dependencies. 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:

Facebook;

I tried running the code through the xhpize tool, and got the following output:

 $href,), array('Facebook',), __FILE__, 3);

Which produces the same "class not found" error.

@bshep
Copy link

bshep commented Feb 10, 2010

I had the same issue, you need to include init.php from the 'php_lib' folder into your scripts.

@john-f
Copy link
Author

john-f commented Feb 10, 2010

that seems to fix it, thanks. i guess this is supposed to be included automatically?

@calvinf
Copy link

calvinf commented Feb 10, 2010

For what it's worth, I'm having the same issue and including init.php fixed it. Are these files supposed to be copied somewhere specific on the system and linked automatically?

@bshep
Copy link

bshep commented Feb 11, 2010

I don't know whats supposed to happen, my guess is they forgot to put it in the documentation. I simply copied them to the root of my project, you can probably put them in one of the include dirs so you can use them from any project.

@laverdet
Copy link
Contributor

Correct, you must include the XHP run-time code before using XHP. I updated the introduction to point out this fact.

@abirchall
Copy link

This information should also be included in the INSTALL file after including extension=xhp.so in your php.ini

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants