Langsung ke konten utama

Postingan

Menampilkan postingan dari Mei, 2019

CKAN Datapusher: 500 Server Error

Target WSGI script '/etc/ckan/datapusher.wsgi' can not be loaded as Python module. Exception occurred processing WSGI script '/etc/ckan/datapusher.wsgi'. Traceback (most recent call last): File "/etc/ckan/datapusher.wsgi", line 8, in import ckanserviceprovider.web as web File "/usr/lib/ckan/datapusher/lib/python2.7/site-packages/ckanserviceprovider/web.py", line 13, in <mod $ import flask.ext.login as flogin ImportError: No module named ext.login You have to check if the modules Flask and Flask_login are installed and if necessary install them: pip uninstall flask (if is installed in other version) pip install flask == 0.12 pip install flask-login then you have to check the file /ckanserviceprovider/web.py (possible path): /usr/lib/ckan/datapusher/lib/python2.7/site-packages/ckanserviceprovider/web.py and replace: import flask.ext.login as flogin with: import flask_login as flogin because flask.ext.login is obsolete final

Install Oci8 ubuntu 16.04

First Prerequirements are a working apache2 and php7.2 (Ubuntu 18.04) environment. Download the basic (like instantclient-basic-linux.x64-12.2.0.1.0.zip) and the SDK (instantclient-sdk-linux.x64-12.2.0.1.0.zip) package from the Oracle Website  http://www.oracle.com/technetwork/database/database-technologies/instant-client/downloads/index.html Upload both files to your web server, you can use WinSCP for it Unzip both files on a server, in my case, you will get a new folder named "instantclient_12_2" 4a. Create a destination folder mkdir /opt/oracle 4b. Move and rename the instantclient folder mv instantclient_12_2 /opt/oracle/instantclient 4c. Change rights on the folder chown -R root:www-data /opt/oracle Check if you have the required packages for installing OCI8 apt install php7.2-dev php-pear build-essential libaio1 Create necessary soft links ln -s /opt/oracle/instantclient/libclntsh.so.12.1 /opt/oracle/instantclient/libclntsh.s

show function mysql command

mysql> SHOW create FUNCTION kode_level\G; *************************** 1. row ***************************             Function: kode_level             sql_mode: NO_AUTO_VALUE_ON_ZERO      Create Function: CREATE DEFINER=`lakip2016`@`localhost` FUNCTION `kode_level`(`pkode` VARCHAR(50), `pdelimiter` CHAR, `pLevel` INT) RETURNS varchar(255) CHARSET latin1     DETERMINISTIC     SQL SECURITY INVOKER BEGIN DECLARE hasil VARCHAR(255);   SET hasil = SUBSTRING_INDEX(pkode, '.',pLevel);   RETURN hasil; END character_set_client: utf8 collation_connection: utf8_general_ci   Database Collation: latin1_swedish_ci 1 row in set (0.00 sec)