Re: Please

2002-01-23 Thread Chris Nandor

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Ken McGlothlen) wrote:

> John Gruber <[EMAIL PROTECTED]> writes:
> 
> | Just curious: Why?
> 
> Well, I don't know about the other guy, but I miss having droplets, plus all
> the MacOS glue that makes working with creators and types easier.
> 
> The modules are getting there, but I haven't heard of any way to make a Perl
> droplet yet.

Droplets can be done in other ways.  And the modules, while nice to 
have, don't rely on having a Carbon MacPerl, it relies on Carbonized 
modules.

Stay tuned.

-- 
Chris Nandor  [EMAIL PROTECTED]http://pudge.net/
Open Source Development Network[EMAIL PROTECTED] http://osdn.com/



Re: Line endings (was: Help with Perl on MacOSX)

2002-01-23 Thread Chris Nandor

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Frank Nospam) wrote:

> For the record, does anyone here know why the two Steves picked
>  CR instead of LF back when they started this little company we
>  hate to love? Is there a practical advantage?
> 
> Similarly, : vs / as separator, the 1901 datestamp, etc. Is the
>  Steve way actually "better" than the pre-existing Unix way, or
>  were they being difficult just to "think different"?

You say that as though Unix were some sort of standard ... the problem 
was that there wasn't really an established standard.

As to the 1904 datestamp, that was to accomodate the fact that time_t in 
Mac OS is unsigned ... which in some ways makes more sense than a signed 
time_t.  Why have a negative time_t to go before 1970 when you can just 
start at 0 further back?  Again, there was no standard at the time.  
Same thing with /.

-- 
Chris Nandor  [EMAIL PROTECTED]http://pudge.net/
Open Source Development Network[EMAIL PROTECTED] http://osdn.com/



Re: Walkthrough for the Perl compile problem?

2002-01-23 Thread Charles Albrecht

At 10:02 AM -0500 1/23/2002, Frank Nospam wrote:
>Also, Apple says that with their default Apache running,
> I should be able to use the default CGIs. However,
> http://localhost/printenv returns a 404 for me.
> What's going wrong?

I can't answer the other ones, but this one is fairly straightforward.

If you take a look at /var/log/httpd/error_log, it will show an error 
along the lines of: 

[client 127.0.0.1] File does not exist: /Library/WebServer/Documents/printenv

So, this isn't the correct place where printenv lives and it isn't 
the correct way to access it.

 % locate printenv

Shows that it's at:  /Library/WebServer/CGI-Executables/printenv 

The configuration file at /etc/httpd/httpd.conf includes this bit:


#[.. snip ..]
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/Library/WebServer/CGI-Executables/"

#
# "/Library/WebServer/CGI-Executables" should be changed to whatever your 
ScriptAliased
# CGI directory exists, if you have that configured.
#

AllowOverride None
Options None
Order allow,deny
Allow from all




So, the correct path is:
  http://localhost/cgi-bin/printenv

But on my system, that also fails, /var/log/httpd/error_log shows:

[client 127.0.0.1] file permissions deny server execution: 
/Library/WebServer/CGI-Executables/printenv

Checking that file, 

% ls -ld /Library/WebServer/CGI-Executables/printenv

Shows me that its executable bits aren't set. If I set those,

% sudo chmod +x /Library/WebServer/CGI-Executables/printenv

The URL,

  http://localhost/cgi-bin/printenv

now works. For safety, though, it's good to disable CGIs that you don't 
actively need with:

% sudo chmod -x /Library/WebServer/CGI-Executables/printenv

just in case someone finds a security flaw with one of the factory-installed 
CGIs.

-Charles
 [EMAIL PROTECTED]



Re: Walkthrough for the Perl compile problem?

2002-01-23 Thread Chris Devers

On Wed, 23 Jan 2002, Frank Nospam wrote:

> When I twiddle with CPAN (1.5.2) it says I should get 1.5.9.

It's late now, but could you have skipped this step?

>  What steps am I doing wrong, and how do I fix it?

Error messages would help, as would the commands you're trying...
 
>  Also, Apple says that with their default Apache running,
>  I should be able to use the default CGIs. However,
>  http://localhost/printenv returns a 404 for me.
>  What's going wrong?

Well, I have that document in 

/Library/WebServer/CGI-Executables/printenv

which should probably map to a URL such as 

   http://localhost/cgi-bin/printenv

depending on how Apache is configured. Apache's main config file is kept
at

   /private/etc/httpd/httpd.conf

If anything keeps going wrong, take a look at it. You should have the
following blocks in that file: 

# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/Library/WebServer/CGI-Executables/"

#
# "/Library/WebServer/CGI-Executables" should be changed to whatever your 
ScriptAliased
# CGI directory exists, if you have that configured.
#

AllowOverride None
Options None
Order allow,deny
Allow from all


If you don't have that or something like it, let us know.


-- 
Chris Devers

"People with machines that think, will in times of crisis, 
make up stuff and attribute it to me" - "Nikla-nostra-debo"




Applescript and Shell inconsistencies

2002-01-23 Thread CardConnection Response Team

Hello,
  I'm using a module (OSXMacperl.pm) which uses osascript to execute an
embedded applescript. The perl script runs fine from the terminal app on
the server however when I log in remotely via ssh the script starts
running then quites before completion. The app which the applescript is
supposed to launch opens however none of the subsequent commands get
executed.
  I was reading the osascript man and it warns of different shell's
special characters causing a problem if they're used within the
applescript.

1) Is it possible that the shell used by an ssh connection is different
that that used by the terminal utility?

2) Ultimately the script will be used as a cgi on a website. What shell
should the script be modified to accomodate?

3) Here's the actual applescript:

$script = <


Walkthrough for the Perl compile problem?

2002-01-23 Thread Frank Nospam

I see there was a big discussion of this back in October,
 but I couldn't find a canonical answer. 

In OS X 10.1.2, I'm following the web server tutorial at
 http://developer.apple.com/internet/

When I twiddle with CPAN (1.5.2) it says I should get 1.5.9.
 When I "install Bundle::CPAN" it tries to recompile Perl.
 When it does its big make thing, it fails.

The net result is that I can't install any CPAN bundles.
 What steps am I doing wrong, and how do I fix it?

Also, Apple says that with their default Apache running,
 I should be able to use the default CGIs. However,
 http://localhost/printenv returns a 404 for me.
 What's going wrong?

-F.