Forum Replies Created

Viewing 15 replies - 1 through 15 (of 36 total)
  • Thread Starter Anat

    (@anat)

    Hi, please resolve this.

    I found that PHP.ini did not exit, and creating this file resolved the issue.

    2 Sites, 1 DB, Possible?
    POSSIBLE
    Thanks bretrv, It was a great idea, and it really works.
    see:
    https://www.anat [dot] uni [dot] cc
    https://www.anat [dot] moved [dot] in

    {had to post the website address as such to avoid those spam bots}
    these are two sites, running from the same database, they are absolutely identical, however they are different. Pinging both produces different IP addresses. Both reference the same tables from the same database, but however only the options table has been copied into two tables such that both sites can function independently, but rest of the tables are same so that the content is identical. The method is what has been descibed above. If there is any confusion then feel free to contact me. The description given in the above posts is sufficient and self explanatory.

    I modified my profile too, after reading this…… now lets see what happens

    hey I am in too,
    I tend to agree with angsuman ?? , had been feeling this since sometime, never knew other people felt the same!

    Forum: Themes and Templates
    In reply to: No comments

    simply place the comments.php from the default theme into ur own theme directory….
    also check for <?php comments_template();?> as already mentioned above, that should get ur comments going.

    Thread Starter Anat

    (@anat)

    thanks Kafkaesqui, it works now!

    Thread Starter Anat

    (@anat)

    thanks skippy…. i shall now head straight for the wiki and put this there so that nobody else faces this problem

    Thread Starter Anat

    (@anat)

    ohhh
    I put the next and previous posts tag in the loop and now everything is fine….. but this was not reqd prior to 1.5…

    Thread Starter Anat

    (@anat)

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ORDER BY post_date ASC LIMIT 1’ at line 1]
    SELECT ID,post_title FROM wp_posts WHERE post_date > ” AND post_date < ‘2005-06-25 00:00:09’ AND post_status = ‘publish’ AND ID != ORDER BY post_date ASC LIMIT 1

    i cant get next and previous posts links to work in my own theme, works perfect in default theme

    Thread Starter Anat

    (@anat)

    hey thanks skippy, i am facing a problem…
    i have made my own theme and i am using
    <?php previous_post_link('&laquo; %link') ?> but I am getting a MySQL error. however this very same tag is working fine in the default theme

    and when i do this then i get a parse error
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php previous_post_link('&laquo; %link') ?>

    okie i shall give u all a simple solution

    login to wordpress as admin
    check that a new user with the name”.” {period or dot whatever u’d like to call it} has been created in the users section. remove this new user and then everything shall work fine

    all who are facing this problem, please do come back to this thread and post if this solution helped you or not, then we can change the status of this problem to “resolved”.

    okie, i got ur point, brentrv.
    its been an interesting discussion we had here. i’ll do this and shall get back to this thread, please do bookmark this place and watch it for a couple of days
    thanks……
    * but what about cross references? if other tables refer to the options table then? the name of the options table is different for both the cases, but the rest of the tables are common, so the resto of the tables shall refer to the options table by only one name even though we might add another options table under a different name
    EDIT: i guess there wont be any cross references for the options table, otherwise you would have faced problems running those 500 blogs. thanks for the insight, now I shall try it out, I shall most probably get a new domain in a day or two, and then I shall run a common blog on both my domains.

    that again comes back to the same point, actually what we need to do here is we need to reference tables like:

    $wpdb->options = LOCALHOST.’options’;
    $wpdb->posts = REMOTEHOST.’posts’;
    $wpdb->users = REMOTEHOST.’users’;
    $wpdb->categories = REMOTEHOST.’categories’;
    $wpdb->post2cat = REMOTEHOST.’post2cat’;
    $wpdb->comments = REMOTEHOST.’comments’;
    $wpdb->links = REMOTEHOST.’links’;
    $wpdb->linkcategories = REMOTEHOST.’linkcategories’;
    $wpdb->postmeta = REMOTEHOST.’postmeta’;

    Actually what we need to do {the basic problem}, is to retrieve the options from a localhost sql server while we retrieve the rest of the tables from a database located at a remote host sql server
    that way we can have the same blog at two different URL’s, {the options table stores the URL of the blog, so only the options table needs to be different}

    the method u described shall enable multiple blogs within the same database on the same MySQL server, but the problem here is that
    1) There are two separate websites running on two different servers
    2) both websites run a separate MySQL server with different address
    3) we need the same blog on both websites

    so we designed
    website1: picks up the database from the MySQL server of website1

    website2: picks up the database EXCEPT the OPTIONS table from sql server of website1, and also picks up the options table from the sql server of website2

    because the options table stores the blog URL, so it needs to be different for both sites.

    MY GOD, THIS IS GETTING VERY CONFUZING!!!!!

    now it gets interesting
    look at the file /wp-includes/wp-db.php
    it defines the wpdb class as

    class wpdb {

    var $show_errors = true;
    var $num_queries = 0;
    var $last_query;
    var $col_info;
    var $queries;

    // Our tables
    var $posts;
    var $users;
    var $categories;
    var $post2cat;
    var $comments;
    var $links;
    var $linkcategories;
    var $options;
    var $optiontypes;
    var $optionvalues;
    var $optiongroups;
    var $optiongroup_options;
    var $postmeta;

    // ==================================================================
    // DB Constructor – connects to the server and selects a database

    function wpdb($dbuser, $dbpassword, $dbname, $dbhost) {
    $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword);
    ..
    ..
    ..
    ..

    and in the last line we have the entire object being equated with the connection

    $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);

    now what we need to do is that only for the member $wpdb.$options needs to be equated with a new connection to the localhost server while we globally define the $host variable to be on a remote server from which the database has to be picked up

    either we create a new class “$test” with only one member $options and then we connect the object of this class to the local server while we let the database connectionfor $wpdb object be with the remote server. and then we equate the $ options member eg. $wpdb.$options = = $test.$options
    would that work? can class members be directly equated in php? can somebody with a thorough knowledge please help?

    macmanx the codex reference addresses the issue of having many blogs on the same installation, on the same database, but we want to create the same blog on many sites..
    We want two different installations of wordpress running on two different servers should share the same database. The weblog running on two different websites should be same, reading data from a common database- so basically we need that all tables are shared except the options table
    the options table should not be shared as this table contains the address of the blog, so this table must be looked up locally, as the address of both the blogs shall be different

Viewing 15 replies - 1 through 15 (of 36 total)