SET @@session.time_zone = '+08:00';
SELECT @@session.time_zone, @@global.time_zone;
Reference: https://www.brilliantcode.net/473/mysql-set-change-timezone/
Showing posts with label phpmyadmin. Show all posts
Showing posts with label phpmyadmin. Show all posts
Monday, November 25, 2019
Wednesday, June 5, 2019
MySQL: phpmyadmin錯誤
修改 /usr/share/phpmyadmin/libraries/plugin_interface.lib.php 第551 行
修改前︰
if ($options != null && count((array)$options) > 0) {
修改後︰
if ($options != null && count($options) > 0) {
Reference:
https://medium.com/@chaloemphonthipkasorn/%E0%B9%81%E0%B8%81%E0%B9%89-bug-phpmyadmin-php7-2-ubuntu-16-04-92b287090b01
Error information:
Warning in ./libraries/plugin_interface.lib.php#551 count():
Parameter must be an array or an object that implements Countable
修改前︰
if ($options != null && count((array)$options) > 0) {
修改後︰
if ($options != null && count($options) > 0) {
Reference:
https://medium.com/@chaloemphonthipkasorn/%E0%B9%81%E0%B8%81%E0%B9%89-bug-phpmyadmin-php7-2-ubuntu-16-04-92b287090b01
Error information:
Warning in ./libraries/plugin_interface.lib.php#551 count():
Parameter must be an array or an object that implements Countable
MySQL: 在phpmyadmin錯誤
在查找DB時一直報錯,原來是代碼問題。
打開 /usr/share/phpmyadmin/libraries/sql.lib.php 至613行
更改前︰
((empty($analyzed_sql_results['select_expr']))
|| (count($analyzed_sql_results['select_expr'] == 1)
&& ($analyzed_sql_results['select_expr'][0] == '*')))
更改後︰
((empty($analyzed_sql_results['select_expr']))
|| (count($analyzed_sql_results['select_expr']) == 1)
&& ($analyzed_sql_results['select_expr'][0] == '*'))
再用sudo service apache2 restart就完成修正。
Reference: https://stackoverflow.com/questions/48001569/phpmyadmin-count-parameter-must-be-an-array-or-an-object-that-implements-co
Error infomation:
Warning in ./libraries/sql.lib.php#613 count():
Parameter must be an array or an object that implements Countable
Backtrace
./libraries/sql.lib.php#2128: PMA_isRememberSortingOrder(array) ./libraries/sql.lib.php#2079: PMA_executeQueryAndGetQueryResponse( array, boolean true, string 'text', string 'courses', NULL, NULL, NULL, NULL, NULL, NULL, string '', string './themes/pmahomme/img/', NULL, NULL, NULL, string 'SELECT * FROM `courses`', NULL, NULL, ) ./sql.php#221: PMA_executeQueryAndSendQueryResponse( array, boolean true, string 'text', string 'courses', NULL, NULL, NULL, NULL, NULL, NULL, string '', string './themes/pmahomme/img/', NULL, NULL, NULL, string 'SELECT * FROM `courses`', NULL, NULL, )
打開 /usr/share/phpmyadmin/libraries/sql.lib.php 至613行
更改前︰
((empty($analyzed_sql_results['select_expr']))
|| (count($analyzed_sql_results['select_expr'] == 1)
&& ($analyzed_sql_results['select_expr'][0] == '*')))
更改後︰
((empty($analyzed_sql_results['select_expr']))
|| (count($analyzed_sql_results['select_expr']) == 1)
&& ($analyzed_sql_results['select_expr'][0] == '*'))
再用sudo service apache2 restart就完成修正。
Reference: https://stackoverflow.com/questions/48001569/phpmyadmin-count-parameter-must-be-an-array-or-an-object-that-implements-co
Error infomation:
Warning in ./libraries/sql.lib.php#613 count():
Parameter must be an array or an object that implements Countable
Backtrace
./libraries/sql.lib.php#2128: PMA_isRememberSortingOrder(array) ./libraries/sql.lib.php#2079: PMA_executeQueryAndGetQueryResponse( array, boolean true, string 'text', string 'courses', NULL, NULL, NULL, NULL, NULL, NULL, string '', string './themes/pmahomme/img/', NULL, NULL, NULL, string 'SELECT * FROM `courses`', NULL, NULL, ) ./sql.php#221: PMA_executeQueryAndSendQueryResponse( array, boolean true, string 'text', string 'courses', NULL, NULL, NULL, NULL, NULL, NULL, string '', string './themes/pmahomme/img/', NULL, NULL, NULL, string 'SELECT * FROM `courses`', NULL, NULL, )
Friday, November 9, 2018
自行配置PHP環境
Apache 2.4
https://www.apachehaus.com/cgi-bin/download.plx#APACHE24VC11
先修改apache/conf/httpd.conf裏面的ServerRoot和DocumentRoot。
用admin打開cmd,到達apache/bin目錄中,執行httpd.exe -k install進行安裝。
然後可以用httpd.exe -k start啓用,httpd.exe -k stop停止。
更多指令可以查看這裏。
PHP 5.6
https://windows.php.net/download#php-5.6
解除ext-mysqli, ext-curl的註解。
MySQL 5.7
https://downloads.mysql.com/archives/installer/
直接看安裝教學。看缺少什麼包,上網找安裝檔。
Composer
https://getcomposer.org/download/
安裝後可以快速配置php模組。
phpMyAdmin
https://docs.phpmyadmin.net/en/latest/setup.html#installing-on-windows
用composer安裝。
在apache配置好vhost,運行路徑。
打開phpMyAdmin目錄,將config.sample.inc.php複製一份重新命名為config.inc.php。可以在裏面改MySQL的host。
https://www.apachehaus.com/cgi-bin/download.plx#APACHE24VC11
先修改apache/conf/httpd.conf裏面的ServerRoot和DocumentRoot。
用admin打開cmd,到達apache/bin目錄中,執行httpd.exe -k install進行安裝。
然後可以用httpd.exe -k start啓用,httpd.exe -k stop停止。
更多指令可以查看這裏。
PHP 5.6
https://windows.php.net/download#php-5.6
解除ext-mysqli, ext-curl的註解。
MySQL 5.7
https://downloads.mysql.com/archives/installer/
直接看安裝教學。看缺少什麼包,上網找安裝檔。
Composer
https://getcomposer.org/download/
安裝後可以快速配置php模組。
phpMyAdmin
https://docs.phpmyadmin.net/en/latest/setup.html#installing-on-windows
用composer安裝。
在apache配置好vhost,運行路徑。
打開phpMyAdmin目錄,將config.sample.inc.php複製一份重新命名為config.inc.php。可以在裏面改MySQL的host。
Thursday, November 8, 2018
Error: The mysqli extension is missing. Please check your PHP configuration. See our documentation for more information.
在安裝phpMyAdmin後,打開browser時出現這個錯誤信息︰
The mysqli extension is missing. Please check your PHP configuration. See our documentation for more information.
網上找了一般時間都是說在C:/php/php.ini 解除php_mysqli.dll的注解。我照著做了也依舊出現這個問題,甚至重啓了也沒有作用。
於是在youtube找到了解決方案︰
The mysqli extension is missing. Please check your PHP configuration. See our documentation for more information.
網上找了一般時間都是說在C:/php/php.ini 解除php_mysqli.dll的注解。我照著做了也依舊出現這個問題,甚至重啓了也沒有作用。
於是在youtube找到了解決方案︰
- 進入到apache的bin目錄。
- 輸入mklink php.ini c:/php/php.ini,建立捷徑。
- 重新載入網頁。
這樣就解決了~
Subscribe to:
Posts (Atom)