/    Sign up×
Community /Pin to ProfileBookmark

Running other programs, TeX converters, Math rendering

How do I initiate other programs through PHP commands?

I have tried every variation of exec command that I could find referenced.

Depending on how my code is written, my page gets stuck in a never ending processing loop, an error occurs, or the page loads without accomplishing the task.

I simply need to initiate an external program… one not meant for web sites, specifically, but Im trying to integrate it nonetheless. Its the MikTeX program, which converts LaTeX written .tex files into .dvi and then into .ps.

I must tell the program to run, but also send a file name to it so that it knows what to process.

I have to initiate several programs in succession, actually. I must convert .tex into .dvi, then .dvi into .ps, then .ps into .eps, then .eps into .png

This is for math rendering. If you know a better way of doing this, please tell me.

I want to have, in my webpage, an image with a tag like this, for example:

[CODE]<img src=”lateximage.php?x^2+bx+c” />[/CODE]

And then have the png rendering of the equation sent to the clients browser.

I am running Apache, PHP, Perl, GD Lib, MySQL through the Wamp server… on a Windows XP PC. I have MikTeX’s LaTeX converter, to include dvips. And I have ImageMagick, which does the other conversions.

I just cant get the programs to run.

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @squishy spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...