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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > cannot execute helloworld CGI after installation

Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2004, 01:25 PM
_harri_ _harri_ is offline
Member
 
Join Date: Feb 2004
Posts: 11
Default cannot execute helloworld CGI after installation

hi!

i´ve just finished the installation of litespeed and i have some problems:
when i want to start the helloworld script on the demopage, nothing happens. the same thing in the admin-space: when i click on a "edit"-link, a new window pops up, but there is no content.

these messages are from the server-log:
2004-02-18 21:56:29.376
INFO
Start FCGI [phpFcgi]: failed to bind to uds://tmp/lshttpd/php.sock, fast cgi might be running,
2004-02-18 22:03:06.384
INFO
Start FCGI [fcgiAdminPHP]: failed to bind to UDS://tmp/lshttpd/admin_php.sock, fast cgi might be running,

this is one of the many errors in /opt/lsws/logs/stderr.log after browsing the admin-space:

PHP Warning: Unknown(): open(/tmp/sess_a38ee2b0cfe006ff4d3da9ef2ad02ea3, O_RDWR) failed: Permission denied (13) in Unknown on line 0
PHP Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
PHP Warning: session_start(): open(/tmp/sess_a38ee2b0cfe006ff4d3da9ef2ad02ea3, O_RDWR) failed: Permission denied (13) in /opt/lsws/admin/html/admin/authHeader.php on line 6

the tmp directory is mounted with the following parameters:
/dev/sda7 on /tmp type ext3 (rw,nodev,noatime)

it looks like a problem with the rights and i dont know anyway how to solve it...
can you tell me what lib´s and programs should be installed before using litespeed? i run lsws on a gentoo-linux machine and there is nothing preinstalled.


thx for helping!
_harri_
Reply With Quote
  #2  
Old 02-18-2004, 03:19 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Thank you for trying our product.
looks like your /dev/sda7 is full, make sure there are enough free space left. Make sure the user who the web server running as can write to /tmp/.
Reply With Quote
  #3  
Old 02-20-2004, 11:11 AM
_harri_ _harri_ is offline
Member
 
Join Date: Feb 2004
Posts: 11
thx! parts of the problem are now solved; after chmod -R 0777 /tmp , the admin-space works!

but the problem with the helloworld script still exists...
i`ll keep on trying to get it working. when everything is solved, i´ll post my expieriences with litespeed
Reply With Quote
  #4  
Old 02-20-2004, 08:19 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
I could not think of any thing that could cause helloworld script stop working.
Please turn on the debug log by changing "Debug level" to "high", and check lsws/logs/error.log or just use the log viewer, see if you can figure some thing out.
Please send the debug log to bug@litespeedtech.com if necessory.

Thanks.
Reply With Quote
  #5  
Old 02-22-2004, 05:31 AM
_harri_ _harri_ is offline
Member
 
Join Date: Feb 2004
Posts: 11
this is the part of the log after clicking on the helloworld link in the browser

Method=[GET], URI=[/cgi-bin/helloworld],
QueryString=[]
Content Length=0
2004-02-22 14:24:40.453 [DEBUG] [192.168.0.7:2131-0] HttpIOLink::suspendRead()...
2004-02-22 14:24:40.453 [DEBUG] [192.168.0.7:2131-0] run cgi processor.
2004-02-22 14:24:40.459 [DEBUG] [192.168.0.7:2131-0:cgi:cgi] CGI process pid=3485!
2004-02-22 14:24:40.459 [DEBUG] [192.168.0.7:2131-0:cgi:cgi] request header is done
2004-02-22 14:24:40.459 [DEBUG] [192.168.0.7:2131-0:cgi:cgi] Request body done!
2004-02-22 14:24:40.468 [DEBUG] [192.168.0.7:2131-0:cgi:cgi] CgiConnection::onRead()
2004-02-22 14:24:40.468 [DEBUG] [192.168.0.7:2131-0:cgi:cgi] [EXT] EndResponse( endCode=0, protocolStatus=0 )
2004-02-22 14:24:40.468 [DEBUG] [192.168.0.7:2131-0:cgi:cgi] release ExtProcessor!
2004-02-22 14:24:40.469 [DEBUG] [192.168.0.7:2131-0:cgi:cgi] HttpIOLink::continueWrite()...
2004-02-22 14:24:40.469 [DEBUG] [192.168.0.7:2131-0:cgi:cgi] write resumed!
2004-02-22 14:24:40.469 [DEBUG] [192.168.0.7:2131-0:cgi:cgi] HttpIOLink::handleEvents() events=4!
2004-02-22 14:24:40.469 [DEBUG] [192.168.0.7:2131-0:cgi:cgi] HttpIOLink::suspendWrite()...
2004-02-22 14:24:41.288 [DEBUG] [192.168.0.7:2130-6:cgi:cgi] Close socket ...




this line was added in stderr.log after the click:
/opt/lsws/DEFAULT/cgi-bin/helloworld: line 5: cannot create temp file for here document: Permission denied


where does the script want to create a temp file?
Reply With Quote
  #6  
Old 02-22-2004, 08:02 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Looks like some thing wrong with the CGI written in shell scipt.
Please try the CGI script on command line as "root" user and the user who the web server process is running as.

Code:
cd lsws/DEFAULT/cgi-bin/
./helloworld
sudo -u <username> ./helloworld
I think the last command will fail and produce the same output as the line in stderr.log, you need to figure out why the shell script does not work, maybe it is just a permission issue.
Reply With Quote
  #7  
Old 02-22-2004, 03:01 PM
_harri_ _harri_ is offline
Member
 
Join Date: Feb 2004
Posts: 11
thx, i´ll try to find the error and post my solution when it works!
Reply With Quote
  #8  
Old 02-23-2004, 05:38 AM
_harri_ _harri_ is offline
Member
 
Join Date: Feb 2004
Posts: 11
when i start the helloworld with user root in a shell, then it works.
when i start with sudo -u webserver ./helloworld in a shell, the error appears.

after that i set the writing permissions for tmp:
chmod 0777 /tmp
now sudo -u webserver ./helloworld worked fine in the shell, but not in the browser.
what else should i change?
Reply With Quote
  #9  
Old 02-23-2004, 08:05 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
The previous result might be cached by the browser, just restart the web server, do a no-cache refresh from your browser (press "shift" or "ctrl" key) when you click the refresh button.
Should work now.
Reply With Quote
  #10  
Old 02-23-2004, 01:01 PM
_harri_ _harri_ is offline
Member
 
Join Date: Feb 2004
Posts: 11
something changed! the "permission denied" error disappeared, but a new error was created.
this is from /opt/lsws/logs/stderr.log:
/var/web/DEFAULT/cgi-bin/helloworld: fork: Resource temporarily unavailable


but with sudo, the script was correctly executed ?!
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Client never gets server response Renuplex Ruby/Rails 9 04-23-2007 06:55 AM
Rail application installation in a sub-directory adriatic Ruby/Rails 1 10-31-2006 08:22 PM
Problem configuring APC or Zend Optimizer on Mac OS X installation dmcole Install/Configuration 4 10-23-2006 10:41 AM
Problem with installation on FreeBSD 5.3Beta5 Bartula Bug Reports 11 10-29-2004 09:00 PM
backup old installation during install of a new version. stefan Feedback/Feature Requests 2 08-28-2004 12:00 PM


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



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