|
From: Tero A. <te...@pr...> - 2005-06-27 16:29:41
|
PROBLEM: Printing in Windows XP
I have installed Sql-ledger to a Win XP (service pack1 ) computer
installation includes Apache 2.054
Perl 5.8.7
+ Apache-DBI + Apache-DBILogin + DBD-Pg
(specially compiled for Perl 5.8.7 win
version )
AFPL Ghostscript 8.51
GSview 4.7
Miktex - Full
Microsoft VCToolkit
Postgre 8
IndigoStar - sendmail
SITUATION: Everything works exept:
1) printing to a printer HPLaserJetIIIP
2) Emails don't have senddate ( some Perl-component missing ? )
* Printer is local printer- Shared with name HPLaserJ
* IP of computer running Sql-ledger is 192.168.1.252
If I choose print to sceen with postgript I get a GSview window with perfect
template
If I choose to print to screen with PDF I get Adobe/GSview window with perfect
template
If I choose to print to file I get Apache-error and logfile shows me:
-malformed header from script. Bad header=No File to print
or
-malformed header from script. Bad header=The syntax of the command
is i: is.pl referrer: http://127.0.0.1/sql-ledger/is.pl.....
( Which one I get depends what I put to sql.conf file as printer )
Because winXP by default don't give me a possibility to use lpr ( as I can
in Linux ) I have tried many different printer settings.
When I print from command line I can do it for example:
> print /d:\\192.168.1.252\HPLaserJ filename(with path)
whit that command I can print to all shared LPT-connected-printers in network
( Windows ones)
so I try:
Some examples:
# available printers
%printer = ( Default => 'print /d:\\192.168.1.252\HPLaserJ');
and
%printer = ( Default => 'print /d:\\\\192.168.1.252\\HPLaserJ');
and
%printer = ( Default => 'copy /d:\\\\192.168.1.252\\HPLaserJ');
BUT NON OF EM WORKS
WHAT TO PUT THERE ????????
|
|
From: Tero A. <te...@pr...> - 2005-06-27 19:44:06
|
I found out that : I only need to install additional networking component: =Other Network file and printer services to get lpr functionality. There is a howto http://www.xerox-techsupport.com/sharedinfo/win_xp/LPRCategoryView.htm so now I can print from command line with > lpr -S 192.168.1.252 -P HPLaserJ filename(with path) If I put this line to sql-ledger.conf file as %printer = ( Default => 'lpr -S 192.168.1.252 -P HPLaserJ'); It still doesn't work. When I try to print whit this settings I get a popup window asking if I like to open/save/cancel File Downloading ( file is is.pl or oe.pl depending what I like to print). In Linux we dont need to put this -S (serverID) option, but in windows it required ( without it I cant print from command line ) In microsoft documentation is told that: ( http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/lpr.mspx) Syntax lpr [-S ServerID] -P PrinterName [-C BannerContent] [-J JobName] [{-o | -o l}] [-d] [-x] FileName Parameters -S ServerID : Specifies, by name or IP address, the computer that hosts the printer on which you want to print the file. You do not need to provide this parameter if the printer is attached to the local computer. -P PrinterName : Required. Specifies, by name, the printer on which you want to print the file. -C BannerContent : Specifies the content to print on the banner page of the print job. If you do not include this parameter, the name of the computer from which the print job was sent appears on the banner page. -J JobName : Specifies the print job name that will be printed on the banner page. If you do not include this parameter, the name of the file being printed appears on the banner page. {-o | -o l} : Specifies the type of file that you want to print. The parameter -o specifies that you want to print a text file. The parameter -o l specifies that you want to print a binary file (for example, a PostScript file). -d : Specifies that the data file must be sent before the control file. Use this parameter if your printer requires the data file to be sent first. For more information, see your printer documentation. -x : Specifies that the lpr command must be compatible with the Sun Microsystems operating system referred to as SunOS for releases up to and including 4.1.4_u1. FileName : Required. Specifies, by name, the file to be printed. IN REALITY : -S ServerID is required ANY IDEAS WHAT IS WRONG is it this -S stuff or something else |
|
From: Chris T. <ch...@me...> - 2005-06-28 18:29:58
Attachments:
chris.vcf
|
Ok. I think I can provide some background. In *nix, lpr is able to take input from standard input. SL takes advantage of this by opening up the printer command with a pipe. So it is equivalent of doing cat filename | lpr. For a Windows LPR to work, it will also need to accept the input from standard input, unless you want to hack SL to open the file based on path instead. Tero Afelt wrote: > In microsoft documentation is told that: > > ( > http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/lpr.mspx) > > Syntax > > lpr [-S ServerID] -P PrinterName [-C BannerContent] [-J JobName] [{-o > | -o l}] [-d] [-x] FileName > > Parameters > <snip> > FileName : Required. Specifies, by name, the file to be printed. > Here is your problem. The XP lpr program doesn't appear to accept job data from standard input. Go Microsoft :-P You can either look for another command-line tool that does, or you can print to screen and print that way. Best Wishes, Chris Travers Metatron Technology Consulting |
|
From: Tero A. <te...@pr...> - 2005-06-27 20:18:11
|
I realize that I can print to print batch, when doing so I can see xxxxfiles.ps or xxxfiles.pdf in sql-ledger\spool folder. Files are perfect and I am able to open em or print em from wiever. SO - to me it seems that it must be a printer definition problem ??? |
|
From: Michael H. <mh...@it...> - 2005-06-28 01:56:12
|
I just print to screen with PDF. This launches the local PDF viewer on
the workstation and I print wherever I want.
Does that help?
Thanks,
Michael Hasse
Itwerx
206-850-1496
http://www.itwerx.net/
On Jun 27, 2005, at 9:36 AM, Tero Afelt wrote:
> PROBLEM: Printing in Windows XP
> I have installed Sql-ledger to a Win XP (service pack1 ) computer
> installation includes Apache 2.054
> Perl 5.8.7
> + Apache-DBI + Apache-DBILogin +
> DBD-Pg
> (specially compiled for Perl 5.8.7
> win
> version )
> AFPL Ghostscript 8.51
> GSview 4.7
> Miktex - Full
> Microsoft VCToolkit
> Postgre 8
> IndigoStar - sendmail
>
> SITUATION: Everything works exept:
> 1) printing to a printer HPLaserJetIIIP
> 2) Emails don't have senddate ( some Perl-component missing ? )
>
> * Printer is local printer- Shared with name HPLaserJ
> * IP of computer running Sql-ledger is 192.168.1.252
>
> If I choose print to sceen with postgript I get a GSview window with
> perfect
> template
>
> If I choose to print to screen with PDF I get Adobe/GSview window with
> perfect
> template
>
> If I choose to print to file I get Apache-error and logfile shows me:
> -malformed header from script. Bad header=No File to print
> or
> -malformed header from script. Bad header=The syntax of the command
> is i: is.pl referrer: http://127.0.0.1/sql-ledger/is.pl.....
> ( Which one I get depends what I put to sql.conf file as printer )
>
> Because winXP by default don't give me a possibility to use lpr ( as I
> can
> in Linux ) I have tried many different printer settings.
>
> When I print from command line I can do it for example:
>> print /d:\\192.168.1.252\HPLaserJ filename(with path)
> whit that command I can print to all shared LPT-connected-printers in
> network
> ( Windows ones)
>
> so I try:
>
> Some examples:
> # available printers
> %printer = ( Default => 'print /d:\\192.168.1.252\HPLaserJ');
> and
> %printer = ( Default => 'print /d:\\\\192.168.1.252\\HPLaserJ');
> and
> %printer = ( Default => 'copy /d:\\\\192.168.1.252\\HPLaserJ');
>
> BUT NON OF EM WORKS
> WHAT TO PUT THERE ????????
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> sql-ledger-users mailing list
> sql...@sq...
> https://lists.sourceforge.net/lists/listinfo/sql-ledger-users
>
|
|
From: Tero A. <te...@pr...> - 2005-06-28 22:14:17
|
To print from a pdf viewer is one solution, but same time if somebody is
printing continuously it is one more step to go. Optimal is have both
posibilities. I have Sql-ledger running also in Mandrake-server and there
funktionality is perfect, but this Windows XP instalation...
I believe that many of Sql-ledger users have had this same problem, there was
at least on thread ( at the beginning of this year ) where was exactly the
same situation. Unfortunatelly it is still flagged as not fully solved.
I think that the error begins from Form.pm file line 786 ( version 2.5.1 )
# launch application
print qq|Content-Type: application/$self->{format}
Content-Disposition: attachment; filename="$self->{tmpfile}"\n\n|;
unless (open(OUT, ">-")) {
$err = $!;
$self->cleanup;
$self->error("STDOUT : $err");
}
}
binmode(OUT);
while (<IN>) {
print OUT $_;
}
close(OUT);
Because after executing this part it gives out oe.pl file. When I open that
file there is first an Windows error - message concerning right syntax to
use when printing to network printer :
Error message:
lpr [-S ServerID] -P PrinterName [-C BannerContent] [-J JobName] [{-o | -o l}]
[-d] [-x] FileName
After that there is:
Html code + variables of that page where you push print button
I'm not sure but I believe that this shows that lpr - information was not
delivered as Windows except.
|
|
From: Richard P. <ri...@rp...> - 2005-06-29 08:45:53
|
Hi,
I think you have a couple of problems here...
1) SL makes PostScript files which are sent to the printer... unless
your printer is a postscript printer, you'll have problems
2) Windows does not have any command which will send standard input to a
printer...
The solution is to use the GSPrint utility from GSview:
%printer = ( Default => 'gsprint -');
will print to the default windows printer, you can make it print to a
specific printer by adding a -printer option as follows:
%printer = ( Laser => 'gsprint -printer "HP LaserJet 6P" -');
Alternatively,
%printer = ( Printers => 'gsprint -query -');
will ask you which printer to print to.
You will need to make sure that you add the gsview directory (c:\program
files\ghostgum\gsview) to your path.
I don't run SL on windows, but I think this will work...
Hope this helps
Regards
Richard
Tero Afelt wrote:
>PROBLEM: Printing in Windows XP
>I have installed Sql-ledger to a Win XP (service pack1 ) computer
>installation includes Apache 2.054
> Perl 5.8.7
> + Apache-DBI + Apache-DBILogin + DBD-Pg
> (specially compiled for Perl 5.8.7 win
>version )
> AFPL Ghostscript 8.51
> GSview 4.7
> Miktex - Full
> Microsoft VCToolkit
> Postgre 8
> IndigoStar - sendmail
>
>SITUATION: Everything works exept:
> 1) printing to a printer HPLaserJetIIIP
> 2) Emails don't have senddate ( some Perl-component missing ? )
>
>* Printer is local printer- Shared with name HPLaserJ
>* IP of computer running Sql-ledger is 192.168.1.252
>
>If I choose print to sceen with postgript I get a GSview window with perfect
>template
>
>If I choose to print to screen with PDF I get Adobe/GSview window with perfect
>template
>
>If I choose to print to file I get Apache-error and logfile shows me:
>-malformed header from script. Bad header=No File to print
>or
>-malformed header from script. Bad header=The syntax of the command
> is i: is.pl referrer: http://127.0.0.1/sql-ledger/is.pl.....
>( Which one I get depends what I put to sql.conf file as printer )
>
>Because winXP by default don't give me a possibility to use lpr ( as I can
>in Linux ) I have tried many different printer settings.
>
>When I print from command line I can do it for example:
>
>
>>print /d:\\192.168.1.252\HPLaserJ filename(with path)
>>
>>
>whit that command I can print to all shared LPT-connected-printers in network
>( Windows ones)
>
>so I try:
>
>Some examples:
># available printers
>%printer = ( Default => 'print /d:\\192.168.1.252\HPLaserJ');
>and
>%printer = ( Default => 'print /d:\\\\192.168.1.252\\HPLaserJ');
>and
>%printer = ( Default => 'copy /d:\\\\192.168.1.252\\HPLaserJ');
>
>BUT NON OF EM WORKS
>WHAT TO PUT THERE ????????
>
>
>
|
|
From: Tero A. <te...@pr...> - 2005-06-29 17:45:48
|
This solution seems very promising, there is however one small problem: gsprint command needs filename to be passed as : " filename "=20 not: -filename If use: =A0 =A0 %printer =3D ( Default =3D> 'gsprint -'); it will be passed as ' gsprint -filename ', and ends up with error=20 so the big question is how to change it to be: 'gsprint "filename"' Now if I only could find out how to modify sql-ledger so that it is passed = so.=20 =46orm.pm? ANY IDEAS ?? > Hi, > > I think you have a couple of problems here... > > 1) SL makes PostScript files which are sent to the printer... unless > your printer is a postscript printer, you'll have problems > > 2) Windows does not have any command which will send standard input to a > printer... > > The solution is to use the GSPrint utility from GSview: > > %printer =3D ( Default =3D> 'gsprint -'); > > will print to the default windows printer, you can make it print to a > specific printer by adding a -printer option as follows: > > %printer =3D ( Laser =3D> 'gsprint -printer "HP LaserJet 6P" -'); > > Alternatively, > > %printer =3D ( Printers =3D> 'gsprint -query -'); > > will ask you which printer to print to. > > You will need to make sure that you add the gsview directory (c:\program > files\ghostgum\gsview) to your path. > > I don't run SL on windows, but I think this will work... > > Hope this helps > > Regards > > Richard |
|
From: Chris T. <ch...@me...> - 2005-06-29 21:19:50
Attachments:
chris.vcf
|
Hi Tero; Read the gsprint documentation again (http://www.cs.wisc.edu/~ghost/gsview/gsprint.htm) gsprint - will cause gsprint to read from standard input (the required behavior for SL). SL feeds the data to the program using standard input, not by filename. Best Wishes, Chris Travers Metatron Technology Consulting Tero Afelt wrote: >This solution seems very promising, there is however one small problem: > >gsprint command needs filename to be passed as : " filename " > not: -filename >If use: > %printer = ( Default => 'gsprint -'); >it will be passed as ' gsprint -filename ', and ends up with error >so the big question is >how to change it to be: > 'gsprint "filename"' > >Now if I only could find out how to modify sql-ledger so that it is passed so. >Form.pm? >ANY IDEAS ?? > > > > > >>Hi, >> >>I think you have a couple of problems here... >> >>1) SL makes PostScript files which are sent to the printer... unless >>your printer is a postscript printer, you'll have problems >> >>2) Windows does not have any command which will send standard input to a >>printer... >> >>The solution is to use the GSPrint utility from GSview: >> >> %printer = ( Default => 'gsprint -'); >> >>will print to the default windows printer, you can make it print to a >>specific printer by adding a -printer option as follows: >> >> %printer = ( Laser => 'gsprint -printer "HP LaserJet 6P" -'); >> >>Alternatively, >> >> %printer = ( Printers => 'gsprint -query -'); >> >>will ask you which printer to print to. >> >>You will need to make sure that you add the gsview directory (c:\program >>files\ghostgum\gsview) to your path. >> >>I don't run SL on windows, but I think this will work... >> >>Hope this helps >> >>Regards >> >>Richard >> >> > > > >------------------------------------------------------- >SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >from IBM. Find simple to follow Roadmaps, straightforward articles, >informative Webcasts and more! Get everything you need to get up to >speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click >_______________________________________________ >sql-ledger-users mailing list >sql...@sq... >https://lists.sourceforge.net/lists/listinfo/sql-ledger-users > > > > |
|
From: Richard P. <ri...@he...> - 2005-06-30 09:46:06
|
Tero,
I was just about to tell you the same as Chris, but he got there first...
If you are still getting an error, it's probably due to gsprint
displaying a banner when it starts up:
- quote -
Copyright (C) 2003-2008, Ghostgum Software Pty Ltd. All Rights Reserved.
2005-03-01 gsprint 1.8
AFPL Ghostscript 8.51 (2005-04-18)
Copyright (C) 2005 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
- end quote-
This is still displayed when using the -quiet parameter and it's sent to
STDERR... the only way around it would be to wrap it up in a batch file
to redirect STDOUT & STDERR output to nul:
- - - gsp.bat- - -
@echo off
gsprint - > nul: 2>&1
- - - end gsp.bat - - -
Then change your %printers to:
%printer = ( Default => 'gsp.bat')
Hope this helps,
Regards
Richard
Chris Travers wrote:
> Hi Tero;
>
> Read the gsprint documentation again
> (http://www.cs.wisc.edu/~ghost/gsview/gsprint.htm)
>
> gsprint -
> will cause gsprint to read from standard input (the required behavior
> for SL).
>
> SL feeds the data to the program using standard input, not by filename.
>
> Best Wishes,
> Chris Travers
> Metatron Technology Consulting
>
> Tero Afelt wrote:
>
>> This solution seems very promising, there is however one small problem:
>>
>> gsprint command needs filename to be passed as : " filename "
>> not: -filename
>> If use:
>> %printer = ( Default => 'gsprint -');
>> it will be passed as ' gsprint -filename ', and ends up with error so
>> the big question is
>> how to change it to be:
>> 'gsprint "filename"'
>>
>> Now if I only could find out how to modify sql-ledger so that it is
>> passed so. Form.pm?
>> ANY IDEAS ??
>>
>>
>>
>>
>>
>>> Hi,
>>>
>>> I think you have a couple of problems here...
>>>
>>> 1) SL makes PostScript files which are sent to the printer... unless
>>> your printer is a postscript printer, you'll have problems
>>>
>>> 2) Windows does not have any command which will send standard input
>>> to a
>>> printer...
>>>
>>> The solution is to use the GSPrint utility from GSview:
>>>
>>> %printer = ( Default => 'gsprint -');
>>>
>>> will print to the default windows printer, you can make it print to a
>>> specific printer by adding a -printer option as follows:
>>>
>>> %printer = ( Laser => 'gsprint -printer "HP LaserJet 6P" -');
>>>
>>> Alternatively,
>>>
>>> %printer = ( Printers => 'gsprint -query -');
>>>
>>> will ask you which printer to print to.
>>>
>>> You will need to make sure that you add the gsview directory
>>> (c:\program
>>> files\ghostgum\gsview) to your path.
>>>
>>> I don't run SL on windows, but I think this will work...
>>>
>>> Hope this helps
>>>
>>> Regards
>>>
>>> Richard
>>>
>>
>>
>>
>>
>> -------------------------------------------------------
>> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>> from IBM. Find simple to follow Roadmaps, straightforward articles,
>> informative Webcasts and more! Get everything you need to get up to
>> speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
>> _______________________________________________
>> sql-ledger-users mailing list
>> sql...@sq...
>> https://lists.sourceforge.net/lists/listinfo/sql-ledger-users
>>
>>
>>
>>
>
>
>
> !DSPAM:42c356ec158162490614752!
|
|
From: Ross G. <ro...@gr...> - 2005-07-02 16:28:08
|
SQL-LEDGER v2.4.12 I followed the installation instructions, but when I try to hit http://hostdomain.com/sql-ledger, Apache throws an error. From httpd-error.log: Can't locate bin/mozilla/login.pl in @INC (@INC contains: /usr/local/sql-ledger /usr/local/lib/perl5/site_perl/5.8.6/mach /usr/local/lib/perl5/site_perl/5.8.6 /usr/local/lib/perl5/site_perl=20 /usr/local/lib/perl5/5.8.6/BSDPAN /usr/local/lib/perl5/5.8.6/mach=20 /usr/local/lib/perl5/5.8.6 .) at /usr/local/sql-ledger/login.pl line 121. [Fri Jul 1 16:28:05 2005] [error] [client 24.215.138.112] Premature end=20 of script headers: /usr/local/sql-ledger/login.pl I researched this problem on Google and in the list archives and came up=20 with this suggestion: ADD use lib '/usr/local/sql-ledger'; to am.pl and login.pl As you can see from the log, my installation path (/usr/local/sql-ledger) is showing up in @INC. MY sql-ledger-httpd.conf: Alias /sql-ledger/ /usr/local/sql-ledger/ <Directory /usr/local/sql-ledger> AllowOverride All Options ExecCGI Includes FollowSymlinks AddHandler cgi-script .pl AddDefaultCharset On Order Allow,Deny Allow from All </Directory> <Directory /usr/local/sql-ledger/users> Order Deny,Allow Deny from All </Directory> Any ideas would be greatly appreciated. Ross Gohlke |
|
From: Chris T. <ch...@me...> - 2005-07-02 22:36:30
Attachments:
chris.vcf
|
Ross Gohlke wrote: >SQL-LEDGER v2.4.12 > >I followed the installation instructions, but when I try to hit >http://hostdomain.com/sql-ledger, Apache throws an error. > > From httpd-error.log: >Can't locate bin/mozilla/login.pl in @INC (@INC contains: >/usr/local/sql-ledger /usr/local/lib/perl5/site_perl/5.8.6/mach >/usr/local/lib/perl5/site_perl/5.8.6 /usr/local/lib/perl5/site_perl >/usr/local/lib/perl5/5.8.6/BSDPAN /usr/local/lib/perl5/5.8.6/mach >/usr/local/lib/perl5/5.8.6 .) at /usr/local/sql-ledger/login.pl line 121. >[Fri Jul 1 16:28:05 2005] [error] [client 24.215.138.112] Premature end >of script headers: /usr/local/sql-ledger/login.pl > > > Ok, so Perl can't find or open bin/mozilla/login.pl. From the error message, it looks like it is looking in the right place, so I would suggest making sure your apache process has permission to read the bin directory and all subdirectories and files. Best Wishes, Chris Travers Metatron Technology Consulting |
|
From: Gerard K. <ge...@sh...> - 2005-07-02 22:58:08
|
On Sat, 02 Jul 2005 18:36:33 +0200, Ross Gohlke <ro...@gr...> wrote: > SQL-LEDGER v2.4.12 > > I followed the installation instructions, but when I try to hit > http://hostdomain.com/sql-ledger, Apache throws an error. > > From httpd-error.log: > Can't locate bin/mozilla/login.pl in @INC (@INC contains: > /usr/local/sql-ledger /usr/local/lib/perl5/site_perl/5.8.6/mach > /usr/local/lib/perl5/site_perl/5.8.6 /usr/local/lib/perl5/site_perl > /usr/local/lib/perl5/5.8.6/BSDPAN /usr/local/lib/perl5/5.8.6/mach > /usr/local/lib/perl5/5.8.6 .) at /usr/local/sql-ledger/login.pl line 12= 1. > [Fri Jul 1 16:28:05 2005] [error] [client 24.215.138.112] Premature en= d > of script headers: /usr/local/sql-ledger/login.pl > > I researched this problem on Google and in the list archives and came u= p > with this suggestion: > ADD > use lib '/usr/local/sql-ledger'; > > to am.pl and login.pl > > As you can see from the log, my installation path > (/usr/local/sql-ledger) is showing up in @INC. > > MY sql-ledger-httpd.conf: > > Alias /sql-ledger/ /usr/local/sql-ledger/ > <Directory /usr/local/sql-ledger> > AllowOverride All > Options ExecCGI Includes FollowSymlinks > AddHandler cgi-script .pl > AddDefaultCharset On > Order Allow,Deny > Allow from All > </Directory> > > <Directory /usr/local/sql-ledger/users> > Order Deny,Allow > Deny from All > </Directory> > > Hi, The only thing I can see that might be causing this, is in you =20 sql-ledger-httpd.conf The first line should read: Alias /sql-ledger /usr/local/sql-ledger/ The extra / at the end breaks it on my side, but not with the same error.= .. Hope it helps, gerard |
|
From: Ross G. <ro...@gr...> - 2005-07-03 16:12:23
|
When I visit h ttps://mydomain.com/sql-ledger/admin.pl I first get a login screen with a password field. I enter the password I=20 set in postgres for user 'sql-ledger' and get the Accounting Administration screen. I click Pg Database Administration. I leave the=20 defaults alone and click Create Dataset and get: Error! Permission denied I am a bit unclear on the difference between "local" and "remote" access= . Postgres is on the same box as Apache, so when I connect in a browser, i= s it local or remote? From data/pg_hba.conf: local template1 sql-ledger trust host template1 sql-ledger 127.0.0.1/32 trust There is nothing in httpd-error.log. templates users users/members are all owned, readable and writable by apache user. From users/members: [root login] password=3D Do I need to be setting host/port in Pg Database Administration? If so,=20 what should it be? Thanks in advance for any help. ross gohlke |
|
From: Chris T. <ch...@me...> - 2005-07-04 21:58:32
Attachments:
chris.vcf
|
Ross Gohlke wrote: >When I visit h ttps://mydomain.com/sql-ledger/admin.pl > >I first get a login screen with a password field. I enter the password I >set in postgres for user 'sql-ledger' and get the Accounting >Administration screen. I click Pg Database Administration. I leave the >defaults alone and click Create Dataset and get: > > > Is anything different when you try to connect to 127.0.0.1? How far do you get? Do you get a list of existing datasets? >Error! > >Permission denied > >I am a bit unclear on the difference between "local" and "remote" access. >Postgres is on the same box as Apache, so when I connect in a browser, is >it local or remote? > > From data/pg_hba.conf: >local template1 sql-ledger trust >host template1 sql-ledger 127.0.0.1/32 trust > > > You do realize that this means that unless you add more entries, you will be unable to connect to the new database you create, right? For the record, local means local UNIX domain sockets (basically a pair of FIFO's bound to the same filesystem entry) and host means TCP/IP. >There is nothing in httpd-error.log. > > What about the serverlog in the Postgresql data directory? Best Wishes, Chris Travers Metatron Technology Conssultign |
|
From: Gerard K. <ge...@sh...> - 2005-07-03 22:01:29
|
On Sun, 03 Jul 2005 18:22:57 +0200, Ross Gohlke <ro...@gr...> wrote: > When I visit h ttps://mydomain.com/sql-ledger/admin.pl > > I first get a login screen with a password field. I enter the password = I > set in postgres for user 'sql-ledger' and get the Accounting > Administration screen. I click Pg Database Administration. I leave the > defaults alone and click Create Dataset and get: > > Error! > > Permission denied > > I am a bit unclear on the difference between "local" and "remote" =20 > access. > Postgres is on the same box as Apache, so when I connect in a browser,= =20 > is > it local or remote? > > From data/pg_hba.conf: > local template1 sql-ledger trust > host template1 sql-ledger 127.0.0.1/32 trus= tt > > There is nothing in httpd-error.log. > > templates > users > users/members > are all owned, readable and writable by apache user. > > From users/members: > [root login] > password=3D > > Do I need to be setting host/port in Pg Database Administration? If so, > what should it be? > > Thanks in advance for any help. > > ross gohlke I haven't worked with postgres in a while, so I might be wrong... Local=3DLocal to the Machine. The connection to your database is between = =20 apache and postgres, therefore it's a local connection Remote=3DWhen you try to connect remotely to the machine - You'll only ne= ed =20 this if your database is running on a different machine than apache. I= f =20 you connect to a website, apache connects to the database, and that's seen as a local connection. local allows processes on you machine to connect to the postgres database= =20 via unix socket host allows connection via tcp/ip sockets Now your rules allow the sql-ledger user to only connect to template1 =20 database, but sql-leder needs to create new databases for each company (Datasets). Try changing it to read and restart postgres local all sql-ledger trust host all sql-ledger 127.0.0.1/32 trust This is still only local access to your database, and only the sql-ledger= =20 user is allowed. if it doesnt work, you can change it to local all all trust host all all 127.0.0.1/32 trust Which means any user can access any of the databases on the machine =20 locally. Hope it helps Regards Gerard Korsten |
|
From: Ross G. <ro...@gr...> - 2005-07-04 05:42:14
|
> Local=3DLocal to the Machine. The connection to your database is betwee= n =20 apache > and postgres, therefore it's a local connection > Remote=3DWhen you try to connect remotely to the machine - You'll only=20 need this > if your database is running on a different machine than apache. > If you > connect to a website, apache connects to the database, and that's seen > as a local connection. > > local allows processes on you machine to connect to the postgres=20 database via unix socket > host allows connection via tcp/ip sockets That's what I thought... > Now your rules allow the sql-ledger user to only connect to template1 =20 database, but sql-leder > needs to create new databases for each company (Datasets). If I understand the README correctly, the initial connection to template1 only tests the database, so as a first step, shouldn't I be=20 able to grant access for user: sql-ledger to only template1? > Try changing it to read and restart postgres > local all sql-ledger trust > host all sql-ledger 127.0.0.1/32 trust > > > This is still only local access to your database, and only the > sql-ledger user is allowed. > > if it doesnt work, you can change it to > local all all trust > host all all 127.0.0.1/32 trust > > Which means any user can access any of the databases on the machine =20 locally. I try to keep a tight leash on postgres access, granting only what is=20 needed for each user. However, I tried both of these and got the same=20 result. Does anyone know for sure if the message "Error! Permission denied" is a= n issue with postgres or apache? Thanks for the input. ross gohlke |