Ubuntu :: Access Postgres Through A PERL Program?

Jul 25, 2010

I am very much interested in Postgres db.
I have installed the DBI and DBD drivers.
Created the Tables.
Can any one help me ..how to access POSTGRES through a PERL program.

View 1 Replies


ADVERTISEMENT

Ubuntu :: Accessing Parallel Ports From Perl Program

Dec 11, 2010

I am trying to write to the parallel port pins from a Perl program running Ubuntu Linux, to light up led's on a bread board. I've already accomplished this on this same box using a C program, but I cannot get my code below to work. I believe the problem is with the line:
$parport = Device::ParallelPort->new('auto:0');
I've tried different variables between the ('') ticks, but nothing has worked. I use Perl on my web pages for forms, but this has stumped me.

Code is below:
#!/usr/bin/perl require "subparseform.lib"; &Parse_Form; print "Set-cookie:
cart_id=1234; user_id=123;
"; print "Content-type: text/html
"; use strict; use CGI; use Device::ParallelPort;
# use Device::ParallelPort::drv; # use Device::ParallelPort::drv::linux # use Device::ParallelPort::drv::parport
# Set up your parallel port object and tell it what driver to use.
#my $parport = Device::ParallelPort->new('auto:0'); print "It works!!!";

View 1 Replies View Related

Debian :: Build A .deb File Which Will Contain Perl Program?

Aug 18, 2010

I'd like to build a .deb file which will contain my Perl program. I just want it to be deployed with dpkg -i on debian systems later. So it's just a matter of having the good arborescence in my .deb package. For that purpose, in the debian/rules file, I'm declaring some dh_install lines in the install rule.

My issue is that I know how to achieve my goal, but only with writing a ton of dh_install lines (one line, for one file...)

example :
clean:
dh_testdir
dh_clean
install: build

[Code].....

View 4 Replies View Related

Ubuntu Multimedia :: Perl Audio Converter - Program Doesn't Appear In Menu

Mar 16, 2010

I installed Perl Audio Converter, The system recognizes the install, When I type perl in the terminal it says "Perl is already the newest version" And the perl files appear in my "bin" directory, However the program does not appear in the menu, Is this a common problem?, How do I fix it?

View 1 Replies View Related

Server :: Perl Program To Filter Emails For Specific Rules

Feb 4, 2010

Please what will it take me to write a perl full functioning program to filter emails for specific rules? Will that be possible? The actual thing am trying to get is to write a perl program and attach to a mail server so that, when the mails come in, the perl script get call and then the perl program will let another external program that is not on the server run and check or filter the mails.

View 8 Replies View Related

Software :: Perl Program Can't Convert A Csv File (with Japanese Characters) / What To Do?

Jan 20, 2011

I use the below perl program csv2xls.pl can convert a csv to xls file , it works fine , but I found that it only work for all English characters , I tried to use it to convert a csv file ( with Japanese characters ) , it does work , I also tried the perl "unicode_utf16_japan.pl" , it also did not work , can advise what can i do ?

View 13 Replies View Related

Programming :: Talented Coder To Program Bash / Perl App That Plays SWF On HTML Page?

Feb 10, 2011

Everyone knows that it is like impossible to use mplayer to watch an *.html file. OK.

For instance here is a cool example of lot of streaming for firefox
http://watchtvlivestreaming.com/tvlive/b5499

Code...

Anyone is there a talented bright coder, coming from hell -because it is really difficult, to make such console program ?

View 1 Replies View Related

Programming :: Unable To Access Filehandles (Perl)

May 17, 2010

I've been reading / trying to learn some Perl lately. I've found the free book, "Learning Perl", quite good and easy to follow most of the times. However, today I was testing one of the scripts in the book and it would only run partly.

Code:

#!/usr/bin/perl
use warnings;
use strict;
my %inventory;

[code]....

This row is supposed to give option, either to use an additional script as pipe (sort.plx),or STDOUT if the extra script is not found.It works with the other script present, however, with the sort.plx being absent it simply wont use STDOUT instead but whines to me:

Can't open perl script "sort.plx": No such file or directory

Has the author of the original script done some error writing it? Since I'm a beginner and found most of the stuff confusing in Perl either way (having previously only experience in Bash and some in PHP) - I can't really tell for sure , but from what I can read in documentation - it doesn't appear to be wrong.As it looks now, the only way for me to use STDOUT is only by removing:

open (SORT, "| perl sort.plx") or *SORT = *STDOUT;
select *SORT;

rows. But then, I lose the piping in to that other script as an option.

View 8 Replies View Related

Programming :: Access A Perl Script Behind A Firewall From Python?

Nov 23, 2010

I have a Perl script behind a firewall. I want to access this script from Python on Google App Engine. I have access to the server running the Perl script via the following methods: SSH VPN What are the ways I can do this with Python on GAE? Can I use something like wget, login through ssh and run the script using perl interpreter?

Currently it is a CGI script that I can access through a web browser if I'm inside the firewall. My only other option is to turn the process around, i.e. have perl send data outside the firewall to google app engine. But I want to know if this is possible as it is now without changing the perl script.

View 8 Replies View Related

Programming :: Perl - Store And Access An Array In A Hash Of Hashes?

Jul 7, 2010

I am in need of some syntax help. I'm trying to figure out how to store and retrieve an array out of a hash of hashes. For this example, I'm trying to access the city list for a particular state for a particular country. I understand I could do a join and split on the hash key to combine Country and State, but trying to keep things separated.The code I have gets in all the information for the Countries, and states, and gets the list of cities together, no problem. I store all the city names in an array, then make an anonymous pointer to the array for the hash, like this - $MY_CITIES{$COUNTRY}{$STATE} = [@CITIES]I believe that syntax is correct, or is it? What I'd like to do is I need to cycle through every hash to find if a city exists or not. If it exists in 3 states, then it should print 3 times. Here is the code block to search -

Code:
for $COUNTRY (@LIST_OF_COUNTRIES) {
for $STATE ( keys %MY_CITIES{$COUNTRY){$STATE} ) {

[code]...

View 4 Replies View Related

Ubuntu :: What Is The Default Postgres Password?

Jun 23, 2011

I just installed postgresql 8.4 package on my Ubuntu 10.10 desktop. Seems to have worked fine. But what is the password for logging into the databases created by user 'postgres'?

sudo su postgres
and then
createdb
or
psql mydb

fine and it never asks me for a password. But if I want to use pgadmin3, I want to enter passwd for postgres, etc.

View 4 Replies View Related

Ubuntu :: Pgadmin On 10.10 - Support For Postgres 9?

Jan 16, 2011

I am in the process of looking to migrate my PC from Windows 7 to Ubuntu 10.10 as I like it and i find it a little quicker than Windows. One of the major failings I find at the moment is software app support. I am setting up some PostgreSQL 9.0 servers (to do streaming replication) and using pgadmin to do the management.

Under Windows this app works great, but under Ubuntu it seems the standard package only supports up to 8.4, and looks like support has been dropped for pgadmin on Ubuntu. What I can't understand is the open source movement isn't supporting itself - or is it that because 10.10 is not on LTS, they are waiting for the next version to update the package - anyone know? If its not supported then back to Windows I go, because I know the latest version works fine.

View 4 Replies View Related

Ubuntu :: Switch Back To /usr/bin/perl After Installing Second Perl?

Aug 14, 2010

I recently reinstalled the B module for perl. Now I found out it didn't just do that, it installed a whole new copy of perl into /usr/local/bin/perl. When I type 'which perl' at the terminal, it says '/usr/local/bin/perl' instead of '/usr/bin/perl'. Normally, this wouldn't bother me. But I installed the one in local/bin without threading support. The one that comes with the system already is build with threading support, which is why I want to switch back to the system perl, and possibly remove the one in /usr/local/bin.

So how do I change it so that the result of 'which perl' returns as '/usr/bin/perl'? And what do I have to do to remove /usr/local/bin/perl?

The reason I need threading support is because I'm designing a file copier that copies several chunks of a file simultaneously to speed up the copying process. Guaranteed a useful script if it works.

View 7 Replies View Related

Ubuntu :: Postgres Installed But Cannot Find Reference

Mar 24, 2010

Just bought a new accounting program BasicBooks - on the install instructions (Gibberish to me) I apparently must have Postgres installed, which apparently comes with most distros. I can't find a reference to Postgres - there should be an entry in 'System Settings --> Server Settings --> Services from the main system menu', which I cannot find. Nor can I find it in the Ubuntu software centre. I did find pgAdmin III but have no idea how this works either.

View 2 Replies View Related

Ubuntu Servers :: Multiple Instance Of Postgres On The Same Machine?

Mar 16, 2010

how to setup multiple instance of postgre server on the same machine.

View 4 Replies View Related

CentOS 5 Server :: Move 5.5 To /usr/bin/perl So Root Based On Perl 5.12.1?

Aug 11, 2010

I am new here and want to lern CentOS. Current I have installed CentOS 5.5 x64 and Perl 5.8.8. Now i have install Perl 5.12.1 which located to /usr/local/bin/perl. But how I can move it to /usr/bin/perl so root based on Perl 5.12.1?

View 7 Replies View Related

OpenSUSE :: Postgres Does Not Start After Upgrade To 11.2?

Feb 10, 2010

I had postgresql 8.3 running on opensuse 11.0, recently upgraded to 11.2 (so postgres is now 8.4) and have problems starting it. I make, su, then as root run:

# /etc/init.d/postgresql start
Your databases are still using the format of PostgreSQL 8.3.
Therefore a backup of the old PostgreSQL server program will be used
until you have saved and removed your old database files
See also /usr/share/doc/packages/postgresql/README.SuSE.{de,en} .
Starting PostgreSQLsu: incorrect password

[Code]...

View 4 Replies View Related

General :: User Postgres Does Not Exist?

Jul 21, 2010

i have installed postgresql to my fedora10-distribution. when i would to access to this database by using the command #su postgres as is mentioned at [URL]..3/install/wiff/createcontext to install freedom , an error message is shown to tell me that user postgres does not exist. what is the likely problem.

View 15 Replies View Related

Server :: Restoring A Postgres Database?

Jun 9, 2010

We have a disaster recovery solution for our database where a dump file is generated daily at 1:00 AM. We have tested importing the file, along with running another sql file that generates the appropriate database user accounts, into a database on a third-party server.

One question that came up was the following: Suppose the database crashes in the middle of the day, prior to that there were transactions that were entered into the database between the time the dump file was generated, and the crash occurred. We can restore the dump file to either the main or backup server. How can the transactions that were made between the time of the dump file and the crash be restored as well?

View 2 Replies View Related

Software :: Autofill - Tab Key - Not Working In Postgres ?

Feb 24, 2010

I installed postgres successfully but, when I press tab key, it does not autofill the available options.

View 1 Replies View Related

Ubuntu :: Cant Get Access To Program

Jan 20, 2011

I just followed the instructions on the winehq site to compile and install the wine 1.3 source but i cant get access to the program some help would be great.

View 1 Replies View Related

Ubuntu Servers :: Cannot Connect Remotely To Newly Installed Postgres

Dec 26, 2010

I keep getting this error trying to connect to newly installed postgres server on Amazon EC2 running Ubuntu Maverick Meerkat....
Could not connect to server: Operation timed out Is the server running on host "....ap-southeast-1.compute.amazonaws.com" and accepting TCP/IP connections on port 5432?

I've updated config files, as follows...
pg_hba.conf
added
host all all 124.168.242.0/24 trust
where 124.168.242.0 is the IP range of my ISP
postgresql.conf
listen_addresses = '*'
port = 5432
I am attempting to connect with pgAdmin 3 client. I don't think the problem is the client.

View 6 Replies View Related

Debian :: Launch The Perl Config \ Seems To Be That It Does Not Regonize Perl?

Jul 7, 2010

I am trying to launch the perl config, but when I do so I can an weird error.It seems to be that it does not regonize perl ?

conf.pl: line 11: =: command not found
conf.pl: line 19: my: command not found
conf.pl: line 20: syntax error near unexpected token `{'

[code]...

View 2 Replies View Related

General :: Centos Search For Postgres Database?

Jan 31, 2011

Ok so I need to Search for a postgres database File on a CentOs System. Is their a command i can run in the terminal to search for postgres files?

View 2 Replies View Related

Server :: Upgrading Bacula Database For Postgres?

Mar 24, 2011

While backing up/restoring bacula clients. We were getting an error regarding database tables' version. The error message is given below.. "Found 10 needs 12".

After Googling, what we found is, we have to update the postgres database for bacula. So now we are in process to update the database via the update_bacula-tables script. We are not sure, if it will solve the problem or not. We have just upgraded bacula 2.4.4 to 5.0.1. Postgres version is upgraded from 8.3 to 8.4. It is Debian 6.0 squeeze.

View 2 Replies View Related

Software :: Testing A Postgres Dump File?

May 13, 2010

We are going through the motions of testing the backup and restore configurations of our postgres database. One idea was testing the viability of the dump file. Does anyone know of a way of testing the dump file to determine if there is any corruption in it

View 2 Replies View Related

Ubuntu Multimedia :: Cant Access The Program

Jun 26, 2011

I have downloaded all the filesand tried to do a "cmake" but it didnt work and i cant access the program.I do have zynaddsubfx but they sound different. Are they?

View 1 Replies View Related

Security :: Restart Postgres In Server - Selinux Is Not Letting It Log Anything

Jan 28, 2010

Whenever i restart postgres in my server, Selinux is not letting it log anything. In /var/log/messages, it says.

Quote: Jan 28 14:15:43 dataserver kernel: audit(1264709743.263:38): avc: denied { append } for pid=5986 comm="postmaster" name="pgsql.log" dev=sda8 ino=3932166 scontext=root:system_r: postgresql_t tcontext=root: object_r:var_log_t tclass=file

Jan 28 14:15:43 dataserver kernel: audit(1264709743.263:39): avc: denied { append } for pid=5986 comm="postmaster" name="pgsql.log" dev=sda8 ino=3932166 scontext=root:system_r: postgresql_t tcontext=root: object_r:var_log_t tclass=file

I cannot disable SeLinux in this server.

View 1 Replies View Related

Software :: Postgres Install Error - Failed Dependencies

Mar 16, 2011

following is the error [root@webserver Desktop]# rpm -ivh swl-apache-2.2.17.2-1.i386.rpm

error: Failed dependencies:

libpq.so.4 is needed by swl-apache-2.2.17.2-1.i386
[root@webserver Desktop]# rpm -ivh postgresql-libs-8.1.23-1PGDG.rhel5.x86_64.rpm
warning: postgresql-libs-8.1.23-1PGDG.rhel5.x86_64.rpm: Header V3 DSA

[code].....

View 1 Replies View Related

Programming :: Getting Shell Script To Execute IF New Row In Postgres SQL Is Added?

Mar 17, 2009

I do not want to use cron.I want it to be instantaneous. I am working on a web server where the hosts turned-on safe mode and turned off a-lot of the functions for PHP (including exec) in order to secure their servers. Outside of that, I do have access to chroot and can pretty much do anything on the server. I want to use ImageMagick to create dynamic images based on form data.

I was trying to find a work-around with PHP where I can still use ImageMagick (a shell-based imagining program) by causing SQL to execute a shell script after the form data is saved to a table. Is there anyway it could cause a flag to automatically run a shell script when someone adds a new row to a certain table. It has to be instantaneous, more or less, so that the user isn't sitting there waiting for a minute for cron to catch any changes to the database.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved