Krpano tools on server

  • Hi!

    I've started learning about Krpano tools working on server. My first simple task is to process a pano jpg into tiles on server using PHP.

    I've spent the whole day yesterday and unfortunately can't get it working properly. Can someone please help me and give some advice?

    1. Our server is Linux cs31307.selectel 4.4.0-92-generic #115-Ubuntu SMP Thu
    Aug 10 09:04:33 UTC 2017 x86_64

    Do I need to run some installation of krpano tools on server or just upload Linux Krpano tools to some directory?

    2. Yesterday I tried the following code in PHP:

    Code
    exec("/var/www/omuzee/data/www/vr.omuzee.ru/test/krpano/krpanotools makepano -config=normal.config /var/www/omuzee/data/www/vr.omuzee.ru/test/4132.jpg", $output, $return_var);	echo "OUTPUT "; 	print_r($output);


    Output returns an empty array and return_var gives 127 (I found out that it means an error).

    I'm a bit confused about the paths in the code above...

    3. Also I'm confused about 'access rights' to the folder where the tiles will be created. I've searched the forum already on this topic and understood (vaguely) that 'home' folder or 'krpanotools' folder must be writable.

    This task is all new for me, and I'm not a proger, but need to learn and try&error, so any advice or help will be much appreciated *wink*

    Regards,

    Alexey

  • Hi Alexey seems you have some path problems.

    for example the path of the config file seems not to be correct. you can just start always from /var

    also you can remove , $return_var the $output is where you will get the response.

    You are almost there !

    If you did not change krpano structure this should work

    Code
    exec("/var/www/omuzee/data/www/vr.omuzee.ru/test/krpano/krpanotools makepano -config=/var/www/omuzee/data/www/vr.omuzee.ru/test/krpano/krpanotools/templates/normal.config /var/www/omuzee/data/www/vr.omuzee.ru/test/4132.jpg", $output);	
    	echo "OUTPUT\n"; 	
    	print_r($output);
  • yes you need to register in order to not have watermark, but that cannot be the reason as you should be able to execute it without registration done.

    maybe it's something on permits.

    you should be able to check if owner and permits are set properly (chown chmod)


    Of course printing some vars and checking if files exists on that path would help you... but some php/systems/linux skills are needed there

    helping blind is a bit dificult.

  • are you connecting to your server via ssh ?

    if so try to execute directly the code there without using php

    also check if path are correct, you can navigate through the server using cd (change directory)

    So when you make :

    Code
    cd /var/www/omuzee/data/www/vr.omuzee.ru/test/krpano/krpanotools




    then

    Code
    ls -l


    you should see the krpano files there

  • In addition to Jordi's comment about rights ensure that krpanotools has rights to execute. Also depending on the logging settings, check your error logs which may reveal something useful.

    GK

  • small update here: when I run my PHP command I can see this error in the server log:


    [Fri Jul 06 14:33:41.025843 2018] [cgi:error] [pid 27546] [client 91.200.47.42:35020] AH01215: Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != NULL' failed!: /var/www/php-bin-isp-php56/omuzee/php, referer:


    When the path to Krpano tools is wrong it says var/www/omuzee/data/www/http://vr.omuzee.ru/data/vt.omuzee…ano/krpanotools: not found:

    Cant' find any understandable info about this error...

  • Is this your own server, or are you running this from a shared hosting server?

    if you're on a shared hosting server, you might have the same issue as I do, where binaries are not allowed to be executed from anywhere outside of the root (this is called "root access" hosting, which - generally speaking - only VPS or dedicated servers allow).

    what sort of a server are you on?

  • Hi)

    Thanks for looking into it! Yes, we have our own server.

    Strange thing is that if I use old Krpano tools (1.0.8.15) inside the SAME directory on the server, it works... Krpano creates directory 'pano' with multires images inside it. The code is:

    Code
    exec("/var/www/omuzee/data/www/vr.omuzee.ru/test/kmakemultires kmakemultires.config /var/www/omuzee/data/www/vr.omuzee.ru/test/pano.jpg", $output);


    However, if I use the latest Krpano tools (19.pr-6), it doesn't work:

    Code
    exec("/var/www/omuzee/data/www/vr.omuzee.ru/test/krpano/krpanotools makepano -config=/var/www/omuzee/data/www/vr.omuzee.ru/test/krpano/templates/normal.config /var/www/omuzee/data/www/vr.omuzee.ru/test/pano.jpg", $output);

    Regards,

    Alexey

  • What does output says ?

    you can make

    Code
    file_put_contents('/var/www/omuzee/data/www/vr.omuzee.ru/test/output.log', $output);

    you should make sure issues about roles and permission

    chmod / chown

    you can actually test all that code in your teminal directly, no need for server...

  • The output is an empty array. And when I check server log, there's an arror:

    "[Mon Jul 23 16:55:09.397709 2018] [cgi:error] [pid 18985] [client 91.200.47.42:50128] AH01215: Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != NULL' failed!: /var/www/php-bin-isp-php56/omuzee/php, referer:
    "


    I googled it today the whole day and it seems like some Ubuntu bug which I cannot understand let alone fix...

    It seems that we will need to find a proper server-side proger who might help us with that issue.

    I just wanted to learn how to upload and process panoramas on server using Krpano tools by myself *wink* At least, now I can process panoramas using very old Krpano tools))) Success, anyway))


  • I want to bump this thread because this makes my head spinning. I tested very old Krpano tools (1.0.8.15) on my server and it works (simple kmakemultires call which then creates a folder and puts tiles in it). However, the latest Krpano tools don't work - I tried all possible variations (even put 32 bit tools on server - the output array is always empty).

    What I do:

    1. create some test folder on my server.
    2. set 777 rights to it to be writable.
    3. put a simple 'make_pano.php' script inside it and indicate paths. Set 755 rights to this file.
    4. upload Linux 64-bit Krpano tools into this folder. Set 755 rights to all the tools.
    5. Run php file from the browser address bar and see an empty output.

    Php code is simple:

    Code
    exec("/var/www/u0566741/data/www/alexeyonline.ru/krpano/kmakemultires /var/www/u0566741/data/www/alexeyonline.ru/krpano/kmakemultires.config /var/www/u0566741/data/www/alexeyonline.ru/krpano/pano.jpg", $output);			echo "OUTPUT\n"; 		print_r($output);

    I checked the GLIBC version and it's 2.12.

    I cannot understand why old Krpano tools work and why the new ones fail?

    Klaus, can you give me a hint there?
    Thanks for any advice - it's really needed! *wink*

    Regards,

    Alexey

  • Sorry, I copied the wrong line here to the post (a bit messed up here in the Notepad, because I tested old and new tools today).

    Of course, with the new tools I use this:

    Code
    exec("/var/www/u0566741/data/www/alexeyonline.ru/krpano/krpanotools makepano -config=/var/www/u0566741/data/www/alexeyonline.ru/krpano/templates/normal.config /var/www/u0566741/data/www/alexeyonline.ru/krpano/pano.jpg", $output);

    Regards,

    Alexey

  • Small update here: if I upload Krpano tools (pr 16) to the test folder on my server and then replace 'krpanottols' file with the old one (1.0.8.15) and add 'kmakemultires' file, then it works okay - I see the 'pano' folder created from 'pano.jpg' and inside it the ready panorama. Also I see the output in the html...

    I keep testing further, but this is relly werid and puzzling...

    Do you guys run the latest Krpano tools on server without such problems?

    Regards,

    Alexey

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!