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

Need warning: SQLite database directory must be writeable #9

Closed
mcd-php opened this issue Apr 24, 2013 · 3 comments
Closed

Need warning: SQLite database directory must be writeable #9

mcd-php opened this issue Apr 24, 2013 · 3 comments

Comments

@mcd-php
Copy link

mcd-php commented Apr 24, 2013

SQLite database directory must be writeable.
Otherwise the oauth2-server-demo/web/demo/authorized fails with obscure error:

SQLSTATE[HY000]: General error: 14 unable to open database file

Please add checks for file and folder permission and issue a bold warning if they are insufficient.

The best place i see for this is in index.php before

return new OAuth2_Storage_Pdo(array('dsn' => 'sqlite:'.$sqliteDir));

Sadly i do not know Silex enough to implement this in graceful manner ;(

This error is quite nasty and non-obvious and surely robbed many people like me of their precious man-hours, summing up to man-months across all potential user base.

@bshaffer
Copy link
Owner

I agree. Are you planning on sending a pull request to fix this issue? I agree index.php is the best place to check, and requires only a call to is_readable

Brent Shaffer

On Wed, Apr 24, 2013 at 8:01 AM, mcd-php notifications@github.com wrote:

SQLite database directory must be writeable.
Otherwise the oauth2-server-demo/web/demo/authorized fails with obscure error:
SQLSTATE[HY000]: General error: 14 unable to open database file
Please add checks for file and folder permission and issue a bold warning if they are insufficient.
The best place i see for this is in index.php before
return new OAuth2_Storage_Pdo(array('dsn' => 'sqlite:'.$sqliteDir));
Sadly i do not know Silex enough to implement this in graceful manner ;(

This error is quite nasty and non-obvious and surely robbed many people like me of their precious man-hours, summing up to man-months across all potential user base.

Reply to this email directly or view it on GitHub:
#9

@mcd-php
Copy link
Author

mcd-php commented Apr 24, 2013

I can only do this in very brutal manner without integration with Silex/Twig error reporting path and decoration - sorry, don't want to learn it.

NO, is_readable() and even is_writable() are not sufficient - the folder must be writable.

@bshaffer
Copy link
Owner

You seem very concerned about man hours but unwilling to invest any of your own. I have invested many of my own as part of building these libraries.

I do not need fancy error handling. It can die as a result of the directory not being readable, as anything is better than an obfuscated error.

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