CGI Scripting

I’m trying to set up a CGI AppleScript. It’s linked to a page being served by ˜Personal Web Sharing’.

I’m starting off with the Scripting Additions command: Handle CGI request, viz:

I’ve used some sample code from the Guidebooks which were part of System 8.6(!), modified for revisions to later Scripting Additions.

on handle CGI request ThisRequest ¬
	searching for SearchString ¬
	with posted data PostArguments ¬
	using access method GETorPOST ¬
	from address ThisClient ¬
	from user UserName ¬
	using password UserPassword ¬
	with user info UserInformation ¬
	from server ServerApplication ¬
	via port ServerPort ¬
	executing by URLScriptPath ¬
	of content type MIMEType ¬
	referred by ReferringPage ¬
	from browser ClientBrowser ¬
	using action CGIPath ¬
	of action type ActionType ¬
	from client IP address ClientAddress ¬
	with full request FullRequest ¬
	with connection ID ServerConnection ¬
	from virtual host RootURL
	
	-- process request

end handle CGI request

When I click on ˜Submit’, it displays an error page, with the following message:

“The requested method POST is not allowed for the URL /~david/cgi-bin/PGKAutoAd.scpt.”

Anyone any clues?!

Many TIA

David

Model: PowerBook G4
AppleScript: 1.9.1
Browser: Safari 85.8.1
Operating System: Mac OS X (10.2.x)

OK, I should have searched the BBS BEFORE posting question!

Apache is not enough, when using ‘Personal Web Sharing’.

I’ve just purchased Acgi Despatcher, which should do the trick, I hope!

http://www.sentman.com/acgi/

If not, I’ll be back! :wink:

David

Model: PowerBook G4
AppleScript: 1.9.1
Browser: Safari 85.8.1
Operating System: Mac OS X (10.2.x)