ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

{segment_1}

June 27, 2007 3:01pm

Subscribe [3]
  • #1 / Jun 27, 2007 3:01pm

    iterativemedia

    2 posts

    Hi, we have a dev server w/ our EE site running fine.

    Copied db and site to new server, site appears to work fine except our ‘{segment_1}’, etc is coming up blank w/ same url after domain name as dev server.  We’ve tried all we know for about 4 hours and aren’t arriving at a solution.

    Any help would be greatly appreciated.

    Jason

  • #2 / Jun 27, 2007 3:14pm

    Lisa Wess

    20502 posts

    Hi, Jason—

    I’m a little bit confused on what is happening.  If you could answer some questions then we’ll be more able to help:

    1. Explain what you expected to happen. Then explain what actually
    happened.

    2. Post the error message, if any, that displayed.

    3. Give a URL where the issue can be viewed.

    4. Post example code. Make sure to use the code tag (click “code” on the button bar).

    5. Post the EE build you are using. The build number can be found in the footer of the control panel pages.

    Thank you.

  • #3 / Jun 27, 2007 3:30pm

    OrganizedFellow

    435 posts

    @Jason:
    I’d recommend you try the other url segments: {segment_2} {segment_3} {segment_4}
    How are you with the conditionals?

    Try something like this:
    {if segment_1 == ""}
    <h1>Hey, Jason! Segment 1 is blank!</h1>
    {if:elseif segment_1 != ""}
    <h1>Hey, Jason! Segment 1 is NOT blank!</h1>
    {if:else}
    <h1> ... something else ... </h1>
    {/if}

    source:http://expressionengine.com/docs/templates/globals/conditionals.html

  • #4 / Jun 27, 2007 3:36pm

    Lisa Wess

    20502 posts

    Hi jammo - thank you for helping!  It’s not necessary to complicate this test with conditionals, though.  You could simply do this:

    Segment 1: {segment_1}

    Segment 2: {segment_2}

    Segment 3: {segment_3}

    which keeps it uncomplicated while showing us the values for troubleshooting purposes. =)

  • #5 / Jun 27, 2007 3:37pm

    OrganizedFellow

    435 posts

    You could simply do this:

    Segment 1: {segment_1}

    Segment 2: {segment_2}

    Segment 3: {segment_3}

    OH so true.

    <<shoots self in foot>>

    Thanks Lisa!

  • #6 / Jun 27, 2007 3:42pm

    Lisa Wess

    20502 posts

    Certainly!  It’s important when troubleshooting to reduce the complexity down to the bare minimum, so to speak, which is why I explained that.  Conditionals actually add a much larger level of complexity. =)

    I love your sig, btw.

  • #7 / Jun 27, 2007 7:07pm

    iterativemedia

    2 posts

    My point is when I did this (before asking on the forum) the values have nothing assigned to them.

    Running exact codebase on two servers.

    Segment 1: {segment_1}

    Segment 2: {segment_2}

    Segment 3: {segment_3}

    for /la/di/da

    results in:

    Segment 1: la
    Segment 2: di
    Segment 3: da

    and on other server:

    Segment 1:
    Segment 2:
    Segment 3:

    Everything else seems to be fine.  /core works, etc.

    Thank you, Jason

  • #8 / Jun 27, 2007 9:49pm

    Sue Crocker

    26054 posts

    Hi, Jason. You didn’t mention which version/build you are using. You can find that information on the bottom of each CP page.

    How do the two sites differ?

  • #9 / Jun 27, 2007 11:01pm

    iterativemedia

    2 posts

    1.5.2

    Two debian linux server.

    The one w/o the issue has php 5.2.0-8, apache 2.2, mysql 5.3.2
    The one with the issue has php 5.0.2, apache 1.3, mysql 5.3.2

    Both deployed from one svn repo, sql dump restored from same svn source as well.

    Thank you.

  • #10 / Jun 28, 2007 10:48am

    Robin Sowell

    13255 posts

    Hm- before we do any serious debugging I’d recommend upgrading to the latest version so we’re all looking at the same code base.  That said- haven’t seen this reported as a bug in 1.5.2- or I think ever.

    Any way you can link to an example page- one where you’ve got the segments showing like in the above debug test?

    Might also turn php on for that template- and then take a look at what the input class is coming up with.  This could be a server difference- failing one having trouble with path_info.  But I’d think more than the segments would be jammed up.  Still- try the below, let’s see what it says:

    <?php
    global $IN;
    
    echo 'Segment array:
    ';
    print_r($IN->SEGS);
    
    echo 'URI:
    ';
    echo  $IN->URI;
    ?>
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases