thorsten / phpMyFAQ

phpMyFAQ - Open Source FAQ web application for PHP 8.2+ and MySQL, PostgreSQL and other databases
https://www.phpmyfaq.de
Mozilla Public License 2.0
590 stars 256 forks source link

Cannot Change or edit Configuration from Admin Control Panel #1258

Closed hrace009 closed 7 years ago

hrace009 commented 8 years ago

Hello,

This is my first time installing and using phpMyFAQ. i install it from softacoulous at cPanel. Installation running great without any error. and i can login to Admin Control Panel. then, i try to change Title of your FAQ and Contact Information and click save. it revert back to default values. anything i change at Admin Control Panel, always revert back to default values. Bellow my system Information:

phpMyFAQ Version    2.9.5
phpMyFAQ API Version    1.1
Server Software    Apache
Server Document Root    /home/user/public_html/
phpMyFAQ Installation Path    /home/user/public_html/
PHP Version    5.6.26
Webserver Interface    CGI-FCGI
PHP Extensions    Core, date, ereg, libxml, openssl, pcre, zlib, filter, hash, pcntl, readline, Reflection, SPL, session, standard, cgi-fcgi, bcmath, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, imap, intl, json, imagick, exif, mcrypt, mysqlnd, mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, Phar, posix, SimpleXML, soap, sockets, SourceGuardian, sqlite3, tokenizer, xml, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, mhash, ionCube Loader, Zend Guard Loader, Zend OPcache
PHP Session path    
Database Server    mysqli
Database Server Version    5.5.5-10.1.17-MariaDB
Database Client Version    mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
Elasticsearch    n/a

Is there a solution for this problem?

Thank you

thorsten commented 8 years ago

Please enable the debug mode in inc/Bootstrap.php and see if there are any errors.

hrace009 commented 8 years ago

hello,

I have enable debug mode, and only see this message:

DEBUG INFORMATION:
/home/user/public_html/inc/Bootstrap.php:
PMF_Configuration->getAll() in line 149:
            SELECT
                config_name, config_value
            FROM
                pmfca_faqconfig
/home/user/public_html/inc/PMF/User/CurrentUser.php:
PMF_User->getUserByCookie() in line 522:
            SELECT
                user_id,
                login,
                account_status
            FROM
                pmfca_faquser
            WHERE
                remember_me = '2d7b7435c7e7572ba3af8b78528f9379503ab789' AND account_status != 'blocked'
/home/user/public_html/inc/PMF/User.php:
PMF_User_UserData->load() in line 408:
            SELECT
                last_modified, 
                display_name, 
                email
            FROM
                pmfca_faquserdata
            WHERE
                user_id = 1
/home/user/public_html/inc/PMF/User/CurrentUser.php:
PMF_User_CurrentUser->updateSessionId() in line 529:
            UPDATE
                pmfca_faquser
            SET
                session_id = 'ihmevtm8k4kat2sbi6pavtk7r5',
                session_timestamp = 1475730440,
                last_login = '20161006070720',
                ip = '36.76.19.34'
            WHERE
                user_id = 1
/home/user/public_html/inc/PMF/Perm/Basic.php:
PMF_Perm_Basic->getUserRights() in line 286:
            SELECT
                fr.right_id AS right_id
            FROM
                pmfca_faqright fr,
                pmfca_faquser_right fur,
                pmfca_faquser fu
            WHERE
                fr.right_id = fur.right_id AND
                fu.user_id  = 1 AND
                fu.user_id  = fur.user_id
/home/user/public_html/inc/PMF/Helper/Administration.php:
PMF_Perm_Basic->getAllRightsData() in line 142:
            SELECT
                right_id,
                name,
                description,
                for_users,
                for_groups
            FROM
                pmfca_faqright
            ORDER BY
                right_id ASC
/home/user/public_html/inc/PMF/Perm/Basic.php:
PMF_Perm_Basic->getUserRights() in line 286:
            SELECT
                fr.right_id AS right_id
            FROM
                pmfca_faqright fr,
                pmfca_faquser_right fur,
                pmfca_faquser fu
            WHERE
                fr.right_id = fur.right_id AND
                fu.user_id  = 1 AND
                fu.user_id  = fur.user_id
/home/user/public_html/inc/PMF/Perm/Basic.php:
PMF_Perm_Basic->getUserRights() in line 286:
            SELECT
                fr.right_id AS right_id
            FROM
                pmfca_faqright fr,
                pmfca_faquser_right fur,
                pmfca_faquser fu
            WHERE
                fr.right_id = fur.right_id AND
                fu.user_id  = 1 AND
                fu.user_id  = fur.user_id
