|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57525 Importing classes does not work, using the PHP command line.
Submitted: 2007-02-13 10:22 UTC Modified: 2013-02-26 04:32 UTC
From: info at lucasvd dot nl Assigned:
Status: Not a bug Package: runkit (PECL)
PHP Version: 5.2.0 OS: Windows Vista/Debian
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: info at lucasvd dot nl
New email:
PHP Version: OS:


 [2007-02-13 10:22 UTC] info at lucasvd dot nl
I'm creating an IRC Bot, with plugins. All my Plugins are classes, so if you made a change to your plugin, you hadd to restart to complete bot, to reload all plugins. But then I met runkit, and it would be the perfect solution.

But, when I ry to reload all my plugins using Runkit, runkit_import returns true, but the classes aren't reloaded. (When I started the bot through the PHP CLI)

Runkit did actually work when I started the bot through my browser.

Reproduce code:
	public function reload_plugins()
		// Check for runkit extension
			// Try to load it
				throw new Exception('Runkit extension not installed!');

		// Loop through all plugins
		foreach($this -> plugins as $name => $instance)
			if(runkit_import($this ->plugin_dir . $name.'/plugin.php', RUNKIT_IMPORT_OVERRIDE | RUNKIT_IMPORT_CLASSES))
				$this -> logger -> add($name.' Succesfully reloaded', IrcEvent::Other);

Expected result:
Classes are reloaded, without have to restart my bot.

Actual result:
On the PHP CLI, the classes aren't reloaded.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-09 19:22 UTC] tagyboy at gmail dot com
Does not work on Gentoo neither.
 [2013-02-26 04:32 UTC]
-Status: Open +Status: Not a bug
 [2013-02-26 04:32 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

I'm pretty sure this is fixed at this point, please try newest version in git.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Oct 25 08:01:24 2020 UTC