htscanner and PHP 5.4 - strange behaviour

Mango45

Active Member
Apr 21, 2009
42
1
58
Canada
cPanel Access Level
Website Owner
I tried to upgrade to PHP 5.4 but discovered that made htscanner behave strangely. By "behave strangely", I mean that htscanner looked for .htaccess files only in the public_html directory, and not the directory where the script was actually located.

Previously I was using PHP 5.2.17 and htscanner 0.8.1. After the upgrade I had htscanner 1.0.1. Before I remove that and try to install 0.8.1 again, I was wondering if anyone had success with this already and if so which versions you use.

Thanks! :)
 

cPanelJamyn

Social Engineer
Staff member
Jan 29, 2009
105
2
143
Hi,

What else was changed in your profile? PHP doesn't control the .htaccess depth, Apache does. Did you change Apache versions? What does the public_html .htaccess file look like? Can you show me at least one of the non-parsed .htaccess files as well?
 

Mango45

Active Member
Apr 21, 2009
42
1
58
Canada
cPanel Access Level
Website Owner
Hi Jamyn, thanks for your reply.

I did not change Apache versions. At least in the context of htscanner, Apache doesn't have anything to do with setting PHP configuration in .htaccess...that is, as far as I understand.

Here is one of the the non-parsed .htaccess:

<IfModule FakeModuleForHtscanner>
php_flag display_errors on
php_flag log_errors off
</IfModule>
I just realized now that I don't know if the FakeModuleForHtscanner hack still works with htscanner 1.0.1. I will need to test this next time I give the upgrade another try.

The public_html .htaccess is kind of long and complex so I hesitate to post it here. Next time I'll test with a "fresh" cPanel account to eliminate the possibility of that causing the problem.

Have you ever used PHP 5.4 with suPHP, and set PHP configuration within .htaccess files? If so I would appreciate knowing which versions you use, if it's not too much trouble.
 

Mango45

Active Member
Apr 21, 2009
42
1
58
Canada
cPanel Access Level
Website Owner
I finally got the chance to work on this again. If you would like to use the latest version of htscanner, this is how you do: HTscanner (CGI + suPHP)

Now there's no need to use the FakeModuleForHtscanner hack as things work as if you were using PHP as a module.

One caveat: when you run php from the command line, it still scans your .htaccess files. If this is is not the behaviour you intend, you should use php-cli instead.