/home/user/public_html/inc/PMF/Perm/Basic.php:
PMF_Perm_Basic->getUserRights() in line 286:
            SELECT
                fr.right_id AS right_id
            FROM
                pmfca_faqright fr,
                pmfca_faquser_right fur,
                pmfca_faquser fu
            WHERE
                fr.right_id = fur.right_id AND
                fu.user_id  = 1 AND
                fu.user_id  = fur.user_id
/home/user/public_html/inc/PMF/User.php:
PMF_User_UserData->get() in line 912:
            SELECT
                display_name
            FROM
                pmfca_faquserdata
            WHERE
                user_id = 1
/home/user/public_html/inc/PMF/Perm/Basic.php:
PMF_Perm_Basic->getUserRights() in line 286:
            SELECT
                fr.right_id AS right_id
            FROM
                pmfca_faqright fr,
                pmfca_faquser_right fur,
                pmfca_faquser fu
            WHERE
                fr.right_id = fur.right_id AND
                fu.user_id  = 1 AND
                fu.user_id  = fur.user_id
/home/user/public_html/inc/PMF/Perm/Basic.php:
PMF_Perm_Basic->getUserRights() in line 286:
            SELECT
                fr.right_id AS right_id
            FROM
                pmfca_faqright fr,
                pmfca_faquser_right fur,
                pmfca_faquser fu
            WHERE
                fr.right_id = fur.right_id AND
                fu.user_id  = 1 AND
                fu.user_id  = fur.user_id
/home/user/public_html/inc/PMF/Perm/Basic.php:
PMF_Perm_Basic->getRightId() in line 229:
            SELECT
                right_id
            FROM
                pmfca_faqright
            WHERE
                name = 'editconfig'
/home/user/public_html/inc/PMF/Perm/Basic.php:
PMF_Perm_Basic->checkUserRight() in line 232:
            SELECT
                fr.right_id AS right_id
            FROM
                pmfca_faqright fr,
                pmfca_faquser_right fur,
                pmfca_faquser fu
            WHERE
                fr.right_id = 17 AND
                fr.right_id = fur.right_id AND
                fu.user_id  = 1 AND
                fu.user_id  = fur.user_id
hrace009 commented 8 years ago

maybe this video will help to investigae https://youtu.be/HiemfRM2BBM

thorsten commented 8 years ago

Strange. Do you see any JS errors in the browser console?

hrace009 commented 8 years ago

i have check, i don't see any JS error, but a lot off css error

Error in parsing value for ‘-webkit-text-size-adjust’.  Declaration dropped.style.css:28:28
Unknown pseudo-class or pseudo-element ‘-webkit-inner-spin-button’.  Ruleset ignored due to bad selector.style.css:167:22
Unknown pseudo-class or pseudo-element ‘-webkit-search-cancel-button’.  Ruleset ignored due to bad selector.style.css:175:22
Unknown property ‘orphans’.  Declaration dropped.style.css:244:11
Unknown property ‘widows’.  Declaration dropped.style.css:245:10
Unknown property ‘-moz-osx-font-smoothing’.  Declaration dropped.style.css:287:25
Expected color but found ‘auto’.  Expected color but found ‘-webkit-focus-ring-color’.  Expected end of value but found ‘-webkit-focus-ring-color’.  Error in parsing value for ‘outline’.  Declaration dropped.style.css:1116:15
Expected end of value but found ‘\9 ’.  Error in parsing value for ‘margin-top’.  Declaration dropped.style.css:2527:18
Expected color but found ‘auto’.  Expected color but found ‘-webkit-focus-ring-color’.  Expected end of value but found ‘-webkit-focus-ring-color’.  Error in parsing value for ‘outline’.  Declaration dropped.style.css:2544:15
Unknown pseudo-class or pseudo-element ‘-ms-input-placeholder’.  Ruleset ignored due to bad selector.style.css:2582:14
Unknown pseudo-class or pseudo-element ‘-webkit-input-placeholder’.  Ruleset ignored due to bad selector.style.css:2585:15
Unknown pseudo-class or pseudo-element ‘-ms-expand’.  Ruleset ignored due to bad selector.style.css:2588:15
Expected media feature name but found ‘-webkit-min-device-pixel-ratio’.style.css:2608:19
Expected end of value but found ‘\9 ’.  Error in parsing value for ‘margin-top’.  Declaration dropped.style.css:2660:18
Unknown property ‘touch-action’.  Declaration dropped.style.css:3014:14
Unknown property ‘user-select’.  Declaration dropped.style.css:3026:13
Expected color but found ‘auto’.  Expected color but found ‘-webkit-focus-ring-color’.  Expected end of value but found ‘-webkit-focus-ring-color’.  Error in parsing value for ‘outline’.  Declaration dropped.style.css:3034:15
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:3055:10
Expected color but found ‘\9 ’.  Expected end of value but found ‘\9 ’.  Error in parsing value for ‘border-top’.  Declaration dropped.style.css:3510:24
Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:3585:10
Expected color but found ‘\9 ’.  Expected end of value but found ‘\9 ’.  Error in parsing value for ‘border-bottom’.  Declaration dropped.style.css:3626:27
Error in parsing value for ‘background-image’.  Declaration dropped.style.css:5144:20
Error in parsing value for ‘background-image’.  Declaration dropped.style.css:5159:20
Error in parsing value for ‘background-image’.  Declaration dropped.style.css:5167:20
Error in parsing value for ‘background-image’.  Declaration dropped.style.css:5175:20
Error in parsing value for ‘background-image’.  Declaration dropped.style.css:5183:20
Unknown property ‘zoom’.  Declaration dropped.style.css:5194:6
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:5839:10
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:5847:10
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:5918:10
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:5922:10
Unknown property ‘line-break’.  Declaration dropped.style.css:5987:12
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:6000:10
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:6004:10
Unknown property ‘line-break’.  Declaration dropped.style.css:6105:12
Expected media feature name but found ‘transform-3d’.style.css:6243:16
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:6313:10
Error in parsing value for ‘background-image’.  Declaration dropped.style.css:6322:20
Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:6325:10
Error in parsing value for ‘background-image’.  Declaration dropped.style.css:6331:20
Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:6334:10
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:6342:10
Expected end of value but found ‘\9 ’.  Error in parsing value for ‘background-color’.  Declaration dropped.style.css:6397:25
Unknown property ‘-moz-osx-font-smoothing’.  Declaration dropped.style.css:6763:25
Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:6864:10
Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:6870:10
Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:6876:10
Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:6882:10
Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped.style.css:6888:10
Error in parsing value for ‘background’.  Declaration dropped.style.css:8996:14
thorsten commented 8 years ago

