need help with server change.

Discussion in 'PHP' started by Robert Allen, Sep 25, 2006.

  1. #1
    $server_root = "D:\X\freeimghost.us\httpdocs";

    Simple server change... but i am going from a linux-based to a window-based because it was cheaper. This path is the problem.

    It wont work. It comes up with a T_STRING error from the config file.

    I need a solution somehow. I am slightly confused because i am used to linux-based web enviroment.

    Can someone suggest or give me a solution?

    Rob
     
    Robert Allen, Sep 25, 2006 IP
  2. Pat Gael

    Pat Gael Banned

    Messages:
    1,331
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    0
    #2
    maybe your are using the wrong path.

    Upload the attached file to your server and run it from your browser.

    It will give you the right location.
     

    Attached Files:

    Pat Gael, Sep 25, 2006 IP
  3. Robert Allen

    Robert Allen Peon

    Messages:
    2,685
    Likes Received:
    247
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I am just doing what my host says.

    i tryed to change all the \ to %5C which is why there is no error until you upload.

    php cant cope with backward slashs, which is why i need help.

    D:\X\FreeImgHost.us\httpdocs\path_locator.asp

    Anyway, that is what it says in the file.

    Rob
     
    Robert Allen, Sep 25, 2006 IP
  4. DrMalloc

    DrMalloc Peon

    Messages:
    130
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #4
    try using single quotes instead of double, it's possible that php is trying to parse them as escaping characters.

    another thing to try is to use slash instead of backslash, e.g e:/myfile/pictures
     
    DrMalloc, Sep 26, 2006 IP
  5. Robert Allen

    Robert Allen Peon

    Messages:
    2,685
    Likes Received:
    247
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Windows uses backslashs which is the exact problem here. I moved from linux to windows without knowing it until i have already paid for 2 months up front.

    $server_root = "D:\X\freeimghost.us\httpdocs";

    That is the current code

    Do i change it to this?

    $server_root = "D:'\'X'\'freeimghost.us'\'httpdocs";

    Rob
     
    Robert Allen, Sep 28, 2006 IP