Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Patched version of the script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Patched version of the script
Authored by: truhe on Aug 22, '03 05:17:33PM

did anyone of you succeeded in making this work with php?

I can run the script with my account and as root in a terminal window. root can connect to my mail.app. however, other users are not able to do this and I get error messages:

kCGErrorIllegalArgument : initCGDisplayState: cannot map display interlocks.
kCGErrorIllegalArgument : CGSNewConnection cannot get connection port

Since php is executed as a different user I think, that it can't connect to my mail.app. Is there a way to connect to a special app of a special user on the local machine?

In terminal.app I'm also only able to run the app with "echo "testbody" | /usr/local/scripts/mail.pl -v -s testsubject truhe@metal.de" - everything else hangs after typing in the subject. Does any one of you know the correct syntax for the php.ini?



[ Reply to This | # ]
Re: initCGDisplayState error
Authored by: hayne on Aug 23, '03 06:17:46PM

The error you are getting are due to the fact that the script is trying to run a GUI application (Mail.app)
Only the one user who is logged in via the login window can use GUI apps.



[ Reply to This | # ]