Git Product home page Git Product logo

Comments (5)

paragonie-scott avatar paragonie-scott commented on May 25, 2024

Okay, based on the error code you included in this issue:

PHP Error[2]: include(ParagonIE_Sodium_Compat.php): failed to open stream: No such file or directory

I'm going to assume this is an upstream issue. We don't name our files that way internally.

Can you post a full stack trace? (Use three backticks before and after to format them.)

like so

:)

from sodium_compat.

ursuleacv avatar ursuleacv commented on May 25, 2024

command
php cron.php test

stack trace

php cron.php test
PHP Error[2]: include(ParagonIE_Sodium_Compat.php): failed to open stream: No such file or directory
    in file C:\localhost\framework\YiiBase.php at line 463
#0 C:\localhost\framework\YiiBase.php(463): include()
#1 unknown(0): autoload()
#2 C:\localhost\protected\vendor\paragonie\sodium_compat\lib\constants.php(8): spl_autoload_call()
#3 C:\localhost\protected\vendor\paragonie\sodium_compat\lib\sodium_compat.php(825): require_once()
#4 C:\localhost\protected\vendor\paragonie\sodium_compat\autoload.php(45): require_once()
#5 C:\localhost\protected\vendor\composer\autoload_real.php(70): require()
#6 C:\localhost\protected\vendor\composer\autoload_real.php(60): composerRequire50966560348a0ac36e4b9ee4405e5f09()
#7 C:\localhost\protected\vendor\autoload.php(7): getLoader()
#8 C:\localhost\protected\commands\TestCommand.php(7): require_once()
#9 C:\localhost\framework\console\CConsoleCommandRunner.php(166): require_once()
#10 C:\localhost\framework\console\CConsoleCommandRunner.php(67): CConsoleCommandRunner->createCommand()
#11 C:\localhost\framework\console\CConsoleApplication.php(92): CConsoleCommandRunner->run()
#12 C:\localhost\framework\base\CApplication.php(185): CConsoleApplication->processRequest()
#13 C:\localhost\cron.php(19): CConsoleApplication->run()

from sodium_compat.

paragonie-scott avatar paragonie-scott commented on May 25, 2024

Okay, this is an interesting one.

Yii looks for \ in the class name. If it's not found, it tries to include the file flatly. Which doesn't work.

The best workaround is to create a file called ParagonIE_Sodium_Compat.php that just does nothing:

<?php
// NOP

This should prevent the behavior in Yii's autoloader from breaking your app. I also attempted to contribute an upstream patch to Yii, but there's no guarantee it will be accepted. (Yii 1 seems to be a dead project.)

from sodium_compat.

paragonie-scott avatar paragonie-scott commented on May 25, 2024

Looks like that's actually irrelevant. Hmm.

This might be a problem best fixed in https://github.com/pusher/pusher-http-php

from sodium_compat.

paragonie-scott avatar paragonie-scott commented on May 25, 2024

Looks like yiisoft/yii#4272 is the core problem here.

from sodium_compat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.