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

file_put_contents fails when there is a colon in filename #3207

Closed
Renkas opened this Issue Jun 10, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@Renkas

Renkas commented Jun 10, 2016

It seems that file_put_contents does not like semicolons in filename.

[PHPUnit_Framework_Exception]
file_put_contents(/var/www/tests/codeception/frontend/_output/tests.codeception.frontend.acceptance.SignupCest:testUserSignup.fail.html): failed to open stream: Protocol error

If I change str_replace at method _failed() in /src/Codeception/Lib/InnerBrowser.php so that single colons will be replaced instead of double colons then everything works fine.

System:

PHP 5.6.20-1~dotdeb+7.1 (cli) (built: Apr 1 2016 04:14:49)
Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u6 x86_64 GNU/Linux

@Naktibalda Naktibalda changed the title from file_put_contents failes when there is a colon in filename to file_put_contents fails when there is a colon in filename Jun 11, 2016

@maxiwheat

This comment has been minimized.

Show comment
Hide comment
@maxiwheat

maxiwheat Jun 14, 2016

+1

I'm having the same issue : failed to open stream: Protocol error. I think this is related to Windows not allowing colon in file names. I run a Linux VM on my workstation (Windows 7) and my project is in a shared folder between my Windows host and the VM. Codeception tries to create a file in that folder with a colon when a test fails, but it then throws this exception.

maxiwheat commented Jun 14, 2016

+1

I'm having the same issue : failed to open stream: Protocol error. I think this is related to Windows not allowing colon in file names. I run a Linux VM on my workstation (Windows 7) and my project is in a shared folder between my Windows host and the VM. Codeception tries to create a file in that folder with a colon when a test fails, but it then throws this exception.

@Renkas

This comment has been minimized.

Show comment
Hide comment
@Renkas

Renkas Jun 15, 2016

I have same setup. Windows host that runs Linux VM and project folder is shared.

Renkas commented Jun 15, 2016

I have same setup. Windows host that runs Linux VM and project folder is shared.

@MarkParnwell

This comment has been minimized.

Show comment
Hide comment
@MarkParnwell

MarkParnwell Jun 15, 2016

+1

Same issue: Windows host, Linux VM, shared project folder

MarkParnwell commented Jun 15, 2016

+1

Same issue: Windows host, Linux VM, shared project folder

@DavertMik DavertMik added BUG 2.2 labels Jun 15, 2016

Naktibalda added a commit that referenced this issue Jun 18, 2016

Merge pull request #3231 from Codeception/fix-failed-chars
Fixed creating snapshot files on failure. Closes #3207
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment