perl site not working after upgrade

  • @texxasrulez


    Headers are there. I just copied the script you linked to and still have the same error ...


    and permissions on the script are?

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • They are for my virtual user as setup by i-MSCP ...

    I you can make the script executable and retry?

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @texxasrulez


    Ok. Same issue too on my test server. I'll investigate and fix.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • just to re-itterate my perms are correct (executable etc.) and the code is also fine (with header output). Was working 100% on imscp 1.1 but not not working since I went to 1.3.10.


    eagerly awaiting news - you guys are so good to help :)

  • In fact, I cannot reproduce the bug. My previous problem was simply due to wrong permissions (my fault)...



    Shell-Script
    1. root@srv01:/var/www/virtual/bbox.nuxwin.com/cgi-bin# LANG=C ls -latotal 12drwxr-x--- 2 vu2003 vu2003 4096 Dec 20 17:57 .drwxr-x--- 18 vu2003 vu2003 4096 Dec 18 15:07 ..-rwxr-x--- 1 vu2003 vu2003 101 Dec 20 18:19 index.pl


    Shell-Script
    1. root@srv01:/var/www/virtual/bbox.nuxwin.com/cgi-bin# cat index.pl#!/usr/bin/perlprint "Content-Type: text/html\n\n";print "<big>Perl script is working</big>";1;root@srv01:/var/www/virtual/bbox.nuxwin.com/cgi-bin#

    Result

    Shell-Script
    1. root@srv01:/var/www/virtual/bbox.nuxwin.com/cgi-bin# tail -fn0 /var/log/apache2/bbox.nuxwin.com/access.log
    2. 192.168.1.1 - - [20/Dec/2016:19:16:17 +0100] "GET /cgi-bin/ HTTP/1.1" 200 33 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36"

    working.png



    Could you please to reconfigure your i-MSCP instance using the following command: perl /var/www/imscp/engine/setup/imscp-reconfigure -danvx

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • ok me too! I corrected perms on my test.pl and it works inside /cgi-bin now


    but still does not work in htdocs even though I have added the addhander option in the correct place. So how can I make it handle .pl in htdocs? I don't understand why it worked before but not now.

  • @tjfayaz120


    In your /etc/apache2/imscp/<domain.tld.conf> file, just do something like:

    Then once done, restart your Apache2 instance: service apache2 restart


    So here, as you can see, I don't change the vhost file that is generated by i-MSCP. I use the custom file that is provided for that purpose, and that is never overwritten by i-MSCP. Don't forget to adjust the domain name in paths ;) Also please, check the permissions on your Perl scripts and ensure that the vhost for your domain is back to the one that was generated by i-MSCP.


    Result


    working.png

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206