Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 29
  1. #1
    Member
    Join Date
    Aug 2003
    Posts
    33

    Default Broken CGI script since update

    I have a custom cgi script to upload HTML to a SQL database.
    It has been working fine for 2 years.

    Since the last update (Release) it is broken.
    I get a Server Error 500 when I submit the HTML code via a form. If I remove the HTML and just enter a few letters of text it uploads just fine. So I am thinking it could be a security setting somewhere?

    Any one can help?

  2. #2
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    Maybe, did you recently add mod_security?

  3. #3
    Member lankyb's Avatar
    Join Date
    Sep 2004
    Location
    Peterborough, UK
    Posts
    104

    Default

    Have you looked at the error log: /usr/local/apache/logs/error_log

    It might give you a clearer indication why the script is not working.

  4. #4
    Member
    Join Date
    Aug 2003
    Posts
    33

    Default

    The full error is: Premature end of script headers: /path/to/script.cgi

  5. #5
    Member
    Join Date
    Aug 2003
    Posts
    33

    Default

    and in suexec_log I get "directory is writable by others" and "file has no execute permission"
    All permission are set fine tho.
    They haven't changed since it last worked
    I did try to re-set them, and set the 777 files to 755 but it did not help.

  6. #6
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    So you changed the permissions on the files, but did you also change the folder to 755?

  7. #7
    Member
    Join Date
    Aug 2003
    Posts
    33

    Default

    yup I did.... Changing permission just broke everything else.

    I don't understand why a full html page won't upload thru the form but why a 4 letters word will....


  8. #8
    Member
    Join Date
    Mar 2004
    Location
    This Planet
    Posts
    984

    Default

    I was in a similar situation after today's upcp and things wouldn't work under proxied mod_perl and even same script as plain cgi (giving same premature .... error).

    http://forums.cpanel.net/showthread.php?t=41029

    Just dowgrade and see if it resolves your problem... though it could be something else also.

    Anup

  9. #9
    Member
    Join Date
    Aug 2003
    Posts
    33

    Default

    How do you downgrade DBD-mysql ?

    I did downgrade cPanel at some point but it did not help either....

    One thing I did the other day was to run /scripts/securetmp

    But I don't see how that would affect it?

  10. #10
    Member
    Join Date
    Mar 2004
    Location
    This Planet
    Posts
    984

    Default

    See if you have DBD-mysql-2.9008 in /home/.cpan/build

    perl Makefile.PL
    make
    make install

    if not then download from cpan

    and do the above and see if it helps.

    Anup

  11. #11
    Member
    Join Date
    Aug 2003
    Posts
    33

    Default

    Running the file from bash I get this:

    Can't locate library/subs.cgi in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl
    /5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/pe
    rl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/l
    ib/perl5/5.8.0 .) at /home/path/to/script.cgi line 29.

  12. #12
    Member
    Join Date
    Aug 2003
    Posts
    33

    Default

    How do you download this from cpan? I have a newer version and it might be my problem...

  13. #13
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Anup has told you how to do it. Do a search Issues with DBD::mysql have been discussed at length on the forum in the last few days.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  14. #14
    Member
    Join Date
    Jun 2003
    Location
    Florida
    Posts
    37

    Default

    I know DBD:mysql 3.000 has been discussed at length Chirpy, but has anyone fixed it? I've had my providers tech group on this to no avail. I've tried everything posted here and got no where. It's not causing me any real grief that I know of, but I hate to have errors showing up in the upcp log.

  15. #15
    Member
    Join Date
    Mar 2004
    Location
    This Planet
    Posts
    984

    Default

    go to http://search.cpan.org

    search DBD::Mysql

    Navigate to the list
    Download 2.9008
    tar--zxvf DBD-mysql-2.9008.tar.gz
    perl Makefile.PL
    make
    make install

    Most of the tech groups round the world have been failing with this and you can't blame them, it takes time to get to the cause. It took me two Hrs to get my stuff back to working stage (after 3.0000 broke almost everything on db based scripts (cgi/perl)) and the reasons of that hapening has been explained by the author (whioch i have already posted for info) when i contacted with the bug report. As mentioned, he is going to come with a fixed version (which is not 3.0001) soon

    Anup

Similar Threads & Tags
Similar threads

  1. formmail.cgi script suddenly requires something new after last update
    By jols in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-13-2005, 07:18 PM
  2. Permanture end of script: /usr/local/cpanel/cgi-sys/redirect.cgi
    By esupport.org.ua in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-08-2005, 12:22 PM
  3. Replies: 0
    Last Post: 02-14-2005, 09:49 PM
  4. Premature end of script headers: /usr/local/cpanel/cgi-sys/whmredirect.cgi
    By yeohbaby in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 01-14-2005, 09:20 PM
  5. Count.cgi Broken since Update
    By wilfried in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 06-13-2004, 05:43 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube