last changed : 01/24/10
Questions :
Get "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact..." after installing the script.
Get "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact..." after edit the language file.
Get "CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers." when start the script.
Get "Software error: Undefined subroutine &Apache::ROOT::cgi_2dbin::efileman::efileman2ecgi:... called at /path/efileman_xx.cgi line xx." or "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact..." when running the script.
How can I hide the complete path values in manager go to root control ?
efileman logo don't appears. All files in manager screen displayed "no.gif".
Why efileman have User Path and User URL values and how should them configured ?
CHMOD, Permissions ?
Which efileman directories and files need to be CHMODded to which values ?
How are the name conventions for an uploaded file in case of multiple upload of the same file or a defined general upload path ?
Something more about the upload topic, eg. truncated files and CGItempxxx files.
I got "...Page not found or cannot display..." after login or after changing the root in manager screen.
Why does it takes so much time to display my file list ?
Why doesn't work the download counter of efileman 7.1 ?
How can I work with Archive::Zip if it's not installed on my server ? Or what can I do in case of an installed older version of Archive::Zip ?
Get Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact... after installing the script.
There are a lot of possibilities :
- On a UNIX like system make efileman.cgi executable. For example set the permisssions of efileman.cgi to 755. Set all efileman directories to 755 too.
- Did you changed the shebang line of efileman.cgi ? It's the fist line in a Perl script to tell the system where the Perl interpreter is located. In most cases the path on a UNIX server is "#!/usr/bin/perl". For a MS Windows server it's mostly "#!C:/perl/bin". Don't use backslashes !
- If you changed the script, eg. to verify or change the shebang line, on a Windows or MAC system and the script have to works on a UNIX system, the reason for the error message may be wrong new line characters. Try a text editor like proton or NoteTab Light and make sure to save the file with right format according the system requirements. See the following images how to configure NoteTab Lite and Proton. Move your mouse about an image to enlarge. Or click on the image to open it in a new window.
Get Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact... after edit the language file.
The language file is Perl code ! The syntax of $TEXT{'date'} = "MM YYYY"; defines the key "date" of a Hash named TEXT with the respective value "MM YYYY" and the required semicolon as end of code statement. The value is enclosed by quotation. Don't add text after semicolon in the same line without an comment directive # like:
$TEXT{'date'} = "MM YYYY"; # this is a comment
If you change the language file pay attentation to the syntax. Otherwise the script won't work. Don't add a new key like $TEXT{'mykey'} if already exist, because the first value will be overwritten by this new value.
If you want to copy and paste HTML Code from your editor into language file with quotations inside the code like <p style="color:#efefef;">... enclose the complete Hash value by qq{your text} instead the quotation like $TEXT{'mykey'} = qq{<p style="color:#efefef;">...</p>};
Get CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers when start the script.
Some webserver eg. Microsoft Information Server (may depend on configuration), requires non-parsed-header (nph) scripts, with the meaning of that the script should send a complete http header.
For efileman 7.1 and higher rename the script to nph_scriptname.cgi in this case eg. nph_efileman.cgi. Lower versions won't work.
Get Software error: Undefined subroutine &Apache::ROOT::cgi_2dbin::efileman::efileman2ecgi:... called at /path/efileman_xx.cgi line xx. or Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact ... when running the script.
Check the server enviroment, if there Apache:mod_perl running and you have efileman7.04x installed, update to a higher version of efileman.
How can I hide the complete path values in manager go to root control.
Define the user path variable in user configuration with an alias name like "/user/webdoc/data/=html root".
efileman logo don't appears. All files in manager screen displayed "no.gif".
There are 3 possibilities:
- The path/url to the images(icons) directory in efileman_config is wrong.
- There are no files with a respective extention, e.g. images/pdf.gif for file.pdf.
- Point 1 and 2 are right, but the icons path is a non-browsable directory (document-root), it should be possible to display a file icon like http://www.efileman.de/images/efileman/zip.gif. Move the efileman images directory outside the cgi-bin directory, if it's still inside. This directory is mostly not browsable.
ju / kihu
Why efileman have User_Path and User_URL values.
Path Variable : For internally reasons the script needs always an absolute path to access a file. URL Variable : On the one hand only with an URL you can display a file directly with your browser by clicking on a link (if the respective browser knows the file types - normally html, txt, jpg, gif). You can increase the performance of the script by using URL's, because any document request will be processed by the web server. If you use a path value for the URL variable, the script will send the file to user's browser in every case.
On the other hand the using of path values instead of an URL (may) have the benefit, that the click on a file link results always a download window. In particular it's necessary to use path values for the URL variable in case of accessing files which are located in non-browsable directories - outside the document-root (aka WWW-root or HTML-root) or inside the cgi-bin directory, which should be non-browsable ! And because the cgi-bin directory is mostly inside the document root, you don't need to switch the root to access files inside the cgi-bin directory as the following example shows (the alias names are only examples):.
User Path : /home/www/web4/html=HTML,/home/www/web4/html/cgi-bin=CGI
User URL : http://www.efileman.de,/home/www/web4/html/cgi-bin
So you can take one's choice between, eg.:
User Path : /home/www/web4/html/demo=Demo
User URL : http://www.efileman.de/demo
and
User Path : /home/www/web4/html/demo=Demo
User URL : /home/www/web4/html/demo
With efileman 7.1 you can manage a complete partition/drive by entering
User Path : /=Root
User URL : /
or for a Windows server system enter a drive letter following by colon
User Path : D:=Partition D
User URL : D:
If you don't define an alias name for the path variable, the full path will be displayed in manager view.
Don't abuse the script to hack other accounts. If you try to read the root as a normal user and you can read anything outside your account path, you should inform your server administrator/webmaster immediately, because your account is also vulnerable. If you have trouble with the administrator after your message, look for another webhoster with more security.
CHMOD, Permissions ?
efileman displays and uses the permissions (for UNIX-Systems ) numerically by using octal numbers.
Read permission is given the value 4, write permission the value 2 and execute permission 1.
r w x
4 2 1
These values are added together for any one user category (owner, group and others):
1 = execute only
2 = write only
3 = write and execute (1+2)
4 = read only
5 = read and execute (4+1)
6 = read and write (4+2)
7 = read and write and execute (4+2+1)
So access permissions can be expressed as three digits, eg.:
owner group others
640 rw- r-- ---
754 rwx r-x r--
664 rw- rw- r--
Which efileman directories and files need to be CHMODded to which values ?
For version 7.04x and the respective directories according the efileman.de enviroment:
| directory | permissions | comment |
| efileman | 755 | read/write/execute for owner, read/execute for others, set 500 for all cgi files like efileman.cgi etc. excepting 600 for efileman_config.cgi |
| lang | 500 | read/execute for owner, set read (400) for files inside |
| skins/default | 500 | read/execute for owner, set read for files inside |
For efileman 7.1 and the respective directories according the efileman.de enviroment:
| directory | permissions | comment |
| efileman | 755 | read/write/execute for owner, read/execute for others, set 500 for efileman.cgi, 600 for efileman_config.pm and 500 for ef_check.cgi |
| lang | 500 | read/execute for owner, no permissions for others, set read (400) for files inside |
| skins/default | 500 | read/execute for owner, no permissions for others, set read for files inside |
| module | 500 | read/execute for owner, no permissions for others, set read for files inside |
| usrfiles | 700 | read/write/execute for owner, no permissions for others, set read/write (600) for files inside |
| logfile | 700 | read/write/execute for owner, no permissions for others, set read/write for files inside |
The values above depends on who the owner of the files is (you or the web server), and what other services may need access to the files eg. backup services. On a MS Windows server set the respective files write protected. This should be possible with an FTP client by disabling the write permissions. There are no execution rights necessary.
How are the name conventions for an uploaded file in case of multiple upload of the same file or a defined general upload path ?
efileman 7.04 creates the files by adding "_upload" to the filename in case of second upload of the same file. Multiple upload of the same file will overwrite the second upload.
filename
filename_upload
efileman 7.1 creates the files by adding "_upload_SerNo" to the filename in case of multiple upload of the same file, so you will find:
filename
filename_upload_1
filename_upload_2
filename_upload_...
In case of a defined general upload path efileman creates the files by adding "username_" to the filename, so you will find:
username_filename
or combined:
username_filename
username_filename_upload_1
username_filename_upload_2
username_filename_upload_...
"username_" won't be add if there ##username## used in general upload path, because the user is already identified by directory name, like eg.
/home/mydomain/uploads/##username##
or
/home/mydomain/##username##/uploads
Something more about the upload topic, eg. truncated files and CGItempxxx files.
efileman uses the standard module cgi.pm, which will create a CGItmpxx file during a upload.
The following description is partly copied from cgi.pm documentation.
CGI.pm processes uploaded file. Ordinarily it spools the uploaded file to a temporary directory, then deletes the file when done. The temporary file is created with mode 0600 (neither world nor group readable).
The temporary directory is selected using the following algorithm:
- if the current user (e.g. "nobody") has a directory named "tmp" in its home directory, use that (Unix systems only).
- if the environment variable TMPDIR exists, use the location indicated.
- Otherwise try the locations /usr/tmp, /var/tmp, C:\temp, /tmp, /temp, ::Temporary Items, and \WWW_ROOT.
Each of these locations is checked that it is a directory and is writable. If not, the algorithm tries the next choice.
Different browsers will return slightly different things for the name. Some browsers return the filename only. Others return the full path to the file, using the path conventions of the user's machine. Regardless, the name returned is always the name of the file on the user's machine, and is unrelated to the name of the temporary file that CGI.pm creates during upload spooling.
There are occasionally problems involving parsing the uploaded file. This usually happens when the user presses ``Stop'' before the upload is finished.
Under certain server configurations the livetime of a script is limited with the meaning of killing a task by different reason. The upload process and the time of depends on file size, network connection of the client, and network connection and load of server. Please verify the following into your server config:
- processes must use a maximum of server time only ( see for IIS script timeout details )
- processes must use a maximum of x Megabyte memory only
- it's allowed a maximum of x processes only
The cgi temp file use also space on the server hard disk, which may be limited.
The cgitemp file will created by Perl CGI modul, the path for cgitemp files is probably a parameter
which would been set during Perl installation/compiling process.
There are the following lines in CGI modul line 23 et seqq.
Code:
# HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
# UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING.
# $TempFile::TMPDIRECTORY = '/usr/tmp';
May be someone has change they on your system. ef_check.cgi reads some of the CGI parameter.
efileman change only CGI parameter $CGI::DISABLE_UPLOADS in case of a disabled upload permission for a user.
I'm going to limit the upload by CGI parameter, but it's comment out at the moment. See ef_main.pm and look for
Code:
# $CGI::POST_MAX= ...
The # comment out the line. I'll use it in a later version. (Not used in final version of efielman 7.1.)
Neither my script nor any other upload script I've seen create the cgitemp file manually, it will
only read (identicated by uploaded file name, not the cgitemp file name) and copied to the final
location by a script.
The CGI module deletes the cgitemp file after processing the script automatically, unless the script task is killed by system or crashes for other reasons.
If you find CGItemp files inside your account, kick the server admin to change the path or change the hoster due to security reasons and because of needing double disk space while uploading files.
See CGI documentation for more information and in particular CGI Revision History in case of trouble with uploads using older versions of cgi.pm. It's recommended to update cgi.pm at first in case of trouble.
Another reason for not working uploads could be firewall and proxy software. Some local installed virus scanner software works like a proxy. Check your firewall rules and temporary disable your virus scanner to verify that.
For MS IIS check the following posted by singrum into the forums :
- Start the IIS management console (Start => Settings => Control Panel => Administrative Tools => Internet Services Manager).
- In the tree on the left-hand side of the console you should see "Internet Information Services" at the very top, then below this the name of your computer. Right-click your computer name and select "Properties".
- Under "Master Properties" is a listbox; ensure that "WWW Service" is showing, then click the "Edit" button.
- Click on the "Home Directory" tab.
- Click on the "Configuration" button in the Application Settings area.
- Click on the "Process Options" tab.
- In the CGI Configurations area there is a "CGI script timeout" value specified in seconds. The default value is 300 seconds (5 minutes).
- Change this value to whatever you would like your timeout to be.
- Work your way out by clicking the "Ok" button on each window until you get right back to the IIS management console.
- Close the management console.
- Restart IIS by opening a command prompt (Start => Programs => Accessories => Command Prompt) and type the command : iisreset
I got "...Page not found or cannot display..." after login or after changing the root in manager screen.
Every browser have a timeout with the meaning of a defined time value for waiting for a response. If your browser doesn't get a response from the server within this time, it stops waiting and display an error message. There are a lot of reasons for that. Click the browsers reload botton and try again. See also the next topic.
Why does it takes so much time to display my file list ?
Independent from bandwidth and quality of your internet connection, your modem and the performance of server machine of your hoster, one or more of the following reasons may be responsible:
- Every user who work with efileman at the same time, and all other processes which works at the same time, uses capacity of the server. Some processes needs more capacity than others in particular processes which are read/write the harddisk.
- The efileman default manager skin has a listbox (next to "jump dir" button) to list all subdirectories of the current root. If there are a lot of subdirectories and/or a deep directory structure, efileman needs the respective time and server performance to collect and display this data. Use a manager skin file without this listbox in case of trouble. But notice that the copy/move button/function won't work without this listbox.
- efileman collect all data from harddisk as first to be able to sort them according to the last useraction. If there are a lot of files in the current directory, it need time to collect and display the file list.
- efileman default skin files are using tables with the disadvantage that the content of the page won't display until the complete page is received by your browser.
Why doesn't work the download counter of efileman 7.1 ?
Two steps are necessary to bring download counter to work:
- enable download counter in admin global options.
- define an absolute path for User URL for the respective user, not an URL, e.g.
User Path = "/www/download/files=Files"
User URL = "/www/download/files"
because only with that is efileman script involved in download process and is able to count.
How can I work with Archive::Zip if it's not installed on my server ? Or what can I do in case of an installed older version of Archive::Zip ?
Ask your server administrator at first to install/update the modul. Follow the steps below only in case of trouble. Check if Compress::Zlib is installed on your server. If yes, download the newest Archive::Zip module from http://www.bike-nomad.com/perl/ or search in CPAN. In downloaded archive you will find a directory lib and in lib a directory Archive. Copy the directory Archive with content into your efileman directory on your account. That's all !
It have been sucessfully tested with some users and may work on your account too, but without warranty.
|