Re: [SLUG] Buggy PHP Code Value not incrementing

2000-12-10 Thread Terry Collins

Jeff Waugh wrote:

  4 - posts the data and clears the form everytime you hit the
  "create" button
 
 YOWZA! Don't do this! :)
 
 Imagine if you had three people who got to stage three (sitting there
 waiting to enter the form data)...

Yep, this is Database Design 101, but as I'm not planning on making data
entry under MySQL as a topic for a MacLUG day (I don't care how many
book titles you enter, you are not borrowing my Asimov {:-), I wasn't
worried about that. Normally when I'm learning code from other peoples
examples I just note the bad programming examples as a learning
exercise.

I solved the problem by just calling step 1 again after, which has the
result, I guess, of committing the write.


--
   Terry Collins {:-)}}} Ph(02) 4627 2186 Fax(02) 4628 7861  
   email: [EMAIL PROTECTED]  www: http://www.woa.com.au  
   WOA Computer Services lan/wan, linux/unix, novell

 "People without trees are like fish without clean water"


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Re: [SLUG] Buggy PHP Code Value not incrementing

2000-12-10 Thread Norman Widders

On Sun, 10 Dec 2000, Peter wrote:

 This technique of using the db's auto increneting attribute works fine
 unless you want the user to see the next id, invoice no, sample no etc
  
err no, the technique of using autoincrementing works just fine.
do a select and use a temporary variable to hold the nextval before doing
the insert using the tempvar.

select nextval('mytable_id_seq')

/Norman


Paladin Corporation Pty Ltd.  Ph:+612 9835-4782 Fax:+612 9864-0487
Software Engineering: c/c++/perl/sql/eiffel/pascal/haskell/php
Powered by FreeBSD/SMP  http://www.paladincorp.com.au/
The  lyf  so  short,  the  craft  so  long  to  lerne -Chaucer
Unix, VMS, MVS since the 80's,   FreeBSD from 2.1.6,   Linux since '94




-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



[SLUG] which font is that?

2000-12-10 Thread Brock Henry

Hi

I am trying to get chinese fonts working under netscape, but it is using a 
font I don't want it to.

there are two fonts, one at 12points which is too small, and one at 40 
points which is what I want. I can change the default under netscape and it 
works fine. However, the end result is I want these to work under an IBM 
netstation and I can't seem to change the default font there, so I want to 
remove the 12 point font so it can't use it, then it should default to the 
40 point one.

if I do an xlsfonts I can see the font there, the one I want to remove, but 
I can't find the actual font file to remove.

If there a way to find the actual font file, base on it's fontname 
-cbs-song.meduim-r-normal-fantizi-0-0-75... etc.

it doesn't seem to be listed in any of the fonts.dir or fonts.alias in 
/usr/X11r6/lib/X11/fonts and directories under that.

Where the hell is this font?!?!?!

the NetStation works very similar to the linux box, it's a netbsd thing and 
the directory structure is the same for the part I'm interested in.

Brock Henry

*
Brock Henry - [EMAIL PROTECTED] (H) - [EMAIL PROTECTED] (W)

Adventure? Excitement? A Jedi craves not these things.
* 



-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



[SLUG] VBA scripts on linux

2000-12-10 Thread tom burkart

Hi,
Is anyone aware of a way of running VBA scripts (the current version of
VB) under linux.


tom.
Consultant

AUSSECPhone: 61 4 1768 2202
339 Blaxland Rd., Ryde NSW 2112
Email: [EMAIL PROTECTED]



-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Re: Fwd: Re: [SLUG] EXIT COMMAND

2000-12-10 Thread James Wilkinson

This one time, at band camp, Herbert Xu said:
Harry Ohlsen [EMAIL PROTECTED] wrote:

 I guess "ZZ" was intended to mean "the end", as in the end of the 
 alphabet.  I remember when I was at uni 20 years ago it was a lot of fun to 
 walk up to someone's terminal and type "vi" to see if they could get out of 
 it.  Let's face it, it's not obvious that you should type ":" to get to a 
 command line, either :-).

