PHP question RH Linux ---a bit ot---

2003-11-06 Thread Jason
All,

Trying to run an upload script.



A look at the configuration /etc/php.ini of PHP4.1.2 shows "no value" for
upload_tmp_dir should I change this to a proper path? if so do I have to
restart anything?


Any hints?

Jason
___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss


Re: PHP question RH Linux ---a bit ot---

2003-11-06 Thread Greg Rundlett
On linux systems, /tmp will automatically be used I believe.

Anyway, you don't even need to know where the temp location is.  You 
should use the $_FILES super global to access and manipulate the 
uploaded file.  Also, you can set the MAX_FILE_SIZE in a hidden form 
field to tell PHP what limit to accept...

Assuming these form elements (with a file input named 'pvtUploadFile')

   
   
Here is how you would process it:
 // where do you want it?
 $dgfStore = '/web/server5/hr/resumes/';
 // full path and filename of the 'new' file
 $dgfUploadedFile = $dgfStore . $_FILES['pvtUploadFile']['name'];
 // copy it from the temporary location
 copy($_FILES['pvtUploadFile']['tmp_name'], $dgfUploadedFile);
 // remember other superglobal values in case you want to use them
 $dgfFileName = $_FILES['pvtUploadFile']['name'];
 $dgfFileType = $_FILES['pvtUploadFile']['type'];
 $dgfFileSize = $_FILES['pvtUploadFile']['size'];
nb.
dgf stands for 'data gathering forms' and is a library that I would like 
to find time to share with everyone.  If you're interested, I will 
provide more documentation and code.

- Greg

Jason wrote:

All,

Trying to run an upload script.



if ($userfile=="none")

	{

	echo "Problem: no file uploaded";

	exit;

	}

if (move_uploaded_file($userfile,"/here/".$userfile_name))
 {
 echo "your file was loaded successfully";
 exit;
 }
 else
 {
 echo "nope";
			 }

?>

A look at the configuration /etc/php.ini of PHP4.1.2 shows "no value" for
upload_tmp_dir should I change this to a proper path? if so do I have to
restart anything?
Any hints?

Jason
___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
 



___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss


Re: X with ssh, (was Novell to acquire Suse)

2003-11-06 Thread bscott
On Wed, 5 Nov 2003, at 11:46am, [EMAIL PROTECTED] wrote:
> Turning off compression makes no difference at all.

  Oh well.  It was worth a shot.

> As you'll note I don't get the xauth error message that you got.

  Very curious.  I also note that you *do* get messages to the effect that 
the X11 forwarding *is* being requested:

> debug1: Requesting X11 forwarding with authentication spoofing.
> debug1: channel request 0: x11-req

  So, while your SSH client appears to be requesting X11 forwarding, the
lack of a DISPLAY variable in the resulting SSH shell session does imply a
failure on the part of the SSH server (sshd).

>> While I'm not sure where that error message about the DISPLAY variable is
>> coming from, I don't think the lack of a DISPLAY variable on the server
>> is causing your problem.  The sshd daemon is going to be running without
>> a DISPLAY variable anyway -- indeed, it won't even have a TTY.  I do
>> think you're on to something about some needed package being required but
>> not present.
> 
> I respectfully disagree. Time and time again I've noted that ssh
> will define a DISPLAY variable that points to the 'virtual display
> socket' (or whatever the right term is) that gets X applications
> connected through the ssh tunnel back to my workstation.

  Ah, I didn't explain that very well.  Yes, certainly, the sshd subprocess
that starts your SSH session should -- indeed, almost has to -- define a
DISPLAY variable, so that X clients you start from the SSH session know what
X display socket to connect to.  What I was trying to say was that the lack
of a running X server on the system you're SSH'ing into should not be a
problem.  The sshd daemon runs in the background, without a DISPLAY or a
tty.  The sshd daemon is responsible for creating a new DISPLAY socket,
should your SSH client request it.  It should not care what the server's
head is -- or even if it has one.  Looking back, you may not have even meant
to imply that you thought it did; if you did not, you can ignore this whole
issue.  :-)

  What likely does matter, as you have stated, is the particular combination
of SSH configuration options and software packages on the system you're
SSH'ing into.

>>   When you SSH in, check the output of "netstat".  Specifically, look for a
>> TCP connection listening on port 6010 or so.  That will at least tell us if
>> the SSH server is even trying to proxy the X11 connection.  I suspect not.
> 
> It shows no network connections near 6000. I only see the ssh connection
> between the two machines.

  Further evidence that sshd is not doing anything for X11 forwarding.

  (Just to double-check: You did look for *listening* connections, yes?  
For example, on my Red Hat-based system, I use "netstat -ltn" to find sshd
listening on 127.0.0.1:6010 when X11 forwarding is working.)

>> Can you run a test on a failing system with the sshd daemon in debug mode
>> (foreground, verbose output to console, single connection only, no
>> forking)?  While you pretty much need local access (since you're testing
>> your remote access method), the output can be very informative.
> 
> This is a little more involved.

  Yes, it is.  Unfortunately, the more we look at this, the more I think
you're going to have to do this.

  If SSH is in production use, you can try creating another instance of sshd 
on a different port, and using that for debugging.  For example:

sshd -d -e -p 26

That asks sshd to run in debug mode (-d), to send debug output to stderr
instead of syslog (-e), and to bind and listen on port 26 (-p 26).  Specify
"-d" multiple times to increase verboseness.  In debug mode, sshd does not
fork, runs in the foreground, generates debugging output, allows only one
session, and exits when the session closes.

-- 
Ben Scott <[EMAIL PROTECTED]>
| The opinions expressed in this message are those of the author and do  |
| not represent the views or policy of any other person or organization. |
| All information is provided without warranty of any kind.  |

___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss


Re: Tunneling a protocol over ssh

2003-11-06 Thread bscott
On Tue, 4 Nov 2003, at 8:19pm, [EMAIL PROTECTED] wrote:
> ... Win2k desktop system at work running a VNCviewer ... What I would like
> to do is set up an ssh tunnel so that I can view my Linux system at home
> which so my thinking is that I should be able to use one of the *nix boxes
> to tunnel the VNC connection via ssh over port 22 ...

  From your diagram, it appears as if your home Linux box has a public IP
address, via the cable Internet provider.  (Hopefully it has a firewall
configured on it, too.)  Furthermore, it sounds like you are running an SSH
server on the Linux box.  It also sounds like you are using PuTTY as your
SSH client.  Is this correct?  If not, please clarify; my example depends on
this.

  For the sake of discussion, I will assume you have a VNC server running on
the Linux box, with VNC display number ":1".

  To connect to that VNC server:
  1. Start PuTTY
  2. In the "Category" tree, select Connection -> SSH -> Tunnels
  3. Add a forwarded port:
a. Enter 5901 for the "Source port"
b. Enter "localhost:5901" for the "Destination"
c. Select "Local" for the type of forward
d. Click the "Add" button
  4. Return to "Session" in the "Category" tree
  5. Connect to IP address of your home Linux box with PuTTY.
  6. Once the PuTTY session is running, open the VNC Viewer program.
  7. Tell VNC viewer to connect to "localhost:5901".

  The port number 5901 is based on the VNC display number plus 5900.  If
your VNC display is something else, adjust accordingly.

-- 
Ben Scott <[EMAIL PROTECTED]>
| The opinions expressed in this message are those of the author and do  |
| not represent the views or policy of any other person or organization. |
| All information is provided without warranty of any kind.  |

___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss


Re: trying to figure out why mail is bouncing

2003-11-06 Thread bscott

  Please don't top-quote.

On Fri, 31 Oct 2003, at 10:08am, [EMAIL PROTECTED] wrote:
>> Following the delegation chain from the roots, I see your ISP says
>> <4.38.232.199.in-addr.arpa.> is a CNAME for <4.threeofus.com.>.  If you
>> put a PTR record in for that name with RHS , that should
>> fix things up.  That, and fixing  to have an A
>> record, rather then a CNAME.
>
> I think I have to make changes in a few places.. help me figure this
> out... there's /etc/named.conf ... then, there's
> /var/named/38.232.199.hosts and /var/named/threeofus.com.hosts ... any
> idea where I should be making changes?

  I presume /var/named/threeofus.com/hosts is the zone database file which
named loads for the  zone?  If so, you need to
add/change/verify the following records:

4.threeofus.com.IN  PTR mail.threeofus.com.
mail.threeofus.com. IN  A   199.232.38.4
threeofus.com.  IN  MX  mail.threeofus.com.

-- 
Ben Scott <[EMAIL PROTECTED]>
| The opinions expressed in this message are those of the author and do  |
| not represent the views or policy of any other person or organization. |
| All information is provided without warranty of any kind.  |


___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss


Re: PHP question RH Linux ---a bit ot---

2003-11-06 Thread Erik Price
 
On Thursday, November 06, 2003, at 03:10PM, Greg Rundlett <[EMAIL PROTECTED]> wrote:


>Anyway, you don't even need to know where the temp location is.  You 
>should use the $_FILES super global to access and manipulate the 
>uploaded file.

Greg's right.

> Also, you can set the MAX_FILE_SIZE in a hidden form 
>field to tell PHP what limit to accept...

Of course, be careful not to rely on this for any kind of security, since it's easy 
for a user to send whatever value they wish for the MAX_FILE_SIZE parameter.



Erik
___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss


Re: IMAP debate

2003-11-06 Thread bscott
On Tue, 28 Oct 2003, at 3:28pm, [EMAIL PROTECTED] wrote:
> As for Cyrus, I don't know enough about its implementation details to
> really distinguish it from maildir.

  It is somewhat similar in concept to mh and maildir, in that a
mailbox-is-a-directory, and a message-is-a-file.  Various persistent indexes
and lists are part of the format.  It is also designed around certain
assumptions (a single, global, unified namespace for all mailboxes;  
mailboxes do not need to be association with Unix users; support for
multiple disk partitions within the unified namespace) which may not be
immediately evident.

>>> Data corruption happens.
>> 
>> That is not an acceptable attitude for many.  Nor should it be, IMO.  
> 
> In principle I would agree, but be practical: we're talking about e-mail
> here.

  Yes, indeed.  And for many companies, including many of our clients, 
e-mail is their single most mission critical application.

> We're also talking about a disk failure.

  Well, I wasn't.  I'm talking about any kind of system crash.  I expect
disks to be protected by RAID.  But we've all seen even the best-designed
systems crash; that why we have journaling filesystems in the first place.

> So in any event, restoring from back-ups will be NECESSARY.

  Um, no.  A properly designed system (one that employs journaling
techniques) should be proof against this.  Such techniques are even readily
applicable to existing formats like mbox.

> I still think this really isn't an issue worth worrying about.

  I think it is, and I don't have the option of just dismissing it, as you
do.

>> Microsoft Exchange, for example, deals with this particular problem very
>> well, by using a journaled database for storage (Exchange has a host of
>> other problems, of course, but that's not the point I'm making here).
> 
> Perhaps so, but that feature may also be part of the cause of some of
> those other problems you mentioned.

  As I said, that's not the point I'm making.  FWIW, I don't think the
database format is why Exchange is such a pig.

> As a side note, I'm curious: how do those users retain only the last 6
> months of e-mail?  Is that a feature their client provides?

  No, they just sort their inbox by date, and clean out the last X number of
messages periodically.  I've encountered a few different people who do this.  
I suspect it's not all that common.  I'm pretty sure the "never delete
anything; everything in my inbox" mentality is much more common.

