segment path problems
Posted: 08 March 2005 08:45 PM   [ Ignore ]  
Grad Student
Rank
Total Posts:  52
Joined  07-05-2004

I’m using the {segment_x} tag to dynamically assign blog and category names.  However, the segment does not appear to be working as expected.  segment_1 returns the value of the word preceding my index.php?  page and segment_2 returns the index.php.  Any other value returns nothing..

Any ideas?  My site path appears to be set correctly in the General Weblog PReferences..  Is there somewhere else to define the base path?

Thanks in advance

Profile
 
 
Posted: 09 March 2005 08:35 AM   [ Ignore ]   [ # 1 ]  
Grad Student
Rank
Total Posts:  52
Joined  07-05-2004

Further to this issue..

I have also checked my config file and it also has the correct paths entered..  For some reason the segment tag is startingat my domain name rather than my weblog url..  IE it is starting at:

www.gracecommunity.ca

rather than at

www.gracecommunity.ca/dyn/index.php

I have used this technique on other sites with no issues - I feel I must be missing something simple..  grin

Profile
 
 
Posted: 09 March 2005 11:52 AM   [ Ignore ]   [ # 2 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

Could you create a file with a ‘.php’ on the end of it (a PHP file) with the following code and put it in your ‘dyn’ directory and see what it outputs?

<?php echo $_SERVER[‘PATH_INFO’]; ?>

This is what we use normally to figure out what is after the index.php and thus determine the values of the different segments.  I’d like to see if it is including the ‘dyn’ directory when it should not be doing so.

 Signature 
Profile
 
 
Posted: 09 March 2005 12:23 PM   [ Ignore ]   [ # 3 ]  
Grad Student
Rank
Total Posts:  52
Joined  07-05-2004

Thanks Paul..

The file I created was called output.php and resulted in:

/dyn/output.php


Philip

Profile
 
 
Posted: 09 March 2005 12:27 PM   [ Ignore ]   [ # 4 ]  
Grad Student
Rank
Total Posts:  52
Joined  07-05-2004

I found a reference in the Knowledge blog to changing a value in the index.php page for :

$qtype = 0;

in order to clear up some path related issues..

I’ve changes it to a 2 and it may have helped.  I’m just checking it now..  Strange that two sites on the same ISP require different configurations!

Philip

Profile
 
 
Posted: 09 March 2005 02:47 PM   [ Ignore ]   [ # 5 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

Really?  How odd.  When you say ISP, do you mean host?  It would seem quite odd for a host to have an odd-man out server that had what seems to be a bug, since most hosting places have all of their servers fairly synched up.

 Signature 
Profile
 
 
Posted: 09 March 2005 04:12 PM   [ Ignore ]   [ # 6 ]  
Grad Student
Rank
Total Posts:  52
Joined  07-05-2004

Yes - I suppose I mean Host - powerhoster.com - I think they have been having some server issues - I actually have had to move the site twice to different servers. 

Anyway - I am happy to report that the segment tag is now working with the change in index.php code..

THanks for the responses!

Philip

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64978 Total Logged-in Users: 21
Total Topics: 82016 Total Anonymous Users: 19
Total Replies: 440814 Total Guests: 187
Total Posts: 522830    
Members ( View Memberlist )