• I need quick help.

    I have KRpano on Windows VPS(64 bit 2008) and it executes great. Trying to auto run it on selected files based on the directory. Want to do this from web form button (onclick).

    Currently, this php script works great, but only when the file source is static.


    What I want to do is be able to call the $path argument and fully populate into the exec() command, replacing the full static image path ([pathtoimage]/panopreload.jpg) in the shown code. Is this possible?

    Example, my $path is C:\\root\\vhosts\\mywebsite.com\\httpdocs\\pano\\fileupload12\\panopreload.jpg and I need to pass that into the exec() line but have it bracketed in quotations so that cmd can execute properly.

    Any advice or pointing in the right direction would be great.


    -ST

  • Code
    $command = '""C:\\root\\vhosts\\mywebsite.com\\httpdocs\\krpanotools64.exe" makepano "C:\\root\\vhosts\\mywebsite.com\\httpdocs\\templates\\vtour-multires.config" '.$directoryPath.'\\panopreload.jpg""';

    You tried this? or this?

    Code
    $command = '""C:\\root\\vhosts\\mywebsite.com\\httpdocs\\krpanotools64.exe" makepano "C:\\root\\vhosts\\mywebsite.com\\httpdocs\\templates\\vtour-multires.config" '.$directoryPath.'panopreload.jpg""';
  • Holy crap! Sach you are a life savior!

    Thank you. The first code worked. I had to have tried 40 different combos, but the darn .and " ' messed with me.

    Awesome. I can now take a 360, upload the content and auto run the multires on the file.

    Thanks again!

  • Cool. You need better diagnostic tools now. Use a log file to output your code so you can see whats going on..

    I use like the following.. some stuff is only applicable to my CMS so skip those parts..

    Code
    $LogName = file_directory_path() . '/cublog.txt';				// e.g. /home/pensacol/seeit360_file_downloads/cublog.txt
    
    
      $ourLogFileHandle = fopen($LogName, 'w') or die("can't open $LogName file for writing");
    $command = '""C:\\root\\vhosts\\mywebsite.com\\httpdocs\\krpanotools64.exe" makepano "C:\\root\\vhosts\\mywebsite.com\\httpdocs\\templates\\vtour-multires.config" '.$directoryPath.'\\panopreload.jpg""';
    
    
        fwrite($ourLogFileHandle,$command);
        fclose($ourLogFileHandle);

    Then you can tell when you've got a missing backslash or something going on. and piping any output from your krpanotools to the same file will show the errors.
    Trying to code blind on a server can be frustrating I know! *tongue*

Participate now!

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