Jump to content

Archived

This topic is now archived and is closed to further replies.

DarthJay

Weird PHP parsing issue

Recommended Posts

I am running PHP 4.4.2 on IIS 6. I am running into an issue that I have never seen before and I was hoping somebody might be able to give me some insight. Here goes.

I have a multilanguage site where I am using an include file to pull in the main navigation. The directory structure of the site is as follows:

root
root/menus
root/espanol
root/espanol/menus

Now on my main index.php file, I have an include that looks like this:

[code]
<?php
include("menus/menu_home.inc");
?>
[/code]

However, when the page is parsed over the web, it is pulling randomly from either the "menus" or the "espanol/menus" directory. I am completely baffled by this behavior as I have run this site exactly how it is on 4 other webservers and have never experienced this before.

Any insight would be GREATLY appreciated....

Share this post


Link to post
Share on other sites
How are you deciding which language to use? Can you show some code please?

Share this post


Link to post
Share on other sites
I'm not sure I understand your question.

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]How are you deciding which language to use?[/quote]

It's a .php page...I'm using <?php tags to ecapsulate the PHP code. So the page is using PHP...?

Please clarify.

Share this post


Link to post
Share on other sites
I figured out this problem for anyone else who may be running into the same issue with PHP under IIS.

Apparently, if you don't set content expiration in the IIS manager (and you have PHP includes of the same name in different directories) then IIS randomly pulls one of the cached includes when it parses the page.

Weird.

Share this post


Link to post
Share on other sites
When I said which language I meant which language to display to the user - English or Spanish, not which scripting language :)

Glad yo fixed it :)

Share this post


Link to post
Share on other sites
[!--quoteo(post=368891:date=Apr 26 2006, 11:36 AM:name=Yesideez)--][div class=\'quotetop\']QUOTE(Yesideez @ Apr 26 2006, 11:36 AM) [snapback]368891[/snapback][/div][div class=\'quotemain\'][!--quotec--]
When I said which language I meant which language to display to the user - English or Spanish, not which scripting language :)

Glad yo fixed it :)
[/quote]

Ooooooh.

***slaps head***

Gotcha. Sorry.

Share this post


Link to post
Share on other sites
Its an easy misunderstanding.

I've been in conversations at work with IT colleagues and have been asked what I program in. I start my answer with "I know about 8 or 9 languages" and before I can get any further they interrupt with "No, I mean what do you use to write programs"

For some reason languages seems to trigger spoken languages instead of programming languages...

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.