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

Install database error for missing db_last_error.php #3114

Closed
jdarwood007 opened this issue Nov 1, 2015 · 5 comments
Closed

Install database error for missing db_last_error.php #3114

jdarwood007 opened this issue Nov 1, 2015 · 5 comments

Comments

@jdarwood007
Copy link
Member

Warning: file_put_contents(/smf/db_last_error.php): failed to open stream: Permission denied in /smf/Settings.php on line 195

  1. We should include this file (empty) by default in our installer.
  2. We should make sure on install/upgrade that this file exists and is writable.
@albertlast
Copy link
Collaborator

is this issue existing?

@jdarwood007
Copy link
Member Author

I believe it is as I don't recall any checks being added into the installer to check this nor is it a default file.

Issues like this would occur on sites where permissions are not 777 on the smf folder and thus the system will fail to create this file.

@tinoest
Copy link
Contributor

tinoest commented Jan 8, 2017

It is still a issue, why isn't it included in the package?

Also should be detected during the install/upgrade process as a file which needs to be writable

@albertlast
Copy link
Collaborator

It's fine that the file is not in package.
It will created when it's needed.

And because the file is not in package the file access issue can not happen.
When this issue rised up,
than someone created this file by his own -> this issue is created by the user him self.

@tinoest
Copy link
Contributor

tinoest commented Jan 8, 2017

At no point do we inform the user that they need to make the root directory writable, which I'd argue is bad practise anyway.

We say about Settings.php but not db_last_error.php. It's even not shown in the SMF error log for me only my lighttpd error log.

Either we need to inform the user better or we create it at the start. I prefer the latter as it removes the chance or the db having a failure and it failing to write it due to permissions.

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

3 participants