|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2017-04-01 21:34 UTC] tpunt@php.net
 
-Status: Open
+Status: Wont fix
  [2017-04-01 21:34 UTC] tpunt@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 02:00:02 2025 UTC | 
Description: ------------ Enabling the SAM extension causes problems for users due to the following code: PHP_RINIT_FUNCTION(sam) { if (zend_eval_string("require_once(\"SAM/php_sam.php\");", NULL, "sam_factory" TSRMLS_CC) != SUCCESS) { /* set the standard error no for unsupported protocol */ return FAILURE; } return SUCCESS; } A user who ends up enabling this PECL extension (for example, via the PHP installer) ends up with problems especially users who simply install a lot of PECL extensions because they can (the newish installer makes this so easy). This could be a documentation problem? The php_sam.php file exists in pecl/sam/ but... something needs to be done here as this doesn't feel right. AFAICT, a person must hunt this file down from pecl/sam/, stick it in a SAM/ that's available in include_path, and then it'll work. I just now helped a user solve this and notice this problem comes up from time to time all over the web. Reproduce code: --------------- <?php echo 'oh sam...'; ?> Expected result: ---------------- oh sam... Actual result: -------------- PHP Warning: require_once(SAM/php_sam.php): failed to open stream: No such file PHP Fatal error: require_once(): Failed opening required 'SAM/php_sam.php'