I am trying CIUnit - PHP unit integration to codeigniter. But I am stuck - getting error that file is denied:

E:\projektai\php projektai\htdocs\ci_unit\tests>phpunit
PHPUnit 3.5.14 by Sebastian Bergmann.

....[CIUnit] PHP Error: Warning - include(E:\projektai\php projektai\htdocs\ci_u
nit\application\config\testing\database.php): failed to open stream: Permission
denied File Path: database/DB.php (line: 41)
[CIUnit] PHP Error: Warning - include(): Failed opening 'E:\projektai\php projek
tai\htdocs\ci_unit\application/config/testing/database.php' for inclusion (inclu
\other\xampp\php\PEAR') File Path: database/DB.php (line: 41)
[CIUnit] Error: 500 Message: No database connection settings were found in the d
atabase config file.

When I try to open that database.php file to see whats on this line 41, I see empty file, but its size is 4 KB. So I try also to open it with notepad and I get message 'access denied'. WHat is wrong there - why it is denied and what to do? How to get the acces?

4 Years
Discussion Span
Last Post by McLaren

hi! that may happen when you don't have all the permission on the file !
if you're working on a Windows O.S, you have to use filezila to change the rights into read, write and execute on the file.
if you're using Gnu/Linux: just got to the terminal and tape:

sudo chmod 777 filename

I am on windows

E:\projektai\php projektai\htdocs\ci_unit\application\config\testing>ls -l
total 4
-rw-rw-rw-  1 Darius 0 3211 2012-10-16 19:17 database.php
-rw-rw-rw-  1 Darius 0    0 2012-10-16 19:17 database.php.8084

As I see from this I have rights to read and write. And executable right is only for exe files, right?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.