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

unable to open file #438

Closed
kaplannn opened this issue Jun 28, 2017 · 11 comments
Closed

unable to open file #438

kaplannn opened this issue Jun 28, 2017 · 11 comments

Comments

@kaplannn
Copy link

I am getting this error after i specified the database:

"Fatal error: Uncaught PDOException: SQLSTATE[HY000] [14] unable to open database file in /var/www/html/Organizr/user.php:171 Stack trace: #0 /var/www/html/Organizr/user.php(171): PDO->__construct('sqlite:/opt/org...') #1 /var/www/html/Organizr/index.php(70): User->__construct('registration_ca...') #2 {main} thrown in /var/www/html/Organizr/user.php on line 171"

I have read in the wiki about this issue. So i tried to get the right permissions. I changed it to www-data:www-data, root:root, but nothing seems to work.

Could you guys maybe help me with that?

i also tried to do chmod 777, just in case....

Greets :)

@causefx
Copy link
Owner

causefx commented Jun 29, 2017

goto check.php

see that the persmissions say there. Also what OS are you running?

and last, create a test php file with this code:

<?php

echo 'Current webserver user: ' . getenv('USER');

Let me know what the output is.

@kaplannn
Copy link
Author

I am using Ubuntu 16.04

check.php says that:

image

this is the only red thing.

My user is: www-data

image

Linux Permissions on the Folder:

image

Is it because of the zip? strange due to i have installed zip....

Thanks and Greetings :)

@kaplannn
Copy link
Author

kaplannn commented Jun 29, 2017

fuck me... i installed the wrong zip. now everything is green when i am accessing check.php but i still get the error:

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [14] unable to open database file in /var/www/html/Organizr/user.php:171 Stack trace: #0 /var/www/html/Organizr/user.php(171): PDO->__construct('sqlite:/opt/org...') #1 /var/www/html/Organizr/index.php(70): User->__construct('registration_ca...') #2 {main} thrown in /var/www/html/Organizr/user.php on line 171

i also restarted nginx and used an ikognito tab for testing :)

@causefx
Copy link
Owner

causefx commented Jun 29, 2017

can you also do sudo chown -R www-data:www-data /var/www/html

@kaplannn
Copy link
Author

i did that already.. still not working ):

@causefx
Copy link
Owner

causefx commented Jun 29, 2017

can u ls -l both /var/www/html & /var/www/html/Organizr please and post output

@causefx
Copy link
Owner

causefx commented Jun 30, 2017

anything?

@causefx causefx closed this as completed Jul 5, 2017
@kaplannn
Copy link
Author

sorry i was on holidays...

for /var/www/html:

image

for /var/www/html/Organizr:

image

@causefx
Copy link
Owner

causefx commented Jul 17, 2017

actually i see the problem now, you specified /opt/organizr or something for DB location. can you make sure that folder is readable and writable by www-data

@kaplannn
Copy link
Author

ohh that did it! changed /opt/organizr to www-data as the owner.

thank you very much :)

@causefx
Copy link
Owner

causefx commented Jul 17, 2017

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants