|Just another Perl shrine|
Perl from PHPby koolgirl (Hermit)
|on Nov 07, 2012 at 14:19 UTC||Need Help??|
koolgirl has asked for the
wisdom of the Perl Monks concerning the following question:
I have been absent quite some time, stuck in web world (yawn). I have a Perl question and can not seem to figure it out, so I am back to annoy the monastery once again (seems to be a skill I have).
I have a WordPress website I am working on for a client, I know I know - **ducks to avoid a mouse hitting forehead**. I am integrating a form on the site, with GoTo Training, see This Page for a quick doc overview of the process involved. The API can not interact with the form directly, so I am using good old Perl.
However, since WordPress is written in php, my form which uses simply the action call to run the script (from the cgi-bin of course) does nothing. I have searched and searched and the only things I seem to be coming up with. are system and exec calls. However this doesn't seem to want to work, as my form is coming from a static page within wp.
Does anyone have a clue, how one would call a Perl script from an HTML form, buried in PHP, without actually using php itself? (if that makes any sense - as it's cumbersome to try and get php to execute from within a page) as in a system call, exec, etc., because the "plug ins" required to actually execute php from within a page, affect the entire site and are very clumsy.
Here is my form, very simple, just a name, last name and email:
Added - By the way - I have no desire to use php, I loathe the language, please understand that I am aware of the backlash I may cause by attempting to do so, but I refuse to do it in php, so with Perl from within php is my other option....that being said, please check all pitchforks and torches at the door ;-)
ADDED 11/09/12 (almost 11/10/12) - So, it seems all of you were quite right, nothing to do with php (likely culprit in my world, but nonetheless). However, I am not quite sure what the problem was...however, I did realize that, when I ran it outside the cgi-bin, just from public_html - worked fine (as in got a response). Not sure of that issue, especially since it certainly should be completely backwards, but I can not find the issue, as the cgi-bin and public_html both have identical config and permissions, but of course my access is a bit limited to the server. I eliminated the form, and ran it from my system (command line), and finally got to where I was at least getting a response. Now, my issue is getting the content in JSON, and dealing with a bad install of the JSON module, which cpan refuses to realize is gone. I am probably going to just delete Perl (strawberry) and reinstall (ActiveState). However, this OAuth token business was pretty complicated, so at least I got that leg work finished. =) Thanks, greengaroo, Limbic~Region (my old buddy - glad to see ya ;-), fullermd and spacemonk (and of course Voronich and Tanktalus <--- although the later really just goofed around with me while I avoided the work entirely =), and all the other monks in the cb and elsewhere ;-), not telling, who helped me. I keep waiting for this moment when I just sort of morph into a bad ass Perl hacker - sort of like a telephone booth clothes change for Wonder Woman (I can not recall how she changed - was it a phone booth?) but instead the bad guys keep kicking my arse. One day - one day, Monks....=)