SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Jan 2002
    Location
    Lancashire England
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    server connection scripting

    Hi

    I have used Phakt to construct a site which works well on my home machine but when I upload it to the server I get the following error message on any page that I have constructed with Phakt, pages using copied in scripts work ok.

    As a relative newcomer to this, have I made some simple error? is there a set proceedure I should follow to upload pages using Ultradev?

    Please help

    Warning: Failed opening '/adodb/adodb-mysql.inc.php' for inclusion (include_path='') in /adodb/adodb.inc.php on line 2039

    Fatal error: Cannot instantiate non-existent class: adodb_mysql in /adodb/adodb.inc.php on line 2071

    I have found that the problem appears to be that the ISP does not allow direct access to the mysql database on their server, only via php etc and as such wil not allow the connection scripts written by Phakt to work, I am I correct in this assumption??

    If I am, is there a simple way of altering the pages written by Phakt to work round this problem??

    Please help if possible or it would appear that I have done 3 months work for nothing

    I have attached an example of the connection scripting below in the hope someone can spot an easy fix

    <?php


    // Copyright (c) Interakt Online 2001
    // http://www.interakt.ro/

    require("./adodb/adodb.inc.php");
    require("./Connections/conntrials.php");
    ?><?php
    $rsspon=$conntrials->Execute("SELECT * FROM sponsors") or DIE($conntrials->ErrorMsg());
    $rsspon_numRows=0;
    $rsspon__totalRows=$rsspon->RecordCount();
    ?>

    The connection are all correct for the server because some pages work, just these Phakt ones do not

    conntrials is the connection that was defined by Phakt

    Thanks in advance

    Graham

  2. #2
    Action! filmfoto's Avatar
    Join Date
    Dec 2001
    Location
    Sweden
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you uploaded the required file adodb.inc.php into the /adodb directory?

    require("./adodb/adodb.inc.php");
    Cheers

  3. #3
    SitePoint Member
    Join Date
    Jan 2002
    Location
    Lancashire England
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for that reply

    Yes the file is uploaded ok.

    I am sure it is something to do with the isp not allowing direct server access.

    I know the pages work at home, I just need to reconfigure the 'conntrials' script so that it works as is on home machine but also is in a form suitable for the server on line, so far I have failed to achieve this

    Thanks

    Graham

  4. #4
    Action! filmfoto's Avatar
    Join Date
    Dec 2001
    Location
    Sweden
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm sorry if I didn't make myself clear, but did you upload all files that adodb's class needs to function properly?
    It seems your script has problems opening the file /adodb/adodb-mysql.inc.php.


    Cheers.

  5. #5
    SitePoint Member
    Join Date
    Jan 2002
    Location
    Lancashire England
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes indeed all the requisite files are uploaded.

  6. #6
    Action! filmfoto's Avatar
    Join Date
    Dec 2001
    Location
    Sweden
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try removing ./ from the path to the required files, I've had problems with that before.

    change:
    PHP Code:
    require("./adodb/adodb.inc.php"); 
    to:
    PHP Code:
    require("adodb/adodb.inc.php"); 
    This would be the case if adodb directory is under the calling script directory. If this doesn't solve the problem try assigning the absolute path the require statement,
    (/path/to/my/phpscripts/adodb/adodb.inc.php).


    Hoping this will work for you.

  7. #7
    SitePoint Member
    Join Date
    Jan 2002
    Location
    Lancashire England
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your assistance but unfortunately what you suggested did not work.

    I give here the orginal error we are getting.

    Warning: Failed opening '/adodb/adodb-mysql.inc.php' for inclusion
    (include_path='') in /adodb/adodb.inc.php on line 2049

    Fatal error: Cannot instantiate non-existent class: adodb_mysql in
    /adodb/adodb.inc.php on line 2081

    I have also re-tried scripts which does not rely on the connection made by Ultradev. These also now do not work, although a connect look like it is made when the script calls to alter/use the database it is unable to do so.

    below is the function part of the script:

    <?php

    function add_file($contributor_id, $keywords, $caption, $userfile_location, $userfile_name, $date)
    {

    $db_name = "dbxxxx";
    $table_name = "images";

    $link = mysql_connect("localhost", "xxxxxx", "xxxxxx") or die("Could not connect to server!");
    $db = mysql_select_db($db_name, $link) or die("Could not select database!");

    $query = "INSERT INTO $table_name (contributor_id, keywords, caption, file_location, file, date)
    VALUES
    ('$contributor_id', '$keywords', '$caption', '$userfile_location', '$userfile_name', '$date')";

    mysql_query($query) or die("Could not complete update of database");
    }

    ?>

    when run from within its page it returns the last error message.

    Are the two problems the same or not.Unfortunately what you suggested did not work.


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
  •