homepage Welcome to WebmasterWorld Guest from 54.196.62.132
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Php include problem
mikeD




msg:3290381
 12:39 am on Mar 23, 2007 (gmt 0)

For about 1 year I have been successfully using php include on my pages. They display search results from my database. Something like this,

<?php @include('http://www.example.com/search.php?q=widgets');?>

It will then print links on my pages with code such as,

http://www.example.com/search.php?id=16827

The problem I have been experiencing is that during parcing this part of the search url code is altered.

id=16827

When it should be - id=16827

it has been changed to - id=15427

The id number change has no logic to the alteration and left me scratching my head as to why this happens.

I can run a search query in my browser from the script and the correct id number is produced. I parse it into my pages using php include and it is altered.

Seems bizaare.

[edited by: dreamcatcher at 3:22 pm (utc) on Mar. 23, 2007]
[edit reason] Use example.com, thanks. [/edit]

 

eelixduppy




msg:3290440
 2:25 am on Mar 23, 2007 (gmt 0)

Hello Mike,

It seems fishy, indeed. My only guess is that there is some logical error in the included file. Just including the file should not change something like that, which leads me to believe something in the included file is altering it without your knowledge.

If I were you, I'd try to follow the logic of the included script all the way until the link is output to the browser. If need be, add some echo's in there so you can see what variables are equal to along the way. These types of errors are the hardest to spot.

Good luck! :)

mikeD




msg:3290818
 11:59 am on Mar 23, 2007 (gmt 0)

thx for the reply :)

whats really odd is when I run the included file in a browser it produces no error. and this file was working perfectly for a year using php include. my host recently altered the nameservers so something has changed a little with the hosting. this is the only thing i can think of.

henry0




msg:3290847
 12:51 pm on Mar 23, 2007 (gmt 0)

Did you check if your link format is not reacting to some weird mod rewrite that has been added without your knowledge (While altering server)

mikeD




msg:3291534
 11:34 pm on Mar 23, 2007 (gmt 0)

ended up loading the script in an iframe, not ideal but no other option.

this problem really baffled me beyond belief. ah well

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved