Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to include jaxl #99

Open
andrei-pmbcn opened this issue Mar 18, 2019 · 1 comment
Open

unable to include jaxl #99

andrei-pmbcn opened this issue Mar 18, 2019 · 1 comment

Comments

@andrei-pmbcn
Copy link

I downloaded the git repository's zip file and copied src/JAXL into a new directory, from which I required jaxl.php . This gave me the following error:

Uncaught Error: Class 'XMPPStream' not found in [path]\jaxl.php:53
(where [path] is the path to the copied JAXL library)

Attempting to package the library into a phar file and require that file in my project gave me the same error. It seems the problem lies with JAXL not autoloading classes.

How do I get jaxl to run given this situation? If the solution is obvious, I apologize, as I haven't worked with PHP libraries for very long.

@lrirwin
Copy link

lrirwin commented Apr 5, 2019

I've got it working with regular "require" loading. Not as efficient, but it works and leaves composer out of the mix. The loading order is important...

require 'core/jaxl_cli.php';
require 'core/jaxl_client_base.php';
require 'core/jaxl_clock.php';
require 'core/jaxl_event.php';
require 'core/jaxl_exception.php';
require 'core/jaxl_fsm.php';
require 'core/jaxl_logger.php';
require 'core/jaxl_loop.php';
require 'core/jaxl_pipe.php';
require 'core/jaxl_sock5.php';
require 'core/jaxl_socket_client.php';
require 'core/jaxl_socket_server.php';
require 'core/jaxl_util.php';
require 'core/jaxl_xml_access.php';
require 'core/jaxl_xml_stream.php';
require 'core/jaxl_xml.php';
require 'http/http_client.php';
require 'http/http_dispatch_rule.php';
require 'http/http_dispatcher.php';
require 'http/http_multipart.php';
require 'http/http_request.php';
require 'http/http_server.php';
require 'jaxlctl.php';
require 'xmpp/xmpp.php';
require 'xmpp/xmpp_jid.php';
require 'xmpp/xmpp_roster_item.php';
require 'xmpp/xmpp_stanza.php';
require 'xmpp/xmpp_pres.php';
require 'xmpp/xmpp_msg.php';
require 'xmpp/xmpp_iq.php';
require 'xmpp/xmpp_stream.php';
require 'xmpp/xmpp_xep.php';
require 'xep/xep_0030.php';
require 'xep/xep_0045.php';
require 'xep/xep_0060.php';
require 'xep/xep_0077.php';
require 'xep/xep_0114.php';
require 'xep/xep_0115.php';
require 'xep/xep_0199.php';
require 'xep/xep_0203.php';
require 'xep/xep_0206.php';
require 'xep/xep_0249.php';
require 'jaxl.php';

Hope that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants