perl site not working after upgrade

  • Hello I wonder if someone can shed some light on my problem. I just upgraded my IMSCP from 1.1.x to 1.3.10 and all went smoothly no errors. All sites work fine EXCEPT my perl website (sql-ledger). Previously I had


    AddHandler cgi-script .pl


    in the htdocs section of /etc/apache2/sites-enabled/my.site.co.uk.conf


    and I re-added that and restarted apache but I'm getting these errors and the site will not run. My server now seems unable to execute perl scripts since the upgrade.


    [cgid:error] [pid 3923:tid 140546228057856] [client 192.168.1.3:57042] End of script output before headers: test.pl


    I have a full backup of my previous install, but I don't want to have to go back to it since everything else has gone so well - what do I need to do to make IMSCP able to execute perl applications? FYI my test.pl (I'm using as a basic test for now) also it does not work in the cgi-bin folder.


    Please help!


    Thanks

    Edited once, last by tjfayaz120 ().

  • and I re-added that and restarted apache but I'm getting these errors and the site will not run. My server now seems unable to execute PHP since the upgrade.

    PHP or Perl?


    • Where are stored your perl scripts exactly?
    • What error did you get?

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

  • perl sorry was a typo!


    all files are stored in /var/ww/virtual/domain.co.uk/htdocs


    they were in there previously and working perfectly before I upgrade imscp

  • @tjfayaz120


    Perl scripts must live the cgi-bin directory. The CGI handler is not enabled for the htdocs directory. If this worked in previous i-MSCP versions this was surely because you have modified something.


    If you want really enable Perl support inside your htdocs directory, you must do like it is done for the /var/www/virtual/<domain.tld>/cgi-bin directory. Look at the vhost file ;)

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

  • Hi thanks but perl scripts don't even work in cgi-bin either. I copy my test (which just prints something to screen) into cgi-bin and go to it but same error.


    I modified /etc/apache2/sites-enabled/my.site.co.uk.conf
    and added this into the vhost previously which worked, also also re-added and restarted apache.


    AddHandler cgi-script .pl


    why does it not work now? I must have missed something?

  • @tjfayaz120


    I cannot say... I'll give a try using http://www.sql-ledger.org/
    I stay you informed. Ok?

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

  • To chime in on this, I too cannot run any scripts from cgi-bin. I tried some older ones I had and then used a test script. I get error 500 page and "End of script output before headers: test.pl" in error log. I run this script from command prompt and works according. Just a little script to say "It works" .. With my older scripts, a counter, I would get the same error in log. I have a user (my father which I maintain his site) that has used this script for years and when I started using i-MSCP is when it would no longer run. IMHO, perl scripts are old school so I just used a different solution and forgot all about it until I saw this post. Thought maybe I could help out a bit.


    Thank you and have a great day ...


    Debian 8.6
    i-MSCP 1.3.10 Horner
    PHP-FPM

    “Life is all an Elaborate Hoax”

  • @texxasrulez


    I bet that you forgot about the header ;)


    See http://users.cs.cf.ac.uk/Dave.Marshall/PERL/node196.html


    To resume, first line outputted must be:


    Perl
    1. print "Content-Type: text/html\n\n";


    Without this, you get a 500 error ;)

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