1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Big mySQL query crashes Plesk...and cgi doesn't work

Discussion in 'Plesk for Linux - 8.x and Older' started by greghughes, Apr 3, 2005.

  1. greghughes

    greghughes Guest

    0
     
    Hi, we just got a new server with Plesk on, got 2 major problems:

    1) I have a big forum with 7000 members and I have a gzipped mySQL dump of it. When I use the "DB WebAdmin" to upload this file and execute the queries, it hangs and Plesk dies for 5 minutes. I need to get the whole lot into the database, but the server can't seem to handle it. What should I do?

    2) I have uploaded ClickCartPro however instead of executing the cgi file it just displays the code (http://www.jungleravers.com/dnbshop) - the permissions on the folder/files are all 755, but it still isn't working. On my old host this worked fine, what am I doing wrong?

    Also when I go to restart apache from the service admin area in Plesk, apache shuts down and will not start again however rebooting the server fixes it.

    Thanks!
     
  2. worker

    worker Guest

    0
     
    1. If you still have access to your old db, you should just gzip /var/lib/mysql/db_name. Then create the db in the new control panel, and move the files to the right spot and verify the permissions are correct.
    If not, you might have a look at something like this:
    http://dev.mysql.com/doc/mysql/en/load-data.html
    or try upping the settings in /etc/my.cnf and php memory_limit.

    2. is cgi enabled for that domain? are you using the right cgi-bin (on the same level as httpdocs)?

    you should check log files for any problems.
     
  3. Matt.D

    Matt.D Guest

    0
     
    After many troubles with 7.5 upgrade I now discover that CGI/Perl doesnt work

    Don't ask me what are the setting for it, I dont deal with that language, but I have been deligated to find soe support for this issue.

    Even a simple script such as this:-
    Code:
    #!/usr/bin/perl
    
    print "test"
    
    does not work.

    The following comment is recorded in the error log

    Premature end of script headers: test.pl


    Any help much appriciated.
     
  4. ad7742

    ad7742 Guest

    0
     
    Matt

    Your simple script is not working because it is syntactically wrong. Make a file called hello.pl in your cgi-bin folder and put the following in it:

    #!/usr/local/bin/perl
    print "Content-type: text/html\n\n";
    print "<H1>Hello World</H1>\n";

    Now try and request that - does it work?

    If not:
    1) Ensure the file is saved in UNIX mode not DOS mode

    2) Ensure the file is owned by FTPUSER.psacln (e.g. if your FTP login was "mylogin", the file would be owned by mylogin.psacln)

    3) Make sure the file has its executable flag set (chmod 755 hello.pl)

    4) Look in the statistics/logs/error_log file for an explanation of what's going wrong.

    Post the last few lines of your error_log here if you don't understand it.

    The above 4 points should help you get your other Perl scripts running too.

    Cheers

    Andy
     
  5. CBiLL

    CBiLL Guest

    0
     
    I would think it not working because default plesk only allow cgi script to be excuted in cgi-bin folder only which is located outside of your httpsdoc folder ...


    You probably will need to be sure you gave permission to allow cgi script inside your httpsdoc folder if you want them in there ..


    Bill
     
  6. Matt.D

    Matt.D Guest

    0
     
    Thanks for the help, however...

    With the above script I still get the same error... The browser get the error_500 page (internal server error page), and the errorr log records this:-


    [Sun Apr 10 12:06:56 2005] [error] [client 83.xx.xx.40] Premature end of script headers: hello.pl
     
  7. smtalk

    smtalk Guest

    0
     
    Try: cp /usr/sbin/psa-suexec /usr/sbin/suexec

    If it does not help, look into /var/log/httpd/suexec_log and post a part of log.
     
  8. Matt.D

    Matt.D Guest

    0
     
    With the copy command the following is returned:

    Code:
    # cp /usr/sbin/psa-suexec /usr/sbin/suexec
    cp: `/usr/sbin/psa-suexec' and `/usr/sbin/suexec' are the same file
    

    the suexec_log has this entry:-

    Code:
    [2005-04-10 15:15:44]: uid: (10004/eaglenet) gid: (10001/10001) cmd: hello.pl
    
    The cgi-bin directory permissions are set to: rwx - rx - rx (755)
    the hello.pl file are set to: rwx - rx - r
     
Loading...