[GH-ISSUE #67] Cannot register or login on fresh install #58

Closed
opened 2026-02-26 01:35:02 +03:00 by kerem · 9 comments
Owner

Originally created by @mioux on GitHub (Jul 16, 2014).
Original GitHub issue: https://github.com/JLiscom/OpenNote/issues/67

I have downloaded OpenNote 14.x, unzipped in /var/www/opennote

Apache is configured with alias /OpenNote /var/www/opennote
Root is configured for my roundcube installation in /var/www/roundcubemail

Database is initialized via /OpenNote/Service/install.php script (tested both sqlite and mysql)

  • With SQLite, I had an error :
    [Wed Jul 16 16:31:24 2014] [error] [client 77.242.202.234] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user 'notebook'@'localhost' (using password: YES)' in /var/www/opennote/Service/Config.php:44\nStack trace:\n#0 /var/www/opennote/Service/Config.php(44): PDO->__construct('mysql:host=127....', 'notebook', 'password')\n#1 /var/www/opennote/Service/Config.php(20): Config::mysqlConfig()\n#2 /var/www/opennote/Service/install.php(89): Config::dbConfig()\n#3 {main}\n thrown in /var/www/opennote/Service/Config.php on line 44, referer: https://xxx/OpenNote/Service/install.php?step=1

I then clicked "Back" and "SQLite" again, which correctly initialized the SQLite DB

  • With both configurations, I then have tried to access "/OpenNote", no register button is available. I got this error in apache log
    [Wed Jul 16 16:32:51 2014] [error] [client 77.242.202.234] File does not exist: /var/www/roundcubemail/var, referer: https://xxx/OpenNote/
  • I have inserted my username by hand (password hashed with php "crypt" function), but when I try to login, I have the exact same error as previous.

I think this error is related to the _ _ FILE _ _ var. I'm not a php expert (I mostly code T-SQL or C# :D) but I don't have found where the _ _ FILE _ _ var is initialized, I think this is the problem.

Originally created by @mioux on GitHub (Jul 16, 2014). Original GitHub issue: https://github.com/JLiscom/OpenNote/issues/67 I have downloaded OpenNote 14.x, unzipped in /var/www/opennote Apache is configured with alias /OpenNote /var/www/opennote Root is configured for my roundcube installation in /var/www/roundcubemail Database is initialized via /OpenNote/Service/install.php script (tested both sqlite and mysql) - With SQLite, I had an error : [Wed Jul 16 16:31:24 2014] [error] [client 77.242.202.234] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user 'notebook'@'localhost' (using password: YES)' in /var/www/opennote/Service/Config.php:44\nStack trace:\n#0 /var/www/opennote/Service/Config.php(44): PDO->__construct('mysql:host=127....', 'notebook', 'password')\n#1 /var/www/opennote/Service/Config.php(20): Config::mysqlConfig()\n#2 /var/www/opennote/Service/install.php(89): Config::dbConfig()\n#3 {main}\n thrown in /var/www/opennote/Service/Config.php on line 44, referer: https://xxx/OpenNote/Service/install.php?step=1 I then clicked "Back" and "SQLite" again, which correctly initialized the SQLite DB - With both configurations, I then have tried to access "/OpenNote", no register button is available. I got this error in apache log [Wed Jul 16 16:32:51 2014] [error] [client 77.242.202.234] File does not exist: /var/www/roundcubemail/var, referer: https://xxx/OpenNote/ - I have inserted my username by hand (password hashed with php "crypt" function), but when I try to login, I have the exact same error as previous. I think this error is related to the _ _ FILE _ _ var. I'm not a php expert (I mostly code T-SQL or C# :D) but I don't have found where the _ _ FILE _ _ var is initialized, I think this is the problem.
kerem 2026-02-26 01:35:02 +03:00
Author
Owner

@mioux commented on GitHub (Jul 16, 2014):

It works without working with alias (I put OpenNote folder inside my RC install dir)

<!-- gh-comment-id:49180596 --> @mioux commented on GitHub (Jul 16, 2014): It works without working with alias (I put OpenNote folder inside my RC install dir)
Author
Owner

@JLiscom commented on GitHub (Jul 16, 2014):

@mioux I just tested it and it does appear to work.
The installer is not the greatest thing I have ever written. Its hard because I need to use the PDO connection which needs a config but I also have to generate a config. I think that is where the error is coming from

What do you mean about the alias? Just trying to understand how I can handle this case.

<!-- gh-comment-id:49180968 --> @JLiscom commented on GitHub (Jul 16, 2014): @mioux I just tested it and it does appear to work. The installer is not the greatest thing I have ever written. Its hard because I need to use the PDO connection which needs a config but I also have to generate a config. I think that is where the error is coming from What do you mean about the alias? Just trying to understand how I can handle this case.
Author
Owner

@JLiscom commented on GitHub (Jul 16, 2014):

@mioux I also should note the front end JS app will not tell you if it cannot connect to the back end. That was something that didn't make it into this release. However, once it is configured everything should work.

<!-- gh-comment-id:49181466 --> @JLiscom commented on GitHub (Jul 16, 2014): @mioux I also should note the front end JS app will not tell you if it cannot connect to the back end. That was something that didn't make it into this release. However, once it is configured everything should work.
Author
Owner

@mioux commented on GitHub (Jul 16, 2014):

Here is my apache conf file

<VirtualHost 0.0.0.0:443>

CustomLog logs/xxxx.log combined
ErrorLog  logs/xxxx.err
ServerName xxxx
DocumentRoot /var/www/roundcubemail/
DirectoryIndex index.php index.html index.htm
SSLEngine On
SSLProtocol -all +SSLv3
SSLStrictSNIVHostCheck off
SSLCipherSuite SSLv3:+HIGH
SSLCertificateFile /xxxx/xxx.crt
SSLCertificateKeyFile /xxx/xxx.key
Alias /sabredav /var/www/sabredav
Alias /agenda /var/www/agendav/web/public
Alias /OpenNote /var/www/opennote

It seems that OpenNote tries to open /var/www/roundcubemail/var/www/opennote instead of /var/www/opennote.

There is no error when I put the OpenNote folder in /var/www/roundcubemail and remove the alias line. It works, but I would prefer separate the 2 softwares.

I have tested the magic variable FILE through alias, it's /var/www/opennote as expected

<!-- gh-comment-id:49182097 --> @mioux commented on GitHub (Jul 16, 2014): Here is my apache conf file <VirtualHost 0.0.0.0:443> ``` CustomLog logs/xxxx.log combined ErrorLog logs/xxxx.err ServerName xxxx DocumentRoot /var/www/roundcubemail/ DirectoryIndex index.php index.html index.htm SSLEngine On SSLProtocol -all +SSLv3 SSLStrictSNIVHostCheck off SSLCipherSuite SSLv3:+HIGH SSLCertificateFile /xxxx/xxx.crt SSLCertificateKeyFile /xxx/xxx.key Alias /sabredav /var/www/sabredav Alias /agenda /var/www/agendav/web/public Alias /OpenNote /var/www/opennote ``` </VirtualHost> It seems that OpenNote tries to open /var/www/roundcubemail/var/www/opennote instead of /var/www/opennote. There is no error when I put the OpenNote folder in /var/www/roundcubemail and remove the alias line. It works, but I would prefer separate the 2 softwares. I have tested the magic variable **FILE** through alias, it's /var/www/opennote as expected
Author
Owner

@JLiscom commented on GitHub (Jul 16, 2014):

@mioux I will try to replicate and fix.

<!-- gh-comment-id:49182632 --> @JLiscom commented on GitHub (Jul 16, 2014): @mioux I will try to replicate and fix.
Author
Owner

@JLiscom commented on GitHub (Sep 8, 2014):

@mioux Can you see if the latest update fixes you issue

<!-- gh-comment-id:54777593 --> @JLiscom commented on GitHub (Sep 8, 2014): @mioux Can you see if the latest update fixes you issue
Author
Owner

@mioux commented on GitHub (Sep 9, 2014):

Tested with latest git release, it doesn't work

<!-- gh-comment-id:54963247 --> @mioux commented on GitHub (Sep 9, 2014): Tested with latest git release, it doesn't work
Author
Owner

@JLiscom commented on GitHub (Sep 30, 2014):

@mioux
Try changing you config to match https://github.com/FoxUSA/OpenNote/blob/Fox-Working/OpenNote/openNote/openNote.config.js#L24 (Added service.php to url) In future versions I will no longer use a .htaccess file as it does not work in cases like this

<!-- gh-comment-id:57257942 --> @JLiscom commented on GitHub (Sep 30, 2014): @mioux Try changing you config to match https://github.com/FoxUSA/OpenNote/blob/Fox-Working/OpenNote/openNote/openNote.config.js#L24 (Added `service.php` to url) In future versions I will no longer use a .htaccess file as it does not work in cases like this
Author
Owner

@mioux commented on GitHub (Oct 2, 2014):

Shame on me, I didn't saw this message.

It seems to work, I have made a rapid check (creating and editing a note) without error.

Thanks

<!-- gh-comment-id:57620968 --> @mioux commented on GitHub (Oct 2, 2014): Shame on me, I didn't saw this message. It seems to work, I have made a rapid check (creating and editing a note) without error. Thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OpenNote-JLiscom#58
No description provided.