Is it possible to re-watch the video?

hrace009 commented 8 years ago

hi thorsten,

Yes it's posible https://youtu.be/HiemfRM2BBM

ghost commented 8 years ago

Hi, I have exactly the same issue on my side using Firefox ESR 45.4.0, no error message in debug mode and no error message into dev console. But it's working fine with Internet Explorer 11... Can't test with Chrome.

thorsten commented 8 years ago

Is it possible to get access to your installation?

ghost commented 8 years ago

I've installed the same server that I have at work in my personnal computer (Virtual Box with Debian 8.5 + PHP7) and I was not able to have the same error message. On my computer, every thing is working fine, in English and in French, but at work it does not work in French (and I'm sorry, because this is a professional network I can't give you access to my installation). There is only one difference between my computer at work and my personnal computer : Firefox (here 49.0.1)

thorsten commented 8 years ago

Do you have any addon installed on Firefox? It works with Firefox on my local test instance.

ghost commented 8 years ago

Yes it works on Firefox in my personnal computer installation, but not at work. I'll list you all addons I have on Firefox tomorrow

ghost commented 8 years ago

Here are my Firefox addons: Adblock Plus (disabled on my phpMyFaq installation) Firebug IE Tab 2 Quick Locale Switcher

hrace009 commented 8 years ago

hi @thorsten sorry late to respond, Bellow my Firefox Addons: 1 2 3

thorsten commented 8 years ago

I also use Firefox, but on OS X 10.11. It's working without any issues here. Is it possible to try it without any addons?

N3ROPT commented 8 years ago

Hello,

I'm facing the same problem with Google Chrome. Removed the 1st installation with Softaculous and decided to setup it manually but the reported issues still occurs (change name, set maintenance mode, etc.).

Using IE11 didn't notice any problem.

Chrome Version 54.0.2840.71 m (64-bit)

Thank you

thorsten commented 7 years ago

Duplicate of #1298

ernestbuffington commented 1 year ago

Dude, wtf! $currentToken === $csrfToken <-- this is the problem Did you close this without fixing it?

if ($user->perm->hasPermission($user->getUserId(), 'editconfig')) { // actions defined by url: user_action= $userAction = Filter::filterInput(INPUT_GET, 'config_action', FILTER_UNSAFE_RAW, 'listConfig'); $csrfToken = Filter::filterInput(INPUT_POST, 'csrf', FILTER_UNSAFE_RAW); $currentToken = $user->getCsrfTokenFromSession(); var_dump($csrfToken); echo '
'; var_dump($currentToken); // Save the configuration //if ('saveConfig' === $userAction && $currentToken === $csrfToken) {

This code has a problem comparing the current token with the csrf token??

#
#
# I can get the editer config to work only by removing the above line!  
if ('saveConfig' === $userAction) {

Nothing to do with Java and why would it throw an error, it will never throw an error!

ernestbuffington commented 1 year ago

HOW DID YOU FIX IT SO I CAN FIX MY INSTALL FROM cPANEL