Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 5 of 5

This is a discussion on Transferring a Site to Shared in the Shared & Semi-Dedicated forum
Hi All! I currently have a VPS at Jag (on ulysses) and am very happy with it and the Jag support folks. So much so ...

  1. #1
    JPC Senior Member AncientLady's Avatar
    Join Date
    May 2006
    Location
    Yankee relocated to Virginia
    Posts
    54

    Question Transferring a Site to Shared

    Hi All!

    I currently have a VPS at Jag (on ulysses) and am very happy with it and the Jag support folks. So much so that, when asked for advice about a new host, I directed my client to Jag for a shared account.

    They set up the account yesterday and I uploaded the code and databases.

    I had fun getting some pear stuff to work (successful in the end) but have some questions.

    I fully expect that the issues will go away once the domain has been transferred and suspect that the problems I am seeing now are related to using the temporary URL (http://elrond.nocdirect.com/~<username>).

    The first problem is that any input I do in the .htaccess file at the main /public_html level doesn't 'take'.

    The second is that the document root (in PHP $_SERVER["DOCUMENT_ROOT"]) says '/usr/local/apache/htdocs' and that appears to not be pointing at the root I want and any absolute references in the html ('/styles/xxx.css' as opposed to 'styles/xxx.css') fail (ditto for images and any other specifically named directory). The use of $_SERVER["DOCUMENT_ROOT"] in PHP for includes also comes up with the wrong path.

    I have a shared hosting account with another outfit (for backup purposes and alternate e-mail) and use $_SERVER["DOCUMENT_ROOT"] without a problem. So, I guess it'll work fine once the DNS changes have been made.

    What I'm looking for here is reassurance that my guess is right and that everything will be good after the DNS change.

    I don't want to have made things difficult for my client.

    Also, have other shared host users had success (or failure) using mod_rewrite stuff in their .htaccess? I mean using things like:
    Code:
    RewriteEngine on
    RewriteRule ^enhanced\/([^_]+)_(.+)\.php$ /enhanced_$1.php?id=$2 [L]
    RewriteRule ^single/property\/(.+)\.php$ /singleProperty.php?id=$1 [L]
    RewriteRule ^popup\/(.+)\.php$ /property_popup.php?id=$1 [L]
    As well as getting it to recognize PHP directives in the .htaccess like:
    Code:
    php_value include_path ".:/home/pear;/home/luxuryfr:/home/luxuryfr/inc"
    php_value upload_max_filesize 10M
    php_value magic_quotes_gpc Off
    I use things like that in the client's old hosting site and want to make sure we don't break things in the move. Given that the old host mostly did not update their core stuff, I suspect all will work well on Jag.

    I currently have to put a php.ini file in each directory from which a page is opened for it to recognize a usable include_path and I'd much rather not do that (putting two or three directives in a single .htaccess is so much easier).

    Thank you all for any help/support/reassurances you can give me.
    Cheers,
    Ancient Lady
    http://www.triassicassociates.com

  2. #2
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Quote Originally Posted by AncientLady View Post
    I fully expect that the issues will go away once the domain has been transferred and suspect that the problems I am seeing now are related to using the temporary URL (http://elrond.nocdirect.com/~<username>).
    I think you're right!

    I've always had better luck using: $_SERVER['PHP_SELF']

    You might give that a try.
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  3. #3
    JPC Senior Member AncientLady's Avatar
    Join Date
    May 2006
    Location
    Yankee relocated to Virginia
    Posts
    54
    Thank you for supporting my hopes.

    I've always had better luck using: $_SERVER['PHP_SELF']
    $_SERVER['PHP_SELF'] gives you path to the file just executed, excluding the document root.

    It's useful for many things, but not for setting up where to include files from. Thanks anyway for the suggestion.
    Cheers,
    Ancient Lady
    http://www.triassicassociates.com

  4. #4
    Loyal Client
    Join Date
    Nov 2007
    Location
    UK
    Posts
    281
    Good old vin saves the day again but where is your friend?

    I am sure everything will work when the domain is transferred completely, if not give use a shout and sure we can help you out if not support is only a ticket away.

  5. #5
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Yes, those sound like issues related to the fact that you are using the server name based URL and not the site's actual URL. They should go away when the name propagates. If you want to do a "live" test before pushing the button on the DNS, you can modify your computer's host file to temporarilly point the domain name at the new IP on your computer. Your computer checks the hosts file before it does a DNS lookup so you can trick it into thinking the name has already propagated durring testing.

    On Windows the hosts file is typically located at c:\windows\system32\drivers\etc\hosts. Open this file in your favorite text editor (on Vista you'll have to deal with the annoying security messages when you try to open it). It may be empty or, depending on the virus/spyware software you use it may have several entries to safely redirect you away from known malware sites. Just add an entry to the file that looks like this
    Code:
    69.73.144.206 www.sitename.com
    That line says to direct any requests for www.sitename.com to the IP 69.73.144.206 which is the IP of elrond. Save the file and then type www.sitename.com into a browser on the same computer and you should see the version of the site on elrond. When you are done testing, simply remove the entry from hosts and make the DNS switch.

    The reason for your issues is that the document root (as you discovered) is not the site root as it would be if you were using the domain name. Instead it is the default site root. Also, since your URLs are not relative to the site root anymore (there is the extra /~username in there) using /whatever in likes won't work (you'd need /~username/whtever instead) and mod_rewrite rules that try to rewrite to the site root won't work either. The easiest way to test is by modifying the hosts file.

    As for the other part of your question:
    I see nothing wrong with the mod_rewrite rules you posted (once the DNS propagates or you test with hosts). The PHP settings won't work in JPC's environment, however. To make those changes you will need to use a custom php.ini file. For info on that see:

    http://www.jaguarpc.com/support/kbas...n=list&faq=709
    http://www.jaguarpc.com/support/kbas...n=list&faq=817

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •