Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter maryandpaul

    (@maryandpaul)

    I included wp-settings.php but still got the error.

    Warning: require_once(/home/content/m/a/r/maryandpaul/html/rt/wp-settings.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/m/a/r/maryandpaul/html/rt/wp-config.php on line 34

    Fatal error: require_once() [function.require]: Failed opening required ‘/home/content/m/a/r/maryandpaul/html/rt/wp-settings.php’ (include_path=’.:/usr/local/php5/lib/php’) in /home/content/m/a/r/maryandpaul/html/rt/wp-config.php on line 34

    ———————————————————–
    wp-config.php

    if ( !defined(‘ABSPATH’) )
    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);
    require_once(ABSPATH . ‘wp-settings.php’); <== line 34

    ————————————————————
    include(‘./wp-config.php’);
    global $wpdb;

    $qstr = ‘SELECT * FROM ‘.$wpdb->prefix.’posts’;
    $query = $wpdb->get_results($qstr);

    $type = gettype($qstr);
    echo ‘
    ‘ . “qstr is $type” . ‘
    ‘;
    echo ‘
    ‘ . “qstr is $qstr” . ‘
    ‘;

    Thread Starter maryandpaul

    (@maryandpaul)

    I’ve changed the code to $dbname=$wpdb; (code below) but I’m still getting the following results. Thank you so much for your continuing help.

    ——————————————————————–
    nformation_schema rec0832109095959
    querystr is string

    querystr is SELECT * FROM posts

    query is NULL

    Warning: Invalid argument supplied for foreach() in /home/content/m/a/r/maryandpaul/html/rt/filedata2.php5 on line 37

    <?php
    
    //Connect To Database
    
    $hostname="rec0832109095959.db.3175150.hostedresource.com";
    $username="rec0832109095959";
    $password="rbnl7Gx4";
    $dbname=$wpdb;
    $usertable="wp_posts";
    $yourfield = "post_author";
    $db = "rec0832109095959";
    
    $link = mysql_connect($hostname,$username, $password) or die ("<html><script language='JavaScript'>
    alert('Unable to connect to database! Please try again later.'),history.go(-1)</script></html>");
    mysql_select_db($dbname);
    
    global $wpdb;
    global $type;
    
    include ('wp-db.php'); 
    
    $db_list = mysql_list_dbs($link);
    
     while ($row = mysql_fetch_object($db_list)) {
         echo $row->Database . "\n";
    }
    
    $querystr = 'SELECT * FROM '.$wpdb->prefix.'posts';
    $query = $wpdb->get_results($querystr);
    
    $type = gettype($querystr);
    echo '' . "querystr is $type" . '';
    echo '' . "querystr is $querystr" . ''; 
    
    $type = gettype($query);
    echo '' . "query is $type" . '';
    
    foreach ($query as $value) {   echo $value;}            
    
    ?>
    Thread Starter maryandpaul

    (@maryandpaul)

    <?php

    //Connect To Database

    $hostname=”rec0832109095959.db.3175150.hostedresource.com”;
    $username=”rec0832109095959″;
    $password=”********”;
    $dbname=”$wpdb”;
    $usertable=”wp_posts”;
    $yourfield = “post_author”;
    $db = “rec0832109095959”;

    $link = mysql_connect($hostname,$username, $password) or die (“<html><script language=’JavaScript’>alert(‘Unable to connect to database! Please try again later.’),history.go(-1)</script></html>”);
    mysql_select_db($dbname);

    global $wpdb;
    global $type;

    include (‘wp-db.php’);

    $db_list = mysql_list_dbs($link);

    while ($row = mysql_fetch_object($db_list)) {
    echo $row->Database . “\n”;
    }

    $querystr = ‘SELECT * FROM ‘.$wpdb->prefix.’posts’;
    $query = $wpdb->get_results($querystr);

    $type = gettype($querystr);
    echo ‘
    ‘ . “querystr is $type” . ‘
    ‘;
    echo ‘
    ‘ . “querystr is $querystr” . ‘
    ‘;

    $type = gettype($query);
    echo ‘
    ‘ . “query is $type” . ‘
    ‘;

    foreach ($query as $value) { echo $value;}

    ?>

    Thread Starter maryandpaul

    (@maryandpaul)

    Thank you for your reply. I believe that my problem is that I am trying to display wordpress table data outside of the wordpress application. I successfully display the database name in the code, so I know that I am getting to the wordpress database (mysql). In the code I have an include for wp-db.php and a global $wpdb, Something is missing and I don’t know what that is. My SELECT and subsequent QUERY results in a NULL return value.

    Thread Starter maryandpaul

    (@maryandpaul)

    Thank you for your reply. I contacted GoDaddy and they said that there are no permissions on the database. The database table has data.

    Still in a quandry.

    Paul B.

    Forum: Fixing WordPress
    In reply to: WordPress Includes
    Thread Starter maryandpaul

    (@maryandpaul)

    HTML CODE IN PAGE –
    <html>
    <body>
    <form action=”processorder2.php” method=”post”>
    etc
    etc

    THE FILE PROCESSORDER2.PHP PLACED IN THE THEME DIRECTORY OF THE WP-CONTENT FOLDER.

    ERROR MESSAGE RECEIVED –

    Page Not Found

    The page you tried to access does not exist on this server. This page may not exist due to the following reasons:

    You are the owner of this web site and you have not uploaded (or incorrectly uploaded) your web site. For information on uploading your web site using FTP client software or web design software, click here for FTP Upload Information.

    The URL that you have entered in your browser is incorrect. Please re-enter the URL and try again.

    The Link that you clicked on incorrectly points to this page. Please contact the owner of this web site to inform them of this situation.

    Thread Starter maryandpaul

    (@maryandpaul)

    When I access the web page with the HTML code it references PHP code that I have written. I will place the PHP code in my WordPress application on the server, but I need to know where to place it so that it will be in the path of the HTML code. I don’t want to place it inline with the HTML.

    Thread Starter maryandpaul

    (@maryandpaul)

    GoDaddy says that they are able to access my application thru their software and that it must be a coding problem. I haven’t changed my code. I only changed the DB password. It was then that the problem occured. HELP!!

    Thread Starter maryandpaul

    (@maryandpaul)

    I canged my DB password and verified DB_NAME and DB_HOST. The problem still exists. I’ve contacted GoDaddy tech support and am waiting for a reply.

    Thread Starter maryandpaul

    (@maryandpaul)

    I’ve checked my password in my wp-config.php and it does match the DB password. I’m able to FTP with that password but still get “Error establishing a database connection” when I try to enter reckonthat.org/wp-admin. I even reentered the password in wp-config.php but the problem persists.

    After I press a post category, the posts for all that category, are displayed but the “Leave a Reply” section does not display until I press on the post “title” link. Is it possible to have the “Leave a Reply” comments section display when the post is originally displayed?

    Paul
    [email protected]

Viewing 11 replies - 1 through 11 (of 11 total)