Results 1 to 8 of 8

Thread: Error SQL: newbie question.

  1. #1
    Join Date
    Oct 2008
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Error SQL: newbie question.

    Hi

    This is a newbie question.

    We have a website that is now showing

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in .....php on line 12, amongst others. also does not load the home page because of this.

    However our web design guy is not around..

    could someone tell me if the website error is most likely to be down to the scripting? the reason being that the website hasnt been touched so to speak. just have control over one page to upload resources (PDF files). we're confused how this could have happened. the domain host says that there is nothing wrong there end and it is a scripting issue.

    also, given that we cant get hold of our web design guy, what problems would we encounter in transferring the web domain side of things to a new company? for example, we dont have the original code or template. Must apologise, dont know too much about website. so would we need to get hold of the template or code? I understand how Dreamweaver works e.g. design and then upload. is this the same for PHP?

    thank you. i must apologise for not showing the website URL. just concerned about spamming. perhaps i am being over cautious.

    thank you in advance

  2. #2
    Join Date
    Apr 2008
    Location
    Limoges, France
    Posts
    395
    Thanks
    13
    Thanked 61 Times in 61 Posts

    Default

    Tough to give a definitive answer without seeing the php code, but it does sound like a scripting issue. As for how it happened since nothing has been changed? Who knows....

    As for changing the domain or where you host your website, you should definitely access your hosting account and download everything that is there. As long as you have the files, you'll be able to put them online where ever you want.

    If you don't know how to do this, contact the technical support of your web hosting company and they should provide instructions.

    Good luck!

    J

  3. The Following User Says Thank You to JasonDFR For This Useful Post:

    Orange (10-28-2008)

  4. #3
    Join Date
    Oct 2008
    Location
    Columbia Md
    Posts
    27
    Thanks
    1
    Thanked 8 Times in 8 Posts

    Default

    Can you post the portion of the code that is throwing the error? This would allow us to see what is being supplied to MySQL via PHP.

    Additionally, if everything worked on previous domain server, I would ensure that your connection works for the database. Check your MySQL connections point to the correct database that you are pulling from. These variables should be stated before the MySQL query is executed.

    A "or die" clause in the script would result in the error being displayed and a blank screen.

    Hope this helps.
    Ben

  5. The Following User Says Thank You to olveyphotodesign For This Useful Post:

    Orange (10-28-2008)

  6. #4
    Join Date
    Oct 2008
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    thank you for the replies. they are really helpful. I dont have the login details for the website in terms of the webspace, but soon as i get these details i will login and get the information (code) and post here. Obviously, we intend to get a professional to take over the website/hosting but it is really helpful to have some clue as to what is going on.

    again, thank you for taking the time to reply. your're all a credit to this forum.

  7. #5
    Join Date
    Oct 2008
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    actually just found the login details for the webspace, this is taken from the index page. hope someone can see where the problem lies! Apparently there are error on line 12, 146 and 150.


    removed code to ensure no attack on website!
    Last edited by Orange; 11-03-2008 at 05:39 PM.

  8. #6
    Join Date
    Oct 2008
    Location
    Columbia Md
    Posts
    27
    Thanks
    1
    Thanked 8 Times in 8 Posts

    Default

    Quote Originally Posted by Orange View Post
    /**
    * Gets core libraries and defines some variables
    */
    require_once('./libraries/common.lib.php');

    /**
    * Includes the ThemeManager if it hasn't been included yet
    */
    require_once('./libraries/relation.lib.php');
    Without really seeing it, I believe that your error is coming from one of these two files. I would look in the common.lib.php file first.

    Line 12 in this file is a commented section if I'm reading it correctly.

    Ciao,
    Ben

  9. #7
    Join Date
    Oct 2008
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by olveyphotodesign View Post
    Without really seeing it, I believe that your error is coming from one of these two files. I would look in the common.lib.php file first.

    Line 12 in this file is a commented section if I'm reading it correctly.

    Ciao,
    Ben
    edit ***oops see what you mean***

    Also, is there any way to disable these functions for now?

    thank you.
    Last edited by Orange; 11-03-2008 at 05:39 PM.

  10. #8
    Join Date
    Oct 2008
    Location
    Columbia Md
    Posts
    27
    Thanks
    1
    Thanked 8 Times in 8 Posts

    Unhappy

    Okay, You're problem is out of my league. I would not post your entire library file, most likely you would expose some security issue that would aid others in hacking your site.

    With that said, you can try using a find command in your text doc for the function that is throwing the error and then look in that area of your code for the possible problem.

    Good Luck,
    Ben

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
  •