Skip to content

Class 'Crypt_CHAP_MSv2' not found error when using composer autoload.php #4

@malle-pietje

Description

@malle-pietje

I have checked and the Pear_CHAP.php file is available.
Any idea why this is happening?

Here's the code I'm using. The error occurs when using MSCHAPv2, PAP has been tested and works fine:

        $radius = new \Dapphp\Radius\Radius();
        $radius->setServer($radius_server['server'])
               ->setSecret($radius_server['shared_secret'])
               ->setNasIpAddress($radius_server['nas_ip_address']);

        /**
         * Send auth request, select method based on protocol value
         * can be PAP, CHAP, MSCHAPv1 or MSCHAPv2
         */
        switch ($radius_server['protocol']) {
            case 'PAP':
                $response = $radius->accessRequest($_REQUEST['radius_username'], $_REQUEST['radius_password']);
                break;
            case 'CHAP':
                $radius->setChapPassword($_REQUEST['radius_password']);
                $response = $radius->accessRequest($_REQUEST['radius_username']);
                break;
            case 'MSCHAPv1':
                $radius->setMSChapPassword($_REQUEST['radius_password']);
                $response = $radius->accessRequest($_REQUEST['radius_username']);
                break;
            case 'MSCHAPv2':
                $response = $radius->accessRequestEapMsChapV2($_REQUEST['radius_username'], $_REQUEST['radius_password']);
                break;
            default:
                $response = $radius->accessRequest($_REQUEST['radius_username'], $_REQUEST['radius_password']);
                break;
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions