Skip to content
Advertisement

Run Krpano From PHP in Linux

I am creating a PHP web app to run on Linux where user can upload their spherical image and my script will turn it into VR image . I have created one but it runs on Windows and have no clue on how to port it to Linux.

I have downloaded Krpano for Linux from its official site and successfully create a VR image by dragging my image to the droplet.

Now I want to create the VR using PHP, is there any executable file to do this ? In Windows, I would do such ” /path/to/krpano.exe /path/to/config /path/to/image.jpg”, but when I extract the downloaded file from krpano.com there is no executable file (Or I don’t know which one).

Anyone know how to execute krpano using PHP in Linux ? I found this tutorial here

http://krpano.com/forum/wbb/index.php?page=Thread&threadID=1306

but I dont understand how to implement it in my case.

Please help, thank you.

Advertisement

Answer

Linux and .exe

On Linux, everything is a file. Extensions, both as a concept, and a tip-off to the OS, don’t exist.

On Linux, an extension, like ‘.exe’, doesn’t inform the operating system to do anything unique with the file, it only makes the name of the file longer and gives a hint to the user. To really know what a file is, run ‘file’ on it.

Any file with executable permissions and that passes the kernels checks, can be executed.

Your question

Make sure you follow the installation steps pointed out in the video they provide. Sounds like you have if you’re successfully using the droplet.

Windows

/PATH/TO/krpano.exe /path/to/config /path/to/image.jpg

Linux

/PATH/TO/krpanotools makepano -config=templates/vtour-multires.config /path/to/image.jpg

I’ve not actually tried this, just pieced it together from looking at the exec parameter in the relevent droplet file. If this wasn’t the droplet you wanted, open the droplet.desktop file in a text editor, extract the command from exec=’…’ and replace the above with that, followed by your file.

Hope that helps!

Advertisement