You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Brian Dimeler <br...@lserve.com> on 2005/01/14 17:45:54 UTC

Mac::Glue and mod_perl

Sorry for cross-posting this, but i think it applies to both groups.

I'm trying to write a mod_perl script (for PerlRun) that will present an 
online interface to my Mac OS X Address Book. Using the standard method 
of connecting to the glue (new Mac::Glue 'Address Book') doesn't work; 
the webserver complains about not being able to connect to a window 
server. So, I'm using Remote Apple Events instead (yes, I remembered to 
turn them on in System Preferences):

my $book = new Mac::Glue 'Address Book',
	eppc => 'Address Book',
	'mac8.local' # hosts both the webserver + addressbook
	undef, undef, # uid & pid omitted
	'Mac8', 'mypass' # Mac8 is the Admin user & owner of addressbook

This line apparently causes the server child process to exit:

[Fri Jan 14 11:02:40 2005] [notice] child pid 6070 exit signal Bus error 
(10)

However, it works if I run it in a Terminal window (the remainder of the 
script successfully prints out a list of address groups). It even works 
when run in a Terminal window in a different, non-admin user account, as 
long as I include the admin username and pass, as above.

So, does anyone know why it's causing a "bus error" when I try to run it 
in the webserver? Is there a workaround?

Brian


Re: Mac::Glue and mod_perl

Posted by Leo Lapworth <le...@cuckoo.org>.
> I'm trying to write a mod_perl script (for PerlRun) that will present an 
> online interface to my Mac OS X Address Book. 

I've litterally just started to do something like this:

http://svn.cuckoo.org/CPAN/Mac-AddressBook2Web/

It would work very differently though.

1) Script (to put in cron) on OS X box with AddressBook.
2) Export vCard information
3) Upload to webserver (any type) which then uses Text::vCard to process.
4) Process through TT and spit out web pages (will make it
   so you can do what you like with the Text::vCards, e.g. store to DB)

Let me know off list if this helps you and you need specific
functionality. Please be aware that the code is just me working
stuff out at the moment, but the basics work.

Cheers

Leo

Re: Mac::Glue and mod_perl

Posted by Brian Dimeler <br...@lserve.com>.
Well, if you mean restarting the whole computer, no; but I had shut down 
and restarted the webserver a few times, and always gotten the same results.

Martin Moss wrote:

> please forgive the really daft question, but have done
> a complete server shutdown and restart?
> 
> I've come across bus errors before where a complete
> server restart made the problem go away and never come
> back...
> 
> Marty


Re: Mac::Glue and mod_perl

Posted by Martin Moss <ma...@btopenworld.com>.
please forgive the really daft question, but have done
a complete server shutdown and restart?

I've come across bus errors before where a complete
server restart made the problem go away and never come
back...

Marty


 --- Brian Dimeler <br...@lserve.com> wrote: 
> Sorry for cross-posting this, but i think it applies
> to both groups.
> 
> I'm trying to write a mod_perl script (for PerlRun)
> that will present an 
> online interface to my Mac OS X Address Book. Using
> the standard method 
> of connecting to the glue (new Mac::Glue 'Address
> Book') doesn't work; 
> the webserver complains about not being able to
> connect to a window 
> server. So, I'm using Remote Apple Events instead
> (yes, I remembered to 
> turn them on in System Preferences):
> 
> my $book = new Mac::Glue 'Address Book',
> 	eppc => 'Address Book',
> 	'mac8.local' # hosts both the webserver +
> addressbook
> 	undef, undef, # uid & pid omitted
> 	'Mac8', 'mypass' # Mac8 is the Admin user & owner
> of addressbook
> 
> This line apparently causes the server child process
> to exit:
> 
> [Fri Jan 14 11:02:40 2005] [notice] child pid 6070
> exit signal Bus error 
> (10)
> 
> However, it works if I run it in a Terminal window
> (the remainder of the 
> script successfully prints out a list of address
> groups). It even works 
> when run in a Terminal window in a different,
> non-admin user account, as 
> long as I include the admin username and pass, as
> above.
> 
> So, does anyone know why it's causing a "bus error"
> when I try to run it 
> in the webserver? Is there a workaround?
> 
> Brian
> 
>  


	
	
		
___________________________________________________________ 
ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com