Web Hosting Talk







View Full Version : perl modules install problem


mpkapadia
07-28-2001, 06:25 AM
Hello

I have a machine with Plesk server administrator,

I want to use perl Modules DBD- mysql on the same

Now my problem is on a plesk machine

Mysql is installed in /usr/local/plesk/mysql
instead of /usr/local/mysql or whatever

So the install fails, I also tried direct install thtough webmin the perl modules but dosent work

Also will i be able to do mysql database management through webmin, Because when i click on mysql it says not installed probably because it is in non standard directory

What do i do

Regards
Manish Kapadia

microsol
07-28-2001, 06:47 AM
You can easily configure mysql from webmin. When you click on the mysql server there should be a link in the upper left corner saying "module config". That's where you can define where your mysql locations are. As for the perl modules: perl -MCPAN -e -shell
and the type "i" <enter> and it will show all the modules available a CPAN. Alternatively you can try to type "i /modulename/" and it will show you all the modules containing the "modulename". To download and install a module type "install DBD::mysql".
It should download the modules and install them. If you have problems with the install read the CPAN docs or ask again in here.
Hope it helps ;)


PS: Be careful editing system configuration files with webmin!!!

mpkapadia
07-28-2001, 08:02 AM
Thanks

I managed to get the mysql working in webmin but still have the problem installing Mysql Dbd

i even tried old fashined way
perl Makefile.PL
make
make test etc etc

but gives errors

Comments from anyone who uses dbd mysql on a Psa machine will be really nice

Do you know how i can include a particulat folder in @ INC of perl

What i am trying to use is
http://www.gossamer-threads.com/scripts/mysqlman/index.htm

And the error i get is

http://209.217.52.61/cgi-bin/mysqlman-1.07/mysql.cgi

Any Ideas

Regards
Manish Kapadia

microsol
07-28-2001, 08:33 AM
There are exactly installation instructions at http://www.perl.com/CPAN-local/modules/by-module/DBD/Msql-Mysql-modules-1.2216.readme ;)

Mirco
07-28-2001, 10:03 AM
perl Makefile.PL --cflags=-I/usr/local/plesk/mysql/include/mysql "--libs=-L/usr/local/plesk/mysql/lib -lmysqlclient"

have fun

mpkapadia
07-28-2001, 03:39 PM
Hello Micro

Following is what happens

perl Makefile.PL --cflags=-I/usr/local/pleskmysql "--libs=-L/usr/local/plesk/mysql/lib -lmysqlclient" This is an experimental version of DBD::mysql. For production
environments you should prefer the Msql-Mysql-modules.

I will use the following settings for compiling and testing:

testpassword (default ) =
testhost (default ) =
testuser (default ) =
nocatchstderr (default ) = 0
testdb (default ) = test
libs (Users choice) = -L/usr/local/plesk/mysql/lib -lmysqlclient
cflags (Users choice) = -I/usr/local/pleskmysql

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Note (probably harmless): No library found for -lmysqlclient
Using DBI 1.18 installed in /usr/lib/perl5/site_perl/5.6.0/i386-linux/auto/DBI
Writing Makefile for DBD::mysql

---------------------------------------------------
this happens when i give
make

---------------------------------------------------------------
gcc -c -I/usr/lib/perl5/site_perl/5.6.0/i386-linux/auto/DBI -I/usr/local/pleskmysql -fno-strict-aliasing -O2 -march=i386 -mcpu=i686 -DVERSION=\"2.0902\" -DXS_VERSION=\"2.0902\" -fPIC -I/usr/lib/perl5/5.6.0/i386-linux/CORE dbdimp.c
In file included from dbdimp.c:29:
dbdimp.h:31:49: mysql.h: No such file or directory
dbdimp.h:32:49: errmsg.h: No such file or directory
make: *** [dbdimp.o] Error 1

-----------------------------------------------------

What seems to be wrong,
Thanking you once again for your time,

Regards
Manish Kapadia

Mirco
07-28-2001, 06:02 PM
Hi

Your command was:
perl Makefile.PL --cflags=-I/usr/local/pleskmysql "--libs=-L/usr/local/plesk/mysql/lib -lmysqlclient"

Mine was:
perl Makefile.PL --cflags=-I/usr/local/plesk/mysql/include/mysql "--libs=-L/usr/local/plesk/mysql/lib -lmysqlclient"


Check the flag again

mpkapadia
07-29-2001, 02:30 AM
Hello

Finally i have managed to get it work , had to do a bit ot tweaks though,

The command reqd was

perl Makefile.PL --cflags=-I/usr/local/plesk/mysql/include/mysql "--libs=-L/usr/local/plesk/mysql/lib/mysql -lmysqlclient"

Micro - we missed the /mysql in the end before -lmysqlclient

Another thing was that plesk does have a database named test precreated to be able to do the testing when we give make test

So i created a db with name test and permission anaonymous to localhost via webmin,

And then i ran the above and it was smooth ,

The program i wanted to run

http://209.217.52.61/cgi-bin/mysqlman-1.07/mysql.cgi

Is also functioning just fine now.

It is a great tool which can be installed so that all your users can do their mysql management from here,

Thanks a lot all of you, you have been very helpful here.

:)
Regards
Manish Kapadia