Oh yeah, but it's even less obvious to get out of emacs :)

killall emacs from a different terminal works fine for me ;)

-- 
  "Fear leads to anger. Anger leads to hate. Hate leads to using
(o_ ' Windows NT for mission-critical applications." 
//\   -- What Yoda *meant* to say, Devin L. Ganger, scary.devil.monastery
v_/_  



-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Fwd: [SLUG] VBA scripts on linux

2000-12-10 Thread Harry Ohlsen


Is anyone aware of a way of running VBA scripts (the current version of
VB) under linux.

Get thee behind me satan :-).




-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Re: Fwd: [SLUG] VBA scripts on linux

2000-12-10 Thread Jeff Waugh

quote who="Harry Ohlsen"

 Is anyone aware of a way of running VBA scripts (the current version of
 VB) under linux.
 
 Get thee behind me satan :-).


Either I missed the first part of this thread, or you've forwarded us a
"laughable question" (either way, why is it forwarded?)

It's actually not a stupid question, and yes, there is a VBA-like scripting
language in development that will be (hopefully fully) compatible with VBA
itself. It's called Gnome Basic, and is required for Gnumeric to have full
compatibility with Excel spreadsheets - it could obviously fill this role
for all of the MS Office formats.

Yes, it is sandboxed the Right Way.


Even as keen as I am to see all lines cut between Free and proprietary
software, it's a pie-in-the-sky fiction to think the rest of the world will
see it that way (in the near future). In the mean time, dancing with the
devil using software such as Samba, GB, and all the other legacy OS
compatible addons we have is a Good Thing.

- Jeff


-- [EMAIL PROTECTED] --- http://linux.conf.au/ --

Ye shall be cursed to fall in love so easily, and yet be so cold of 
   heart as never to express it.



-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Re: [SLUG] Why Free Software is doomed... DOOMED!

2000-12-10 Thread Andrew Reilly

On Sun, Dec 10, 2000 at 06:01:38AM +1100, Jason Stokes wrote:
 Actually, it's no more dodgy to have Orbit functionality in the kernel
 than it is to have RPC and NFS functionality in the kernel.

The dodgy bits of RPC and NFS _aren't_ in the kernel.  RPC is
just sockets, anyway.  Service and host lookup is in daemons.

-- 
Andrew


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Re: Fwd: [SLUG] VBA scripts on linux

2000-12-10 Thread enterfornone

On Mon, Dec 11, 2000 at 11:58:29AM +1100, Harry Ohlsen wrote:
 
 Is anyone aware of a way of running VBA scripts (the current version of
 VB) under linux.
 
 Get thee behind me satan :-).

there is vb support for gnumeric being developed.  can't find the url
but it was on news.gnome.org a while back (news.gnome.org seems to be
down again, slashdot affect from the orbit and windows articles no doubt)

-- 
enterfornone - insert clever comment here
http://www.enterfornone.com/



-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



Re: [SLUG] PAM, LDAP.

2000-12-10 Thread Peter Rundle

Hi James,

 I'm wanting to use LDAP with the pam_ldap module to authenticate all sorts

From the looks of your error logs I suspect that you haven't successfully
set the password for that user in the LDAP directory.

I'm not familiar with OpenLdap but I would suggest that you need to find a
tool which can set and test the password for that user. (Eg can ldapsearch
be forced to bind as a user). If you are a good C hacker, you could
probably pull the pam_ldap.c code to piecies and write your own test
routine that took a uid and passwd of the command line and returned the
bind result.

Also if you are familiar with C it's not too hard to hack the pam_ldap
and put a syslog message containing the password string into the pam 
code so that you can check that the password it is trying to bind with is
the one you typed in. I think session-conf-bindpw is the variable you 
need to see.

One other word about pam_ldap, some applications (most notably proftpd) 
check for the presence of the user account in /etc/passwd BEFORE calling
the pam module. So no matter what you do with pam, you cannot be free of 
the entry in /etc/passwd.

HTH

rgds

Pete


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



[SLUG] PAM, LDAP.

2000-12-10 Thread James Peter Gregory

Hi all,

I'm wanting to use LDAP with the pam_ldap module to authenticate all sorts
of stuff. So I figured I'd start out by just configuring ftp to be
authenticated against it. I've grabbed the pam_ldap module from padl.com,
built that, I've built openldap, and I've got it up and running. I've also
used the migration scripts to migrate my /etc/passwd and /etc/shadow to
the ldap database - no problems so far. So, I then copied the example ftp
PAM config file from the pam_ldap distribution over to /etc/pam.d/ftp. I
copied the example ldap.conf file from pam_ldap over to /etc, and I've put
the appropriate host and base dn in. Now, needless to say it doesn't work.
Authentication still happens because the pam config file falls back to
standard shadow password files, but that's not what I want. 

From syslog:

Dec 11 15:33:36 beast slapd[3640]: daemon: conn=0 fd=9 connection from
IP=127.0.0.1:3466 (IP=0.0.0.0:389) accepted. 
Dec 11 15:33:36 beast slapd[3648]: conn=0 op=0 BIND dn="" method=128 
Dec 11 15:33:36 beast slapd[3648]: conn=0 op=0 RESULT tag=97 err=0 text= 
Dec 11 15:33:36 beast slapd[3648]: conn=0 op=1 SRCH
base="ou=People,dc=beast,dc=com" scope=2
filter="((objectClass=account)(uid=james))" 
Dec 11 15:33:36 beast slapd[3648]: conn=0 op=1 SEARCH RESULT tag=101 err=0
text= 
Dec 11 15:33:36 beast slapd[3648]: conn=0 op=2 BIND
dn="UID=JAMES,OU=PEOPLE,DC=BEAST,DC=COM" method=128 
Dec 11 15:33:37 beast slapd[3648]: conn=0 op=2 RESULT tag=97 err=49 text= 
Dec 11 15:33:37 beast ftpd[3647]: pam_ldap: error trying to bind as user
"uid=james,ou=People,dc=beast,dc=com" (Invalid credentials)
Dec 11 15:33:37 beast slapd[3648]: conn=0 op=3 BIND dn="" method=128 
Dec 11 15:33:37 beast slapd[3648]: conn=0 op=3 RESULT tag=97 err=0 text= 
Dec 11 15:33:37 beast slapd[3648]: conn=0 op=4 UNBIND 
Dec 11 15:33:37 beast slapd[3648]: conn=-1 fd=9 closed 
Dec 11 15:33:37 beast ftpd[3647]: FTP LOGIN FROM localhost.localdomain
[127.0.0.1], james

and /var/log/messages:

Dec 11 15:33:37 beast ftpd[3647]: pam_ldap: error trying to bind as user
"uid=james,ou=People,dc=beast,dc=com" (Invalid credentials)
Dec 11 15:33:37 beast ftpd[3647]: FTP LOGIN FROM localhost.localdomain
[127.0.0.1], james

now, it appears that uid=james... is an invalid login to ldap for whatever
reason. However, I currently have defaultaccess as write, with no other
access controls in slapd.conf. Furhtermore if I do

ldapsearch -v -W -x -b 'uid=james,ou=People,dc=beast,dc=com'
'(objectclass=*)'

with absolutely any password it will retrieve the correct information
(though I don't intend to keep 100% open access priveledges)

I'm guessing I'm missing some additional form of authentication somewhere,
but I can't see what it is. These appear to be all the steps people have
taken in various examples I've found on the web.

Any help would be greatly appreciated.

James.

-- 
"I like cats too. Let's exchange recipes." - unknown.



-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug



[SLUG] X-Win32 with Redhat 6.2 X-Windows

2000-12-10 Thread Dennis Gray

I am using X-Win32 4.1.4 to display sessions on a local Linux host running
Redhat 6.2. I have run across an annoy problem with the keyboard. Whenever I
press the number 2, either from the main keyboard or the number pad, I get
what looks like a backspace. I cannot enter the number 2 at all. I use this
X-Win32 program with Compaq Unix, HPUX, Solaris and SCO with no problem. Can
someone tell me how I might find the source of the problem and fix it?

Thanks

 GIF image