combining php with perl

anyone knows how to combine both php n perl together? and run them at the same time?

Yep, that’s possible. In separate files though.

how do i do tat? do i just link them both together?

what are u trying to do?

u may as well execute the one script inside the other one an fetch the output.


let’s see

i submit a file up to grid mp server for rendering

it’ll runs a perl script and i wan to do php codes to insert the datas into mysql database

so how do i link perl script with php to do the codes?

i’m still not sure if i got u 100%.

this is how i understood it:
u have a perl-script witch uploads and renders a file.
u want have some more data that u wanna fetch, process and store with php.

if that’s right, what i would do is:
Use a PHP script that gets all the data including the file.
rewrite the perlscript a littlebit to exept a local input file as parameter and to output plain text instead of html.
And then i would use PHP to procces all the data, and call the perl-script with exec() to do the rendering.

hope this helps a bit

is it possible to tell me how to link php after executing perl scripts?

You can do this using HTTP headers.
Example sent header like:
Location: /path/your_scrip.php

Alternative is to use exec(), both languages support and handle third party program executions.

I wouldn’t recommend using exec() in ANY case though, as it runs outside your server software (afaik) and directly on your OS, posing a serious security issue if you don’t have everything neatly secured (and considering the questions you’re asking, I doubt you have a waterproof setup. nofi).

Sponsor our Newsletter | Privacy Policy | Terms of Service