>> and you still have locking issues for mail delivery (which can be
>> significant with a big inbox).
> 
> You need to lock, but so long as you don't allow REMOTE access to the
> mail spools (i.e. NFS), this just isn't a big issue.

  Oh, I also forgot to mention that mbox doesn't support simultaneous shared
access, which is one of the more useful features of IMAP, and something that
businesses will make extensive use of, given the chance.

>> Maybe, with the right code, mbox can be made to suck a lot less, but it
>> still seems like you're trying to improve upon a bad idea to me.  Why
>> bother?  :-)
> 
> Three reasons:

  One.

>   - backward compatibility

  This I see as the big one.  And it *is* a big one.  As it happens, for our
customers, we use IMAP pretty much exclusively, so backward compatibility in
the mailbox format (for MUAs running on the mail server) is pretty much a
non-issue.  But that's not the case for many.

>   - many people still LIKE mbox, for various reasons

  That's not a reason.  That's an assertion that there are reasons.

>   - I still say that there's nothing inherently wrong with mbox...
> only with how people implemented it and use it.

  That's not a reason.  It's a reiteration of your assertion.

> It has lasted 30 years and is still in widespread use, despite
> availability of a number of "better" alternatives.  It can't be all THAT
> bad.

  The longevity of something has little to do with how good or bad it is.  
(Examples: COBOL.  IBM mainframes.  BASIC.  MS-DOS.  MS-Windows.)

-- 
Ben Scott <[EMAIL PROTECTED]>
| The opinions expressed in this message are those of the author and do  |
| not represent the views or policy of any other person or organization. |
| All information is provided without warranty of any kind.  |

___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss


Re: Setting up sound

2003-11-06 Thread bscott
On Wed, 5 Nov 2003, at 8:48am, [EMAIL PROTECTED] wrote:
> Can anybody recommend something that helps the newbie sort out ESD versus
> OSS versus ALSA versus "native" sound support versus whatever?

  OSS = Open Sound System (http://www.opensound.com/)
  ALSA = Advanced Linux Sound Architecture (http://www.alsa-project.org/)

  Those two are the options for kernel support for audio input, output,
mixing, and control devices.  They include the hardware-specific device
drivers, as well as userland interfaces (such as /dev/dsp, /dev/audio, and
/dev/mixer).

  OSS has been around forever, and supports a variety of platforms (Solaris,
HP-UX, *BSD, others).  It is available in both an Open Source and a
commercial package.

  ALSA is "OSS: The Next Generation".  It is Linux-only.  It includes
backwards compatability interfaces for userland OSS programs.

  Which one is better tends to depend mostly on your hardware.  If ALSA and
your hardware work together, use ALSA.  The ALSA website has good
information on this.

  Everything else (ESD, ARTS, etc.) is userland stuff to help programs use
the kernel's audio features.  I advise deferring exploration of that stuff
until the kernel is working.

  You can test kernel functionality by doing something like this:

sox testfile -t .ub /dev/audio

In the above, "testfile" can be .WAV, .AU, or whatever; SoX should
auto-detect it.  The "-t .ub" bit tells SoX the format to output; the ".ub"  
format seems to be what /dev/audio wants.

> Also, I have a more specific question: I have my system sound support
> limping along (badly misconfigured, no doubt) well enough that I can
> listen to Internet radio using the sound support provide by the integrated
> Intel i810 on the motherboard in the box I'm using.  Unfortunately, the
> sound is also coming out of the PeeCee's speaker and I can't figure out
> why, or how to stop it  any clues?

  Does "aumix" offer anything helpful?

  Another possability: I have heard tell of a sound driver that attempts to
make the PC speaker function as an audio-output device.  Could that be the
driver that is loaded?

  What brand and model motherboard do you have?

-- 
Ben Scott <[EMAIL PROTECTED]>
| The opinions expressed in this message are those of the author and do  |
| not represent the views or policy of any other person or organization. |
| All information is provided without warranty of any kind.  |

___
gnhlug-discuss mailing list
[EMAIL PROTECTED]
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss