WordPress.org

Ready to get started?Download WordPress

Forums

MYSQL Database Error (13 posts)

  1. sleeper
    Member
    Posted 8 years ago #

    Well. I am trying to upload wordpress (and did). But when I go to "wp-admin/install.php" it says this:

    Parse error: parse error, unexpected $ in /home/theart/public_html/blog/wp-includes/wp-db.php on line 306

    So I think it´s a mysql database error..?! I have created a new database but nothing else. No tables etc. I remember with my old domain I had to create 1 table for it all to work so I tried that now.. but didn´t work.

  2. schestowitz
    Member
    Posted 8 years ago #

    Is the database on localhost? Have you pointed WP to the correct database? It is unlikely that /home/theart/public_html/blog/wp-includes/wp-db.php is structurally corrupt and the error suggest. I believe that the error spewed out is deceiving and something more fundamental is involved. Have you prepended the database name and username with your username on the system?

  3. Mark (podz)
    Support Maven
    Posted 8 years ago #

    Delete all the files in /wp-includes, then reupload.
    Do not overwrite - this is usually an ftp error and easily fixed :)

  4. sleeper
    Member
    Posted 8 years ago #

    Yes the database is on localhost. And the database I created was theart_wordpress and I also pointed WP to the correct db so that shouldn´t be the problem. Also the username&password are correct.

    Is there something I should do at "phpMyAdmin"? (* You can use phpMyAdmin to administrate your MySQL databases in a web based environment.*). But shouldn´t WP create the tables automatically so I wouldn´t have to do that.

    Tried that "delete /wp-includes" thing. Didn´t work.

    In my "create MYSQL database" place it gives "connection strings":
    $dbh=mysql_connect ("localhost", "theart_", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
    mysql_select_db ("theart_wordpress");

    So basically at wp-config.php I wrote

    define('DB_NAME', 'theart_wordpress');
    define('DB_USER', 'theart_');
    define('DB_PASSWORD', 'thepasswordihave');
    define('DB_HOST', 'localhost');

  5. schestowitz
    Member
    Posted 8 years ago #

    Using MyAdmin will not get you anywhere and you can only intervene (break) the integrity of a WordPress-type schema.

    Try installation from scratch for 'proof of concept'. Fresh filebase, fresh database, re-use nothing. Server (e.g. software versions, conflicts) will be ruled out as a a culprit this way. WP should be fine, which would suggest bad settings.

  6. Mark (podz)
    Support Maven
    Posted 8 years ago #

    It's not a database thing - it's happening because a file has been corrupted during the upload.
    Did you delete and reupload /wp-admin ?

  7. schestowitz
    Member
    Posted 8 years ago #

    You wrote: define('DB_USER', 'theart_');

    What's your username again? It can't be void, can it? Unless you hide it of course.

  8. sleeper
    Member
    Posted 8 years ago #

    my username for the database is theart_ and I gave that username ALL ACCESS.

    Yes also deleted/reuploaded wp-admin. Didn´t work.

    I guess I just have to delete everything and start again. Hopefully it´ll work this time... but I still have a feeling it has got something to do with database not connecting.. like I should create a table first or something (that´s what I had to do @ my last domain..and then wp worked). But that didn´t work this time.

  9. skippy
    Member
    Posted 8 years ago #

    The error you received:
    Parse error: parse error, unexpected $ in /home/theart/public_html/blog/wp-includes/wp-db.php on line 306
    is a PHP parse error, which has nothing to do with the database. This is PHP saying "Hey, I found a dollar sign and I wasn't expecting one".

    That usually means you need to re-upload the PHP files to your server, taking care to use ASCII mode for any FTP transfers.

  10. sleeper
    Member
    Posted 8 years ago #

    Ah okay. Thank you :)! I´ll try again...and again ^^!

  11. sleeper
    Member
    Posted 8 years ago #

    Now I did try to upload everything again etc. It still says "parse error". Same thing with phpBB-forum that I tried to upload.

    I haven´t altered any files. (except the password/username path stuff that I was supposed to alter). So why does it give me "parse error". The .php files should be correct since.. they work on others.

    Could it be my FTP uploading program? Or the fact that my domain became active just today?

  12. skippy
    Member
    Posted 8 years ago #

    The fact that your domain became active today has nothing to do with this.

    What FTP program are you using? It might be worthwhile to try an alternate program. You are taking care to upload in ASCII mode, right?

  13. sleeper
    Member
    Posted 8 years ago #

    I am using FreeFTP which I´ve used before in my old domain and it worked fine.

    With FreeFTP you can upload files in ASCII, Binary or "auto" mode. I usually use the auto mode because it does really work and seperate the ASCII and Binary files and upload them in correct way. ..or did work. In my old domain. Maybe not in the current one.

Topic Closed

This topic has been closed to new replies.

About this Topic