Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
I have a self hosted server with a successfully running 2.0 version, all works fine. I made a new site now, which runs PHP just fine. I uploaded the couch 2.0 files from GitHub and configured access to the mysql (new user and new database). I opened the /couch/ url and successfully ran the installation wizard. It said "installation successful".

Now the problem: trying to log in, the site does not redirect me to the admin panel, but downloads a "couch" file. The file contains all the admin panel stuff. For some reason the page does not execute and display in browser, browser downloads it.

Since phpinfo works fine, and also the CouchCMS installation ran just fine, I think this is not a server config issue.

My setup: php7, https (this is defined in K_SITE_URL), mysql 5.7
there are no errors in the nginx logs, or php logs. I only see warnings:

normis@veikals:/usr/share/nginx/zane/couch$ php -f index.php
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KFuncs has a deprecated constructor in /usr/share/nginx/zane/couch/functions.php on line 45
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KError has a deprecated constructor in /usr/share/nginx/zane/couch/functions.php on line 4382
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KContext has a deprecated constructor in /usr/share/nginx/zane/couch/parser/parser.php on line 60
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KNode has a deprecated constructor in /usr/share/nginx/zane/couch/parser/parser.php on line 286
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KParser has a deprecated constructor in /usr/share/nginx/zane/couch/parser/parser.php on line 440
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KHTMLNode has a deprecated constructor in /usr/share/nginx/zane/couch/parser/HTMLParser.php on line 40
PHP Warning: Declaration of KHTMLNode::get_info() should be compatible with KNode::get_info($level = 0) in /usr/share/nginx/zane/couch/parser/HTMLParser.php on line 279
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KHTMLParser has a deprecated constructor in /usr/share/nginx/zane/couch/parser/HTMLParser.php on line 281
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KBBNode has a deprecated constructor in /usr/share/nginx/zane/couch/parser/BBParser.php on line 40
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KBBParser has a deprecated constructor in /usr/share/nginx/zane/couch/parser/BBParser.php on line 166
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KKeyword has a deprecated constructor in /usr/share/nginx/zane/couch/search.php on line 41
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KRange has a deprecated constructor in /usr/share/nginx/zane/couch/search.php on line 140
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KDB has a deprecated constructor in /usr/share/nginx/zane/couch/db.php on line 55
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KAuth has a deprecated constructor in /usr/share/nginx/zane/couch/auth/auth.php on line 50
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; PasswordHash has a deprecated constructor in /usr/share/nginx/zane/couch/auth/PasswordHash.php on line 30
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KUser has a deprecated constructor in /usr/share/nginx/zane/couch/auth/user.php on line 40
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KWebpage has a deprecated constructor in /usr/share/nginx/zane/couch/page.php on line 43
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KField has a deprecated constructor in /usr/share/nginx/zane/couch/field.php on line 41
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KFieldUser has a deprecated constructor in /usr/share/nginx/zane/couch/field.php on line 997
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KSingleCheckField has a deprecated constructor in /usr/share/nginx/zane/couch/field.php on line 1281
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KUserDefinedField has a deprecated constructor in /usr/share/nginx/zane/couch/field.php on line 1454
PHP Warning: Declaration of KExif::get_data() should be compatible with KUserDefinedField::get_data($for_ctx = 0) in /usr/share/nginx/zane/couch/field.php on line 1675
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KSingleCheckFieldForm has a deprecated constructor in /usr/share/nginx/zane/couch/field.php on line 1678
PHP Warning: Declaration of KSingleCheckFieldForm::handle_params($params) should be compatible with KUserDefinedFormField::handle_params($params, $node) in /usr/share/nginx/zane/couch/field.php on line 1720
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KNestable has a deprecated constructor in /usr/share/nginx/zane/couch/folder.php on line 40
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KFolder has a deprecated constructor in /usr/share/nginx/zane/couch/folder.php on line 389
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KNestedPage has a deprecated constructor in /usr/share/nginx/zane/couch/folder.php on line 816
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KAdminMenuItem has a deprecated constructor in /usr/share/nginx/zane/couch/folder.php on line 1355
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Route has a deprecated constructor in /usr/share/nginx/zane/couch/route.php on line 12
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Repeatable has a deprecated constructor in /usr/share/nginx/zane/couch/addons/repeatable/repeatable.php on line 40
PHP Warning: Declaration of Repeatable::get_data() should be compatible with KUserDefinedField::get_data($for_ctx = 0) in /usr/share/nginx/zane/couch/addons/repeatable/repeatable.php on line 599
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KSession has a deprecated constructor in /usr/share/nginx/zane/couch/addons/cart/session.php on line 40
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; SecureFile has a deprecated constructor in /usr/share/nginx/zane/couch/addons/data-bound-form/securefile.php on line 41
PHP Warning: Declaration of SecureFile::get_data() should be compatible with KUserDefinedField::get_data($for_ctx = 0) in /usr/share/nginx/zane/couch/addons/data-bound-form/securefile.php on line 583
PHP Warning: Declaration of KDateTime::get_data() should be compatible with KUserDefinedField::get_data($for_ctx = 0) in /usr/share/nginx/zane/couch/addons/data-bound-form/datetime.php on line 350
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KDateTimeForm has a deprecated constructor in /usr/share/nginx/zane/couch/addons/data-bound-form/datetime.php on line 353
PHP Warning: Declaration of KDateTimeForm::handle_params($params) should be compatible with KUserDefinedFormField::handle_params($params, $node) in /usr/share/nginx/zane/couch/addons/data-bound-form/datetime.php on line 387
PHP Deprecated: Non-static method KFuncs::is_title_clean() should not be called statically in /usr/share/nginx/zane/couch/header.php on line 379
Edit: jumped the gun, these are actually PHP WARNINGS not errors, sorry. Can't delete own posts :(

