LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > cPanel randhtml.cgi not working with LSWS SSI

Reply
 
Thread Tools Display Modes
  #1  
Old 09-07-2010, 11:34 AM
ffeingol ffeingol is offline
Senior Member
 
Join Date: Jul 2007
Location: /dev/null
Posts: 290
Default cPanel randhtml.cgi not working with LSWS SSI

We have clients using the cPanel randhtml.cgi script to display random 'sayings' on their web site via SSI. It works when it's running through Apache but you get no output when the SSI is handled by LSWS.

Please let me know if you need any other information.
Reply With Quote
  #2  
Old 09-07-2010, 02:16 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
can you please give some sample code that we could try in our lab?
Reply With Quote
  #3  
Old 09-07-2010, 02:31 PM
ffeingol ffeingol is offline
Senior Member
 
Join Date: Jul 2007
Location: /dev/null
Posts: 290
1) Ensure that "Random Html Generator" is enabled in default features (or any set of features that you use)
2) Create a cPanel account
3) Log into that cPanel account
4) Click on 'CGI Center'
5) Click on 'Random HTML Generator'
6) Enter some text
7) create a .shtml page with the code they give you:

Code:
<!--#include virtual="cgi-bin/randhtml.cgi"-->
Reply With Quote
  #4  
Old 09-08-2010, 12:04 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
I created a page test.shtml
Quote:
<!--include virtual="cgi-bin/randhtml.cgi user1"-->
("cgi-bin/randhtml.cgi" should follow user's account name)

in apache, the result:
Quote:
[an error occurred while processing this directive]
in lsws, result is
"ERROR 404: Not Found"

although the result different, both not working.

can you further confirm it's working under apache?
Reply With Quote
  #5  
Old 09-08-2010, 04:45 AM
ffeingol ffeingol is offline
Senior Member
 
Join Date: Jul 2007
Location: /dev/null
Posts: 290
What version of cPanel/WHM are you running? The sample code I gave (and what our client is running) does not have the user-id at the end of the code (see my example). The code works. With Apache the get random quotes (that's what they put in for the text) and under LSWS it's just blank.
Reply With Quote
  #6  
Old 09-08-2010, 05:34 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
Quote:
What version of cPanel/WHM are you running?
WHM 11.26.8

this is probably the original randhtml.cgi
Code:
~>ls -l /usr/local/cpanel/cgi-sys/randhtml.cgi
-rwxr-xr-x 1 root wheel 352408 Sep  8 04:51 /usr/local/cpanel/cgi-sys/randhtml.cgi*
is it same as yours?
Reply With Quote
  #7  
Old 09-08-2010, 05:46 AM
ffeingol ffeingol is offline
Senior Member
 
Join Date: Jul 2007
Location: /dev/null
Posts: 290
Yup, but what actually executes in the randhtml.cgi in the sies cgi-bin folder. This is what I have:

Code:
ls -l randhtml.cgi
-rwxr-xr-x 1 abcdef abcdef 3144 Jul 27 13:47 randhtml.cgi*
This is a very old account so it's possible it has an old version of randhtml.cgi within it's cgi-bin.
Reply With Quote
  #8  
Old 09-08-2010, 05:59 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
please test at your side:
Code:
cp -a /usr/local/cpanel/cgi-sys/randhtml.cgi /home/abcdef/public_html/cgi-bin/randhtml_new.cgi
and in the test.shtml, use
Code:
<!--#exec cmd="cgi-bin/randhtml_new.cgi abcdef"-->
it works on both apache and lsws at our cPanel box.
Reply With Quote
  #9  
Old 09-08-2010, 06:16 AM
ffeingol ffeingol is offline
Senior Member
 
Join Date: Jul 2007
Location: /dev/null
Posts: 290
Will do, but we have to schedule that kind of change for the weekend.
Reply With Quote
  #10  
Old 09-08-2010, 06:38 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
this one:
Code:
ls -l randhtml.cgi
-rwxr-xr-x 1 abcdef abcdef 3144 Jul 27 13:47 randhtml.cgi*
should be ok too.since it's same size as the one under public_html/cgi-bin at our cPanel box. so my previous suggestion about "cp -a ..." may not needed.

so just change the code from
Code:
<!--#include virtual="cgi-bin/randhtml.cgi"-->
to
Code:
<!--#exec cmd="cgi-bin/randhtml.cgi abcdef"-->
will do.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:50 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.