Windows Server Install "Confused"

by stevenriz, Monday, August 26, 2019, 15:10 (1705 days ago)

Hello. I know it doesn't take much but I am having trouble following the Windows install instructions for Selfoss https://github.com/SSilence/selfoss/wiki/Installation-on-Windows and am stuck.

- I have Apache running on the server and have the "It Works" index.html page opening fine
- I have PHP running ok as the index.php I created seems to work fine
- MySQL is installed and I created the selfoss database but the instructions say the db will be automatically populated; How? I must have missed something to connect MySQL to Selfoss
- I open the selfoss index.php and I see a login screen but don't know the credentials; are they configured in the db?

I think my main issue is with the database and how to connect Selfoss to it. I haven't moved onto the Windows Task Scheduler piece yet in thoughts I need to get the database issue solved first...

Any thoughts?

Thanks,
Steve

Windows Server Install "Confused"

by stevenriz, Monday, August 26, 2019, 19:25 (1705 days ago) @ stevenriz

Just adding some notes...

I copied all Public files to the htdocs folder and now the page displays correctly from what I can tell. I created the MySQL database "create database selfoss" and the db created has a filename E:\MySQL\data\selfoss\db.opt not selfoss.db -- is this ok?

Just a tad confused...

Thank you again.

Windows Server Install "Confused"

by stevenriz, Monday, August 26, 2019, 20:58 (1704 days ago) @ stevenriz

I think I am getting close. Only a few errors in the Apache errors log file. Where do I define the PHP startup libs? Still looking... thanks!

[Mon Aug 26 14:51:42.586500 2019] [mpm_winnt:notice] [pid 6480:tid 644] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Mon Aug 26 14:51:44.617831 2019] [mpm_winnt:notice] [pid 5716:tid 596] AH00364: Child: All worker threads have exited.
[Mon Aug 26 14:51:44.633448 2019] [mpm_winnt:notice] [pid 6480:tid 644] AH00430: Parent: Child process 5716 exited successfully.
PHP Warning: PHP Startup: Unable to load dynamic library 'mysql' (tried: C:\\php\\ext\\mysql (The specified module could not be found.), C:\\php\\ext\\php_mysql.dll (The specified module could not be found.)) in Unknown on line 0
[Mon Aug 26 14:51:45.774773 2019] [mpm_winnt:notice] [pid 7060:tid 644] AH00455: Apache/2.4.41 (Win64) PHP/7.3.7 configured -- resuming normal operations
[Mon Aug 26 14:51:45.774773 2019] [mpm_winnt:notice] [pid 7060:tid 644] AH00456: Apache Lounge VS16 Server built: Aug 9 2019 16:46:32
[Mon Aug 26 14:51:45.774773 2019] [core:notice] [pid 7060:tid 644] AH00094: Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache24'
[Mon Aug 26 14:51:45.774773 2019] [mpm_winnt:notice] [pid 7060:tid 644] AH00418: Parent: Created child process 2724
PHP Warning: PHP Startup: Unable to load dynamic library 'mysql' (tried: C:\\php\\ext\\mysql (The specified module could not be found.), C:\\php\\ext\\php_mysql.dll (The specified module could not be found.)) in Unknown on line 0
[Mon Aug 26 14:51:46.243530 2019] [mpm_winnt:notice] [pid 2724:tid 596] AH00354: Child: Starting 64 worker threads.

Windows Server Install "Confused"

by jtojnar, Monday, August 26, 2019, 21:28 (1704 days ago) @ stevenriz

MySQL is installed and I created the selfoss database but the instructions say the db will be automatically populated; How? I must have missed something to connect MySQL to Selfoss

That would be the step 6.

I open the selfoss index.php and I see a login screen but don't know the credentials; are they configured in the db?

They are configured in the config.ini, see https://github.com/SSilence/selfoss#configuration

I created the MySQL database "create database selfoss" and the db created has a filename E:\MySQL\data\selfoss\db.opt not selfoss.db -- is this ok?

I am not sure what the internal structure of MySQL database is. But it does not need to be selfoss.db
– that is only meant for SQLite database.

I think I am getting close. Only a few errors in the Apache errors log file. Where do I define the PHP startup libs? Still looking... thanks!

I guess that will be different depending on how you installed PHP server. If you used XAMPP or WampServer installers, I would expect the mysql module to already be enabled. You will need to consult documentation provided with the installer you used.

Windows Server Install "Confused"

by stevenriz, Tuesday, August 27, 2019, 17:21 (1704 days ago) @ jtojnar

thanks for the reply. It helps, although I did follow step 6 but my config.ini has a db_file param but it appears that is only relevant to sqlite. I will remove it and see what happens.
[globals]
db_type=mysql
db_file=E:\MySQL\data\selfoss\db.opt (to be removed)
db_host=localhost
db_database=selfoss
db_username=root@localhost
db_password=***
db_port=3306

for PHP install, I just copied the contents of the php-7.3.7-Win32-VC15-x64.zip file to the c:\PHP folder and configured the php.ini file. the webpage comes up fine with exception of the message "Load list error: error Internal Server Error" then the page reads "No items loaded, reload?"


I see an error in the Apache error log file and am trying to figure that out as well...
PHP Warning: PHP Startup: Unable to load dynamic library 'mysql' (tried: C:\\php\\ext\\mysql (The specified module could not be found.), C:\\php\\ext\\php_mysql.dll (The specified module could not be found.)) in Unknown on line 0

Now, I am uncertain how to add feeds... Is this the part of the Selfoss document explaining it?
Extend
You can easily add your own data sources. Spouts (aka plugins) fetch the content from the different sources. Some spouts are included:

Learning as I go...

Windows Server Install "Confused"

by jtojnar, Tuesday, August 27, 2019, 23:53 (1703 days ago) @ stevenriz

thanks for the reply. It helps, although I did follow step 6 but my config.ini has a db_file param but it appears that is only relevant to sqlite. I will remove it and see what happens.

Yeah, it will be just ignored when db_type is not sqlite.

[globals]
db_type=mysql
db_file=E:\MySQL\data\selfoss\db.opt (to be removed)
db_host=localhost
db_database=selfoss
db_username=root@localhost

This should most likely be just root. localhost is already included in db_host.

I see an error in the Apache error log file and am trying to figure that out as well...
PHP Warning: PHP Startup: Unable to load dynamic library 'mysql' (tried: C:\\php\\ext\\mysql (The specified module could not be found.), C:\\php\\ext\\php_mysql.dll (The specified module could not be found.)) in Unknown on line 0

I think there is only php_mysqli.dll and php_pdo_mysql.dll in PHP 7.3. I would guess that in your php.ini, you have extension=mysql (probably obtained from some earlier version of PHP). Try removing that line and making sure the required extension=pdo_mysql is present instead (not commented out).

Now, I am uncertain how to add feeds... Is this the part of the Selfoss document explaining it?

Hmm, apparently we do not have any usage guide; added it to the issue list.

You can add feeds from the “Settings” page (accessible by clicking the cloud icon in the sidebar).

Extend
You can easily add your own data sources. Spouts (aka plugins) fetch the content from the different sources. Some spouts are included:

That is meant more for a developers. For example, if they want to subscribe to a timeline of a social network that does not provide RSS feed.

Learning as I go...

Windows Server Install "Confused"

by stevenriz, Wednesday, August 28, 2019, 16:48 (1703 days ago) @ jtojnar

ok I think we're down to one issue, logging in. We are unable to login. Upon entering the credentials we have programmed in the config.ini file, the login screen remains as if the username or password isn't correct. see default.log below...

Current config.ini
; see https://selfoss.aditu.de for more information about
; the configuration parameters
[globals]
db_type=mysql
db_file=E:\MySQL\data\selfoss\db.opt
db_host=localhost
db_database=selfoss
db_username=root
db_password=hello
db_port=3306
db_prefix=
logger_destination=file:data/logs/default.log
logger_level=ERROR
items_perpage=50
items_lifetime=30
base_url=
username=secretagent
password=Welcome@
salt=Welcome@
public=1
html_title=selfoss
rss_title=selfoss feed
rss_max_items=300
rss_mark_as_read=0
homepage=newest
language=0
auto_mark_as_read=0
auto_collapse=0
auto_stream_more=1
anonymizer=
use_system_font=
share=gtfpde
wallabag=
wallabag_version=1
allow_public_update_access=
unread_order=
load_images_on_mobile=0
auto_hide_read_on_mobile=0
env_prefix=selfoss_
camo_domain=
camo_key=
scroll_to_article_header=1

