0

Actually I've included the python script inside CGI script with back-ticks. While i was running the script I have an error like "ImportError: No module named skimage" through apache web server. But when i run via command line it was working properly.

OS: RHEL 6.5

Python: 2.7.8

$PYTHONPATH = /usr/local/bin

httpd conf (only CGI Part):

<Directory /home/*/public_html/cgi-bin>
     Options ExecCGI
     AddHandler cgi-script .py .cgi
     SetHandler cgi-script
</Directory>

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>

Note: 1. SELinux is already disabled
2. Shebang lines was included.

Can anyone help?.

Thanks in advance.

1

1 Answer 1

1

Maybe the library is installed only for you and not for root. Put the library script in the same folder of your main script and try.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.