Archive for January, 2013

Import CVS data to MySQL table

12/01/2013 Leave a comment

Import OpenGEO csv file into mysql.

Table structure:

id	int(11) Auto Increment	 
ip_start	int(11)	 
ip_end	int(11)	 
miasto	text	 
powiat	text	 
wojewodztwo	text

File structure:


MySQL command:

mysql> load data local infile '/home/user/opengeo.csv' into table opengeo fields terminated by ',' enclosed by '"' lines terminated by '\n' (ip_start, ip_end, miasto, powiat, wojewodztwo);
Query OK, 71513 rows affected, 4594 warnings (0.56 sec)
Records: 71513  Deleted: 0  Skipped: 0  Warnings: 4592
Categories: Uncategorized

PHP5 + suhosin warning

05/01/2013 1 comment

Im using Debian GNU/Linux wheezy/sid with latest PHP available from apt. Some time ago I found weird warning that shows up in logs when php file is loaded:

napi@debian:/home/napi$ php test.php 
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/' - /usr/lib/php5/20100525+lfs/ cannot open shared object file: No such file or directory in Unknown on line 0

Its harmful, but annoying.
To get rid of it just run this command as root:

dpkg -P php5-suhosin
Categories: Linux, Useful commands