Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2005
    Posts
    324

    Basic programming question

    I hired a programmer to do a PHP webiste with shopping cart.

    The site was working fine till my host disapeared. I had a backup of my files and database. I found a new host, transfered everything to it. Now, my website with cart and phpbb forum dont work.

    With my cart I get :
    0 DB_ERROR_NOT_CONNECTED
    With my forum I get :
    Warning: mysql_connect(): Access denied for user: [email protected]' (Using password: YES) in /home/camay12/public_html/phpbb/db/mysql4.php on line 48

    Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/camay12/public_html/phpbb/db/mysql4.php on line 330

    Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/camay12/public_html/phpbb/db/mysql4.php on line 331
    phpBB : Critical Error

    Could not connect to the database
    So I am assuming there is a problem with my database not being connected to the files..... My web programmer did reconnect the database, but there is another problem....

    Files are now on the new server but in a different path, for example :
    /home/user1/public_html/cart
    Rather then being on the previous path of the old server being for example :
    /files/user2/public_html/cart
    My programmer says it will be a very long recovery process since he has to recode all the cart and forum for them to have the correct path. Now my question is , is there a way to recode but with a "relative" path that would be compatible with all host ?

    Thanks
    Patrick

  2. #2
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,342

    Arrow

    Quote Originally Posted by camay123
    I hired a programmer to do a PHP webiste with shopping cart.

    The site was working fine till my host disapeared. I had a backup of my files and database. I found a new host, transfered everything to it. Now, my website with cart and phpbb forum dont work.

    With my cart I get :

    With my forum I get :

    So I am assuming there is a problem with my database not being connected to the files..... My web programmer did reconnect the database, but there is another problem....

    Files are now on the new server but in a different path, for example :

    Rather then being on the previous path of the old server being for example :

    My programmer says it will be a very long recovery process since he has to recode all the cart and forum for them to have the correct path. Now my question is , is there a way to recode but with a "relative" path that would be compatible with all host ?

    Thanks
    Patrick
    If the person doing it was smart enough, they would've created a shared varaible "$path" which contains the path, and then you need to change it only once..

    Now if the database was not dynamic, thats a different thing. Yes they can make it relative by just typing the file.

    So for example, a file located at public_html folder can just be called by name "index.html", an image in the folder images "which is public_html" would be called by "images/image.gif"

    Peace,
    Testing 1.. Testing 1..2.. Testing 1..2..3...

  3. #3
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,099
    My programmer says it will be a very long recovery process since he has to recode all the cart and forum for them to have the correct path. Now my question is , is there a way to recode but with a "relative" path that would be compatible with all host ?
    Yes, there is -- and if your programmer is smart, this is how he will do it this time around. Other options include doing a site-wide regular expression search & replace.
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

Posting Permissions

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