Jump to content


Photo

Weird PHP parsing issue


  • Please log in to reply
6 replies to this topic

#1 DarthJay

DarthJay
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 26 April 2006 - 03:23 PM

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:

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

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....

#2 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 26 April 2006 - 04:01 PM

How are you deciding which language to use? Can you show some code please?
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#3 DarthJay

DarthJay
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 26 April 2006 - 04:11 PM

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.

#4 DarthJay

DarthJay
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 26 April 2006 - 04:34 PM

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.

#5 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 26 April 2006 - 04:36 PM

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 :)
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#6 DarthJay

DarthJay
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 26 April 2006 - 04:40 PM

[!--quoteo(post=368891:date=Apr 26 2006, 11:36 AM:name=Yesideez)--][div class=\'quotetop\']QUOTE(Yesideez @ Apr 26 2006, 11:36 AM) View Post[/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.


#7 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 26 April 2006 - 04:47 PM

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...
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users