Last entry in Apache default.log
[2019-08-28 14:46:22] selfoss.ERROR: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) {"exception":"[object] (PDOException(code: 1045): SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) at C:\\Apache24\\htdocs\\vendor\\bcosca\\fatfree-core\\db\\sql.php:519)
[stacktrace]
#0 C:\\Apache24\\htdocs\\vendor\\bcosca\\fatfree-core\\db\\sql.php(519): PDO->__construct('mysql:host=loca...', 'root', 'hello', Array)
#1 C:\\Apache24\\htdocs\\daos\\mysql\\Database.php(42): DB\\SQL->__construct('mysql:host=loca...', 'root', 'hello', Array)
#2 C:\\Apache24\\htdocs\\daos\\Tags.php(23): daos\\mysql\\Database->__construct()
#3 C:\\Apache24\\htdocs\\controllers\\Index.php(48): daos\\Tags->__construct()
#4 C:\\Apache24\\htdocs\\vendor\\bcosca\\fatfree-core\\base.php(1806): controllers\\Index->home(Object(Base), Array, 'controllers\\\\Ind...')
#5 C:\\Apache24\\htdocs\\vendor\\bcosca\\fatfree-core\\base.php(1627): Base->call(Array, Array, Array)
#6 C:\\Apache24\\htdocs\\index.php(80): Base->run()
#7 {main}
"}

Windows Server Install "Confused"

by jtojnar, Thursday, August 29, 2019, 00:20 (1702 days ago) @ stevenriz

The config file should contain a hash of the password. Visit https://url-to-your-selfoss-instance/password, enter a password you want to use and paste the resulting hash into the config file.

The error in the log is unrelated. It appears that selfoss is unable to connect to database. Do the database credentials work for other applications?

Windows Server Install "Confused"

by stevenriz, Thursday, August 29, 2019, 15:57 (1702 days ago) @ jtojnar

Hi again. Couple things.

1. /password doesn't exist in htdocs, we get "The requested URL was not found on this server" -- I don't see any reference to adding or creating /password or /update as referenced in another setup doc I found. Where do both of those references come from? I searched the entire xampp/selfoss directory structure and found neither of these files; so where do they come from?

2. We stripped the server back down and went with an xampp install. We're getting that setup now... I will open a new forum post if we have issues.

Windows Server Install "Confused"

by stevenriz, Thursday, August 29, 2019, 15:57 (1702 days ago) @ stevenriz

oh and I also wanted to thank you for helping, I'm sure it's thankless sometimes...

Steve

Windows Server Install "Confused"

by jtojnar, Thursday, August 29, 2019, 18:04 (1702 days ago) @ stevenriz

1. /password doesn't exist in htdocs, we get "The requested URL was not found on this server" -- I don't see any reference to adding or creating /password or /update as referenced in another setup doc I found. Where do both of those references come from? I searched the entire xampp/selfoss directory structure and found neither of these files; so where do they come from?

Yeah, those are virtual files. Apache will internally redirect you to index.php using mod_rewrite rules defined in .htaccess file.

2. We stripped the server back down and went with an xampp install. We're getting that setup now... I will open a new forum post if we have issues.


Good luck! Hopefully, it will come with less hurdles.

Windows Server Install "Confused"

by stevenriz, Thursday, August 29, 2019, 18:50 (1702 days ago) @ jtojnar

ah I see the virtual redirects now in index.php. I also see remarks "for all users" and "users that are logged in" (not word for word). Logging in is still a problem here, we are still unable to.

From the MySQL admin button on the XAMPP control panel, it tried to open the Welcome to phpMyAdmin page. The page is in error with the following 3 lines of text...

- MySQL said: Cannot connect: invalid settings.
- mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO)
- phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.


Nest...
We added a feed directly into the database and we can see the feed within the main selfoss page but we can't do anything with it. We cannot login. Just not sure why.

I feel we're close but still no cigar...

Steve

Windows Server Install "Confused"

by jtojnar, Friday, August 30, 2019, 00:17 (1701 days ago) @ stevenriz

If you still use the config from https://selfoss.aditu.de/forum/index.php?id=1400, you have selfoss in the public mode. If you set the password key in the config.ini file to one you got from the /password virtual page, you should be able to enter the password into a login page. You can open it by clicking the key button in the sidebar:

[image]

Or you can change to public to 0 and you should be greeted by the login page.

Windows Server Install "Confused"

by stevenriz, Friday, August 30, 2019, 16:28 (1701 days ago) @ jtojnar

hey thanks for the help, we are up and running on a linux system. Only help we need now is if we can have the feeds list in an expanded way, not collapsed. I opened another forum post, hopefully this is possible. Thanks again!!

RSS Feed of thread
powered by my little forum