I did actually find some errors in the server log, not sure if relevant

2016/09/17 21:36:19 [error] 10338#10338: *2645 FastCGI sent in stderr: "PHP message: PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KFuncs has a deprecated constructor in /usr/share/nginx/zane/couch/functions.php on line 45
2016/09/17 21:36:19 [error] 10338#10338: *2645 FastCGI sent in stderr: "n /usr/share/nginx/zane/couch/field.php on line 997
2016/09/17 21:36:19 [error] 10338#10338: *2645 FastCGI sent in stderr: "od KFuncs::is_title_clean() should not be called statically in /usr/share/nginx/zane/couch/header.php on line 379" while reading response header from upstream, client: 46.109.30.81, server: zane.dodies.lv, request: "GET /couch/forgotpassword.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "zane.dodies.lv"
2016/09/17 21:36:19 [error] 10338#10338: *2645 FastCGI sent in stderr: "PHP message: PHP Warning: Declaration of KHTMLNode::get_info() should be compatible with KNode::get_info($level = 0) in /usr/share/nginx/zane/couch/parser/HTMLParser.php on line 0
2016/09/17 21:36:20 [error] 10338#10338: *2645 FastCGI sent in stderr: "PHP message: PHP Warning: Declaration of KHTMLNode::get_info() should be compatible with KNode::get_info($level = 0) in /usr/share/nginx/zane/couch/parser/HTMLParser.php on line 0
2016/09/17 21:36:20 [error] 10338#10338: *2654 FastCGI sent in stderr: "PHP message: PHP Warning: Declaration of KHTMLNode::get_info() should be compatible with KNode::get_info($level = 0) in /usr/share/nginx/zane/couch/parser/HTMLParser.php on line 0
That is pretty strange indeed as normally one sees this happening when the server is not configured to execute PHP files (as so serves them up as data). Clearly that is not the case here as PHP is executing fine in other contexts.

As for the deprecation notices and warnings, they really shouldn't be causing this problem.
To be on the safer side, I have just pushed a commit to GitHub that should remove (hopefully) all of those.
Could you please download it from there and test if that is so and that, perhaps, it also fixes the problem you are facing?

Do let me know if there are still any warnings/errors being reported in the log.

Thanks.
KK wrote: Do let me know if there are still any warnings/errors being reported in the log.


Warnings gone, but that was unrelated - I still get the issue unless I change the config file site url to http:// instead of https://

Code: Select all
define( 'K_SITE_URL', 'http://zane.dodies.lv/' );


This works partially. The admin login page does load (does not download php anymore), but without javascript or css files, browser says they could not be loaded due to protocol mismatch (site is configured to run as https://).

If I change the config file to https://.... it downloads the login page. If I uncomment that line altogether, it also downloads. Login page shows only with http:// as the siteurl

Screenshot 2016-09-18 15.00.49.png
Screenshot 2016-09-18 15.00.49.png (649.95 KiB) Viewed 1825 times
Could you grant me FTP+Couch access to your site?
Please PM me both the creds if yes. Thanks.
6 posts Page 1 of 1