Jump to content

Weird PHP parsing issue


DarthJay

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....
Link to comment
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.
Link to comment
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.
Link to comment
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.
Link to comment
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...
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.