Closed Thread
Results 1 to 6 of 6

Thread: works on localhost, but errors on x10hosting

  1. #1
    manoogim is offline x10Hosting Member manoogim is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    11

    works on localhost, but errors on x10hosting

    hello everyone. i am trying to post a demo page for my pet app.
    http://mtmphp.x10hosting.com/ieademo/htdocs/registration.html

    it is using php, ajax and javascript. on my home computer i debugged and deployed using zend environment. in order to show it to others,
    i opened a free acct on x10 hosting and ftp-ed my files.
    however immediately i am getting a javascript error, on page load.
    to troubleshoot this error, i would like to see the server logs for my website. is this possible with free hosting ?
    what is the best way of troubleshooting config issues? i am assuming it is a config issue since it works on my pc using localhost.
    here is my url

  2. #2
    jtwhite's Avatar
    jtwhite is offline Community Advocate jtwhite is on a distinguished road
    Join Date
    May 2009
    Location
    TN, USA
    Posts
    1,381

    Re: works on localhost, but errors on x10hosting

    You can see the error logs in cPanel.

    It's located under Logs, named Error log.

    Last edited by jtwhite; 09-13-2009 at 11:59 AM.
    If I have helped you, please add to my reputation () on the bottom left corner of this post.
    jtwhite.me - Visit my site :D

  3. #3
    galaxyAbstractor's Avatar
    galaxyAbstractor is offline Community Advocate galaxyAbstractor is on a distinguished road
    Join Date
    Oct 2007
    Location
    Land of Null and Insanity
    Posts
    5,495

    Re: works on localhost, but errors on x10hosting

    you need to edit the addresses of the files in the ieashow.js, as they aren't to be found on your account (the process.php file is missing)

  4. #4
    manoogim is offline x10Hosting Member manoogim is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    11

    Re: works on localhost, but errors on x10hosting

    yes you are correct.
    on my localhost i was using a different root in javascript , other than ieademo :
    sendRequest('/ieademo/htdocs/process.php? ') etc ..
    is there a property in javascript that can detect under which context root the app is deployed ?
    so in this case it would return 'ieademo' and i could build the path at run time.
    var root = <get via js at run time>
    sendRequest(root & '/htdocs/process.php? ')

    Quote Originally Posted by vigge_sWe View Post
    you need to edit the addresses of the files in the ieashow.js, as they aren't to be found on your account (the process.php file is missing)

  5. #5
    galaxyAbstractor's Avatar
    galaxyAbstractor is offline Community Advocate galaxyAbstractor is on a distinguished road
    Join Date
    Oct 2007
    Location
    Land of Null and Insanity
    Posts
    5,495

    Re: works on localhost, but errors on x10hosting

    Quote Originally Posted by manoogim View Post
    yes you are correct.
    on my localhost i was using a different root in javascript , other than ieademo :
    sendRequest('/ieademo/htdocs/process.php? ') etc ..
    is there a property in javascript that can detect under which context root the app is deployed ?
    so in this case it would return 'ieademo' and i could build the path at run time.
    var root = <get via js at run time>
    sendRequest(root & '/htdocs/process.php? ')
    Put this in a php file and run it:

    PHP Code:
    <?php
    echo $_SERVER['document_root'];
    ?>

  6. #6
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,633

    Re: works on localhost, but errors on x10hosting

    My first question is why you set up your directory structure so that the url is

    http://mtmphp.x10hosting.com/ieademo...istration.html

    instead of

    http://mtmphp.x10hosting.com/registration.html


    But to your question, to find the path of the page in javascript:

    var loc = window.location.path ;

    will give loc = "/ieademo/htdocs/registration.html" so that

    var indx = loc.indexOf( '/htdocs/' ) ;
    var root = loc.substring( 0 , indx );

    should give you root = '/ieademo'
    Nothing is always absolutely so.

Closed Thread

Similar Threads

  1. x10hosting is the best that i can find!
    By nimmh in forum Feedback and Suggestions
    Replies: 38
    Last Post: 07-06-2010, 07:44 PM
  2. Replies: 10
    Last Post: 09-19-2009, 01:05 PM
  3. x10hosting toolbar
    By Christopher in forum Off Topic
    Replies: 8
    Last Post: 09-06-2006, 08:54 PM
  4. Account Suspended
    By tehpwner in forum Free Hosting
    Replies: 7
    Last Post: 10-17-2005, 07:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers