Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phalcon\Session\Adapter\Stream wrong open save path #14265

Closed
ZhangRuiMingZRM opened this issue Jul 29, 2019 · 3 comments
Assignees
Projects
Milestone

Comments

@ZhangRuiMingZRM
Copy link
Contributor

@ZhangRuiMingZRM ZhangRuiMingZRM commented Jul 29, 2019

  • Phalcon version: 4.0.0-beta.1
  • PHP Version: 7.3.6
  • Operating System: ubuntu
  • Installation type: Compiling from source
  • Server: php web server

When running the following code and get this:

 Warning: Phalcon\Session\Adapter\Stream::write(/90192p0avuirodu6r2914kvn9o): failed to open stream: Permission denied in Unknown on line 0
    $session = new Manager();
    $files = new Stream(
        [
            'savePath' => '/tmp',
        ]
    );
    $session->setHandler($files);
    $session->start();

This may be due to the public function open(var savePath, var sessionName) in the phalcon/phalcon/Session/Adapter/Stream.zep

public function open(var savePath, var sessionName) -> bool

    public function open(var savePath, var sessionName) -> bool
    {
        var path;

        if true !== ends_with(savePath, "/") {
            let path = savePath . "/";
        }

        let this->path = path;

        return true;
    }

Previous attributes path are reassigned

@ZhangRuiMingZRM ZhangRuiMingZRM changed the title Phalcon\Session\Adapter\Stream wrong open savePath Phalcon\Session\Adapter\Stream wrong open save path Jul 29, 2019
@sergeyklay sergeyklay added this to To do in 4.0 Release via automation Jul 29, 2019
@sergeyklay sergeyklay added this to the 4.0.0 milestone Jul 29, 2019
This was referenced Aug 3, 2019
@ruudboon ruudboon moved this from To do to In progress in 4.0 Release Aug 20, 2019
@ruudboon ruudboon self-assigned this Aug 20, 2019
@beareable

This comment has been minimized.

Copy link

@beareable beareable commented Aug 23, 2019

what time this bug will be fixed?

@ruudboon

This comment has been minimized.

Copy link
Member

@ruudboon ruudboon commented Aug 23, 2019

@beareable Want to fix it before the next release. Bug is fixed in attached pull above. But I'm struggling with the tests. Need to fix that before merging.

@ruudboon ruudboon referenced this issue Aug 27, 2019
4 of 5 tasks complete
sergeyklay added a commit that referenced this issue Aug 27, 2019
Fixed issue #14265
@sergeyklay

This comment has been minimized.

Copy link
Member

@sergeyklay sergeyklay commented Aug 27, 2019

Fixed in the 4.0.x branch. Feel free to open a new issue if the problem appears again. Thank you for the bug report.

@sergeyklay sergeyklay closed this Aug 27, 2019
4.0 Release automation moved this from In progress to Done Aug 27, 2019
Jeckerson added a commit to phalcon/vokuro that referenced this issue Sep 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4.0 Release
  
Done
4 participants
You can’t perform that action at this time.