Page Index Toggle Pages: 1
Topic Tools
Normal Topic CGI Scripts showing as text (Read 2,320 times)
mrbrklyn
YaBB Newcomer
*
Offline



Posts: 7

None
CGI Scripts showing as text
Mar 20th, 2013 at 4:04pm
Post Tools
hey
  
Back to top
 
IP Logged
 
mrbrklyn
YaBB Newcomer
*
Offline



Posts: 7

None
Re: CGI Scripts showing as text
Reply #1 - Mar 20th, 2013 at 4:05pm
Post Tools
I used script alias in the httpd.conf file to make the link for the forum to be

domaine.com/cgi-bin/YaBB.pl

all is good but the redirects in the directory indexes like

domane.com/yabbfiles/Attachments/

redirect to the cgi at 

domaine.com/cgi-bin/yabb2/YaBB.pl

and since that is not a script alias :)  it exposed the entire script as a text file, something I really don't want.

I can fix the index.html's by hand but I assume I missed a setting somewhere?

Ruben
  
Back to top
 
IP Logged
 
Elfen
Full Member
***
Offline



Posts: 452
Re: CGI Scripts showing as text
Reply #2 - May 18th, 2013 at 6:52pm
Post Tools
darn, this is an old post with no answer?

My Answer: the permissions on the CGI-BIN files are not properly set. You will need to set each one by hand by what method you have (Windows system, Command line, etc).

In a graphic windows system, you will need to hilite each of the files ending in .lp in the cgi-bin folder and right click the mouse and select 'set permissions'. When the windows opens, there will be three rows or columns with 'Read', 'Write' and 'Execute'. Make sure that the ones for 'Execute' are set for on (a little 'X' in the boxes of the Execute Row/Column). Do the same with the files ending in .pl in the Admin folder and the Sources Folder, and that should fix it.

In the command line, once you are in the cgi-bin/yabb/ directory, you can simple use the command:
chmod 755 *.pl
to change the permissions as needed. You will also need to use that command in the cgi-bin/yabb/Admin and cgi-bin/yabb/Sources directories.

You will also need to go back into your httpd.conf file and put into your alias modification to point to the YaBB Scripts.

ScriptAlias yabb/cgi-bin/ "var/http/htdocs/yabb/cgi-bin"
(or whatever they maybe)
and
    <Directory "var/http/htdocs/yabb/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>


Hope that helps.

But to let you know, this does circumvents the YaBB License, and you need to pay some $$$ to YaBB to get the correct answer. I just wrote this in under 10 minutes of thinking how it can be done. I am not also right, so consider that as a warning.
« Last Edit: May 18th, 2013 at 7:01pm by Elfen »  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,467
Location: Earth

YaBB 2.6.1
Re: CGI Scripts showing as text
Reply #3 - May 19th, 2013 at 12:10am
Post Tools
You may also need something like:
Code
Select All
<Directory "var/http/htdocs/yabb/cgi-bin">
    Options Indexes FollowSymLinks Includes +ExecCGI
    AllowOverride all
    Order Deny,Allow
    Allow from all
</Directory> 



and
Code
Select All
<IfModule mime_module>

    TypesConfig conf/mime.types

     AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

   # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl

</IfModule> 

« Last Edit: May 19th, 2013 at 12:11am by Dandello »  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools