|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73325 Class 'Stomp' not found
Submitted: 2016-10-15 16:28 UTC Modified: 2016-10-18 19:29 UTC
Avg. Score:4.0 ± 0.8
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: torreshig-git1 at yahoo dot es Assigned:
Status: Not a bug Package: stomp (PECL)
PHP Version: 7.0.12 OS: Ubuntu 14.04.4 LTS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: torreshig-git1 at yahoo dot es
New email:
PHP Version: OS:


 [2016-10-15 16:28 UTC] torreshig-git1 at yahoo dot es
I am using PHP 7.0 with Apache2 in Ubuntu trusty.

I have installed the STOMP library doing

pear install stomp-2.0.0.tgz

And adding to my php.ini.

With phpinfo() I can see the Stomp installed correctly:


Stomp	enabled
API version	2.0.0
SSL Support	disabled
Directive	Local Value	Master Value
stomp.default_broker	tcp://localhost:61613	tcp://localhost:61613
stomp.default_connection_timeout_sec	2	2
stomp.default_connection_timeout_usec	0	0
stomp.default_password	no value	no value
stomp.default_read_timeout_sec	2	2
stomp.default_read_timeout_usec	0	0
stomp.default_username	no value	no value

But I have this script:


$foo = new Stomp('tcp://localhost:61613');
//$foo = new \Stomp('tcp://localhost:61613');

And When I run this error is shown:

PHP Fatal error: Uncaught Error: Class 'Stomp' not found in /vagrant/www/web/activemq-server.php:3 Stack trace:

0 {main} thrown in /vagrant/www/web/activemq-server.php on line 3

(Same error with  new \Stomp)

Test script:

$foo = new Stomp('tcp://localhost:61613');
//$foo = new \Stomp('tcp://localhost:61613');


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-15 18:18 UTC] torreshig at git1 dot yahoo dot es

This problem happens only when the script is run from console. If the script is run from browser then it works correctly.
 [2016-10-15 21:17 UTC] torreshig at git1 dot yahoo dot es
I added the extension to this file /etc/php/7.0/apache2/php.ini. It is necessary to added to Cli's php.ini, in my case localized in /etc/php/7.0/cli/php.ini. 

I guess this fake bug should be closed and deleted.
 [2016-10-18 19:29 UTC]
-Status: Open +Status: Not a bug
 [2016-10-18 19:29 UTC]
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 13:01:28 2024 UTC