php.net |  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
Votes:3
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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: torreshig-git1 at yahoo dot es
New email:
PHP Version: OS:

 

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

I have installed the STOMP library doing

wget http://pecl.php.net/get/stomp-2.0.0.tgz
pear install stomp-2.0.0.tgz

And adding extension=stomp.so to my php.ini.

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

Stomp

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:

<?php

$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:
---------------
<?php

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


Patches

Pull Requests

History

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

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
SOLVED:
	
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] bwoebi@php.net
-Status: Open +Status: Not a bug
 [2016-10-18 19:29 UTC] bwoebi@php.net
.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC