Friday, July 22, 2011

jpgraph: The function imageantialias() is not available

error message:

Fatal error: Call to undefined function imageantialias() in /var/www/vhosts/bar.php on line 13

The function imageantialias() is not available in your php installation. Use the GD version that comes with PHP and not the standalone version.

SOLUTION:
Open the file jpgraph.x.x.x/src/gd_image.inc.php, find the function SetAntiAliasing and comment this line (about line 110 in the version jpgraph-3.5.0b1):

else {
//JpGraphError::RaiseL(25128);//('The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.')
}

Monday, July 11, 2011

duplicate mysql table

mysql> CREATE TABLE products_excel_20110711 select * from products_excel;

Tuesday, June 21, 2011

protocol.rb:212:in `initialize': No such file or directory - /tmp/mysql.sock

Ruby mysql error

===================
chang@cm-test:/aost$ ruby gen_pot.rb
/usr/local/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:212:in `initialize': No such file or directory - /tmp/mysql.sock (Errno::ENOENT)
from /usr/local/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:212:in `new'
from /usr/local/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:212:in `block in initialize'
from /usr/local/lib/ruby/1.9.1/timeout.rb:44:in `timeout'
from /usr/local/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:209:in `initialize'
from /usr/local/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql.rb:110:in `new'
from /usr/local/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql.rb:110:in `connect'
from /usr/local/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql.rb:42:in `new'
from gen_blogspot.rb:9:in `
'
chang@cm-test:/opt/pubchem/ruby/autopost$ ^C


solution:
1, install
sudo apt-get install libmysqlclient15-dev

2
reinstall mysql gem
sudo gem install mysql