|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57773 SAM requires a PHP file
Submitted: 2007-08-06 11:52 UTC Modified: 2017-04-01 21:34 UTC
From: philip at roshambo dot org Assigned:
Status: Wont fix Package: sam (PECL)
PHP Version: 5_2 CVS-2007-08-06 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.
Block user comment
Status: Assign to:
Bug Type:
From: philip at roshambo dot org
New email:
PHP Version: OS:


 [2007-08-06 11:52 UTC] philip at roshambo dot org
Enabling the SAM extension causes problems for users due to the following code:

    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'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-01 21:34 UTC]
-Status: Open +Status: Wont fix
 [2017-04-01 21:34 UTC]
Due to this extension not seeing any activity since 2007, this issue will not be fixed. We are therefore closing this now.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Oct 04 00:05:54 2022 UTC