mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #353] Documentation not clear enough where to put the sqlite path #302
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#302
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @domeniko-gentner on GitHub (Jul 2, 2019).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/353
Originally assigned to: @jasonmunro on GitHub.
💬 Question
I have enabled sqlite as PDO driver, but the comments in the h3m.ini file are not clear enough in where to pass the path to cypht. I'd use
db_namefor it, but I am not sure what you have intended. So, how do I use an sqlite database for authentication, settings et al?Environment:
latest Raspbian on a Pi3
PHP 7.0
SQLite 3
Apache 2
@jasonmunro commented on GitHub (Jul 2, 2019):
The poorly named db_socket config setting is the right place for the sqlite path. I will update the ini file to make that more clear. Let me know if you run into any issues.
@domeniko-gentner commented on GitHub (Jul 2, 2019):
This is my config:
I am still getting this when trying to make a user:
Database:
cypth.sqlitehaschmod 600(rw) and the directorychmod 700(rwx) forwww-data. The db does not have a user, however, the script reports errors without those values filled.@domeniko-gentner commented on GitHub (Jul 2, 2019):
I have found the reason: Looked through your code. I am using PHP 7.0 and SQLITE via PDO is deprecated since 5.4 or something. So, my only option right now is downgrade my PHP, which breaks my own projects or install MariaDB I guess.
https://www.php.net/manual/en/ref.pdo-sqlite.php
@jasonmunro commented on GitHub (Jul 2, 2019):
sqlite works for PHP 7 as far as I know - I have a travis build that should be using it here: https://travis-ci.org/jasonmunro/cypht/jobs/541951862
Looking at my Ubuntu PHP 7.2 install I see it in the PDO driver list (Ubuntu has both a php-sqlite3 and a php7.2-sqlite3 packages):
@jasonmunro commented on GitHub (Jul 3, 2019):
Just rereading your config and I noticed you have the db_socket value set to a directory (?). For sqlite this should be the path to the db file itself I think.
@domeniko-gentner commented on GitHub (Jul 3, 2019):
Yeah, I changed that after reading the db.php file. I didn't know how you programmed it. The key part was regenerating the site after. Didn't know you had to do that every time you change the config.
I am sorry, but the documentation is really sparse here and I don't mean that as an attack, but it was a bit hard to set up. I am not familiar with composer-based PHP apps.. The script to add a user finally works, but I still can't log in. I am going to figure it out though.