Help - Search - Members - Calendar
Full Version: changing/renaming cgi scripts and mod_perl
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
paulbeard
I am running MT2.x on UNIX with Apache 1.3, MySQL 3 and mod_perl. I wanted to change the name of the scripts that appear in the HREFs on each entry to make it a little harder for comment spammers to get to me. But for some reason, i can't make it work. I can change the 'Post' script's name and it will work, but if someone wants to preview their comment, the factory-standard mt-comments.cgi is called and if it's not there, the user gets an error. This is only an issue under mod_perl for me: if I go back to a CGI-based installation, I can rename the scripts and they work just fine.

And by renaming them, I mean renaming the file and putting the new name in mt.cfg.

help?
DemiGoddess
You also need to do a full rebuild of your blog(s) ... that one tripped me up to! smile.gif
paulbeard
QUOTE
You also need to do a full rebuild of your blog(s) ... that one tripped me up to!


Rebuilding doesn't do it all: it does make the renamed mt-comments.cgi script work if users post but if they preview, that still calls mt-comments.cgi. if you remove it or make it non-executable (to block spammers) you break the preview function.

This seems to be an issue with mod_perl and MT not playing well together, but I don't know anyone running mod_perl: everyone seems to be running a CGI-based install. As bad as performance is in mod_perl, it's even worse if I revert to CGI.
ndns
QUOTE (paulbeard @ Apr 11 2004, 12:53 AM)
Rebuilding doesn't do it all: it does make the renamed mt-comments.cgi script work

Just to make sure, you haven't hardcoded the script name in any of your templates, right? If you have, use the MTCommentScript variable instead.
paulbeard
QUOTE
Just to make sure, you haven't hardcoded the script name in any of your templates, right? If you have, use the MTCommentScript variable instead.


Nope, I have the variable in place of the script name. All I can figure is that somehow the preview function doesn't work the same as post.

I know that mod_perl is working since I never see perl in my process table, just httpd, when a script is called. And there's a noticeable performance difference between the two.
maddy
So are you attempting to use something different for the script names than is indicated in the manual? Becaues they way I read it, it's not possible.

Though if you were keen, I'd imagine that if you wanted to use something other than the variables listed there, you would also need to change the locations that you enter into httpd.conf. Have you tried that? smile.gif
paulbeard
Per a request for some snippets from httpd.conf:

Obviously, these are out of context (they're not juxtaposed in the file).

CODE
<Directory "/www/mt/">
   Options ExecCGI +Includes
  Order deny,allow
  Allow from all
</Directory>

PerlModule Apache::Registry
<Location /mt/>
DirectoryIndex mt.cgi
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
PerlSendHeader On
allow from all
</Location>
paulbeard
QUOTE (maddy @ Apr 13 2004, 10:10 PM)
So are you attempting to use something different for the script names than is indicated in the manual? Becaues they way I read it, it's not possible.

Of course it's possible: people do it all the time and it's a recommended defense against comment spam. But again, the rub is, does it work with a non-CGI-based install? This would not be the first time I have discovered that mod_perl is not 100% supported (mt-blacklist doesn't worth with mod_perl installations, either).

see a forum thread about it here
maddy
I think it would be more helpful to troubleshooting this if you posted all of the changes you had made to httpd.confd, as well as the settings yo had in mt.cfg. If that's it, thanks. If not, please post them all. smile.gif

Did you set up MT to run under mod_perl in Registry mode or as a set of full-fledged handlers?
paulbeard
That is the sum total of changes.

And I just setup Registry mode, not the handler business. If I could find out more about mod_perl and MT, I'd be more comfortable making that change but I feel like I'm in terra incognita as it is.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.