Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Hello Monks!

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:

<form action="/cgi-bin/" method="POST" ><div id="trial_form" +>First name: <input type="text" name="givenName" /></div><div id="tri +al_form">Last name: <input type="text" name="surname" /></div><div id +="trial_form">Your Email: <input type="email" name="email" /></div><p +><input type="submit" value="Submit" /></p></form>

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....=)

In reply to Perl from PHP by koolgirl

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2022-11-27 16:04 GMT
Find Nodes?
    Voting Booth?