Jump to content

[SOLVED] Trouble Running .exe File


VenDiddy

Recommended Posts

Hi all. I have installed MediaWiki on my computer (localhost) which is running Windows XP and WAMP. The problem is, I'm trying to install mathematics support for it. I've been troubleshooting for two days and have finally narrowed the problem down to this line:

$contents = `$cmd`;

This is located in my Math.php file. I believe Math.php generates a command and stores it in $cmd. The line $contents = `$cmd` executes the command and stores the returned output in $contents. Here is what is contained in $cmd before the line I've shown is executed:

texvc.exe "C:\wamp\www\wiki\images\tmp" "C:\wamp\www\wiki\images\tmp" "x+y" "UTF-8"

I've found that after the $contents = `$cmd` line is executed, $contents is just equal to "". However, If I paste the exact contents of $cmd into the windows command prompt and hit the Enter key, texvc.exe properly executes, displays output, and creates a .png file.

 

When I try using a different executable for debugging purposes (I copied help.exe from C:\Windows\system32\ into C:\wamp\www\wiki and renamed it to help2.exe) $contents properly contains the output of the .exe file. My question is: what would cause an .exe file to execute properly in the command prompt but not execute through php? Thanks.  :)

Link to comment
https://forums.phpfreaks.com/topic/46337-solved-trouble-running-exe-file/
Share on other sites

Okay, I've made yet a little more progress. I have managed to extract this error from texvc.exe:

Fatal error: cannot load shared library dllunix Reason: The specified module could not be found.

I'm confused as to why this error is thrown when PHP runs texvc.exe and everything works fine when I run it from the command prompt.  ???

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.