PDA

View Full Version : htaccess problem?


kb0kqa
02-13-2008, 06:48 PM
I have two urls that use the same base code (Drupal) but different databases (naturally) on web4.

The first, pearhead.org, is installed in it's proper directory (pearhead.org).

The second, mnsnowmobileconditions.com, is symlinked to the pearhead.org directory.

If I enable PHP5, pearhead.org reports that register_globals and mbstring_extension is off. At the same time, mnsnowmobileconditions.com says that it's on.

The four relevant lines in the htaccess file (I think):

AddType application/x-httpd-fastphp .php
Action application/x-httpd-fastphp /php-fastcgi/php-cgi
php_value mbstring.http_input pass
php_value mbstring.http_output pass

I fail to understand why one site sees these things as on while the other sees them as off.

If I take out the directive to switch to php5 then both sites switch back to php4 (and the problem goes away - except I need to use php5 now), so I know the file is being processed for each site.

Any ideas?

kb0kqa
02-14-2008, 05:14 PM
Anyone at all?

Ray
02-14-2008, 07:01 PM
I've not seen any issue like this before. I've just tested a similar setup with symlinks, and I'm not seeing any issue with a difference in configurations.

To disable register_globals, you can add the following line to your .htaccess file:

php_flag register_globals off

I'm really don't understand why the sites would have different settings, if they're using the same .htaccess file. Do you have a php settings page that can be compared between the two domains? In other words, something with the following line in it:

<?php
phpinfo();
?>

If not, you might want to create a page like "phpinfo.php" to see if PHP is actually passing the values differently for the two domains.

kb0kqa
02-14-2008, 07:15 PM
Thanks for the reply Ray.

The forum software won't let me post links as apparently I haven't posted enough posts here... So you'll need to assemble these yourself.

All can be accessed from either the pearhead.org domain or mnsnowmobileconditions.com domain:

pdf/pearhead.org.php4.pdf
pdf/pearhead.org.php5.pdf
pdf/mnsnowmobileconditions.php4.pdf
pdf/mnsnowmobileconditions.php5.pdf

These were PDFs were generated from their respective domains.

I'm not entirely sure what I'm looking at/for. I do notice that register_globals is off on one and on for the other.

Keep in mind that to switch between php4 and php5 I modified one .htaccess file.

kb0kqa
02-14-2008, 07:16 PM
To disable register_globals, you can add the following line to your .htaccess file:

php_flag register_globals off

That flag is already in the .htaccess file when I switch it to php5.

kb0kqa
02-14-2008, 07:20 PM
Just for kicks I tried modifying another value to see if it showed up correctly.

I modified smtp_port to 99. When looking at phpinfo() it shows up as 99 on pearhead.org but 25 on mnsnowmobileconditions.com.

kb0kqa
02-14-2008, 07:28 PM
This almost appears to be like the htscanner isn't parsing the file that is through a link.

Ray
02-14-2008, 07:50 PM
This is really strange. I've definitely never seen anything like this in the past. Like I say, I've tested it on a site of my own, and it seems to working fine through the symlink. I'm on a different web server than you are, but the configurations shouldn't be different enough to make a difference in that regard.

I would probably have to recommend opening a ticket for this. I really don't have any ideas.

Is that the entire content of the .htaccess file?

kb0kqa
02-14-2008, 07:53 PM
No, it's not the entire contents.

http://www.pearhead.org/htaccess.php4
http://www.pearhead.org/htaccess.php5

I'll open a ticket as well. Thanks!

kb0kqa
02-14-2008, 08:01 PM
Just for kicks, I created this .htaccess:

http://www.pearhead.org/htaccess.basic

To see if the problem was related to anything else in the php5 file.

It didn't change the symptoms at all.

kb0kqa
02-15-2008, 09:35 AM
Apparently the problem exists in web4 but not some of the other servers (web1 for example), although it's a mystery why.

Thanks again!