php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #18735 Added phpinfo to mhash
Submitted: 2002-08-04 15:45 UTC Modified: 2002-08-04 17:37 UTC
From: neuman_peter at hotmail dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4CVS-2002-08-04 OS: All
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: neuman_peter at hotmail dot com
New email:
PHP Version: OS:

 

 [2002-08-04 15:45 UTC] neuman_peter at hotmail dot com
Hello,

This Patch adds mhash phpinfo function
And the Zend modifies modules struct like it in that
README.EXTENSIONS is.
I tested it and go it

Thanks
Peter Neuman

Index: mhash.c
===================================================================
RCS file: /repository/other/mhash.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 mhash.c
--- mhash.c	1 Aug 2002 16:56:33 -0000	1.1.1.1
+++ mhash.c	1 Aug 2002 19:07:30 -0000
@@ -44,19 +44,33 @@
 static PHP_MINIT_FUNCTION(mhash);
 
 zend_module_entry mhash_module_entry = {
-	STANDARD_MODULE_HEADER,
-	"mhash",
-	mhash_functions,
-	PHP_MINIT(mhash), NULL,
-	NULL, NULL,
-	NULL,
+#if ZEND_MODULE_API_NO >= 20010901
+    STANDARD_MODULE_HEADER,
+#endif
+    "mhash",
+    mhash_functions,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    PHP_MINFO(mhash),
+#if ZEND_MODULE_API_NO >= 20010901
     NO_VERSION_YET,
-	STANDARD_MODULE_PROPERTIES,
+#endif
+    STANDARD_MODULE_PROPERTIES
 };
 
 #ifdef COMPILE_DL_MHASH
 ZEND_GET_MODULE(mhash)
 #endif
+
+PHP_MINFO_FUNCTION(mhash)
+{
+        php_info_print_table_start();
+        php_info_print_table_row(2, "mhash Support", "enabled");
+        php_info_print_table_end();
+}
+
 #define MHASH_FAILED_MSG "mhash initialization failed"
 #define MHASH_KEYGEN_FAILED_MSG "mhash key generation failed"
 static PHP_MINIT_FUNCTION(mhash)
Index: php_mhash.h
===================================================================
RCS file: /repository/other/php_mhash.h,v
retrieving revision 1.1
diff -u -r1.1 php_mhash.h
--- php_mhash.h	1 Aug 2002 17:39:26 -0000	1.1
+++ php_mhash.h	1 Aug 2002 17:40:47 -0000
@@ -12,6 +12,7 @@
 extern zend_module_entry mhash_module_entry;
 #define mhash_module_ptr &mhash_module_entry
 
+PHP_MINFO_FUNCTION(mhash);
 PHP_FUNCTION(mhash_get_block_size);
 PHP_FUNCTION(mhash_get_hash_name);
 PHP_FUNCTION(mhash_count);

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-04 17:37 UTC] sniper@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 08:01:27 2024 UTC