Can someone check my code to find out what the PHP code error is on line 1 please, also, for some reason, after changing and editing the file, all the information is clumped together, but not when I c/p it, why is this also?

Thanks.

<?php/** Enable W3 Total Cache **/define('WP_CACHE', true); // Added by W3 Total Cache/** * The base configurations of the WordPress. * * This file has the following

configurations: MySQL settings, Table Prefix, * Secret Keys, WordPress Language, and ABSPATH. You can find more information * by visiting {@link

http://codex.wordpress.org/Editing_wp-config.php Editing * wp-config.php} Codex page. You can get the MySQL settings from your web host. * * This file is used by the wp-

config.php creation script during the * installation. You don't have to use the web site, you can just copy this file * to "wp-config.php" and fill in the values. * *

@package WordPress */// ** MySQL settings - You can get this info from your web host ** ///** The name of the database for WordPress */define('DB_NAME', 'watchstr_wp1');/**

MySQL database username */define('DB_USER', 'watchstr_wp1');/** MySQL database password */define('DB_PASSWORD', 'Ts1nySNYqtjv7');/** MySQL hostname */define('DB_HOST',

'localhost');/** Database Charset to use in creating database tables. */define('DB_CHARSET', 'utf8');/** The Database Collate type. Don't change this if in doubt. */define

('DB_COLLATE', '');/**#@+ * Authentication Unique Keys and Salts. * * Change these to different unique phrases! * You can generate these using the {@link

https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service} * You can change these at any point in time to invalidate all existing cookies. This will

force all users to have to log in again. * * @since 2.6.0 */define('AUTH_KEY', 'FXPDuxJfUoV5b69LmfPVZ0iEC10HUVtjCnqeiWYBwXIJKOHFDAtbBY944YdS9feq');define

('SECURE_AUTH_KEY', '0XhsjFNQXxAbpzW9YBIxt1PdYnI2gcQmPPwf8bL1g36MEPcFyREre1ZfU8amyaiN');define('LOGGED_IN_KEY',

'BbhJhRTWhXuZNYSgTulehmTwrtNVlgDcBL1H1sfr00BcnmCP1uIBTmbHiDAXHwrF');define('NONCE_KEY', 'MIxwvJJyIb0y4x1IsHZX9dArqG5muXtLfjEgvOokReboQqdtjCkLfZprkm2djkrF');define

('AUTH_SALT', 'kjGErjueI6MA0QylyQ7c5zT1BbGCXvJa0sMwy1FWPgQD1mV9Vu577Kq3h24S2iCA');define('SECURE_AUTH_SALT',

'iE15BBnGf7V1VDDqKrLgXdS4NBaBc2kPWXe1VX2y8CyNxb0jXBsF6Cc6SS42VQHD');define('LOGGED_IN_SALT', 'D6WB7lOCvivr1MfqBykS79V2K1J6cMlJOnHLA1soiBHRaczIA3uEBWJqmsz0Y1rP');define

('NONCE_SALT', 'uJuHqYdoK3lqdRWit5qEd8jGyr3VzJXpNIkHsG0VtjbI39a3pqpHLAhbc5qGptWE');/**#@-*//** * WordPress Database Table prefix. * * You can have multiple

installations in one database if you give each a unique * prefix. Only numbers, letters, and underscores please! */$table_prefix = 'wp_';/** * WordPress Localized Language,

defaults to English. * * Change this to localize WordPress. A corresponding MO file for the chosen * language must be installed to wp-content/languages. For example,

install * de.mo to wp-content/languages and set WPLANG to 'de' to enable German * language support. */define ('WPLANG', '');/** * For developers: WordPress debugging mode. *

* Change this to true to enable the display of notices during development. * It is strongly recommended that plugin and theme developers use WP_DEBUG * in their development

environments. */define('WP_DEBUG', false);/* That's all, stop editing! Happy blogging. *//** Absolute path to the WordPress directory. */if ( !defined('ABSPATH') )

define('ABSPATH', dirname(__FILE__) . '/');/** Sets up WordPress vars and included files. */require_once(ABSPATH . 'wp-settings.php');

<?php needs a space after it. It'll be best if you cleanup your file entirely.

Hey thanks! That worked, but now I have a new error message, perhaps you can take a look?

Fatal error: Call to undefined function get_option() in /home/watchstr/public_html/wp-admin/admin.php on line 22

The only information on this I can find so far says I need to re-upload Wordpress folders and reinstall all plugins, maybe an easier way?

Here's line 22 of admin.php and a little way below it:

if ( get_option('db_upgraded') ) {
    $wp_rewrite->flush_rules();
    update_option( 'db_upgraded',  false );

    /**
     * Runs on the next page load after successful upgrade
     *
     * @since 2.8
     */
    do_action('after_db_upgrade');
} elseif ( get_option('db_version') != $wp_db_version ) {
    if ( !is_multisite() ) {
        wp_redirect(admin_url('upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI']))));
        exit;
    } elseif ( apply_filters( 'do_mu_upgrade', true ) ) {
        /**
         * On really small MU installs run the upgrader every time,
         * else run it less often to reduce load.
         *
         * @since 2.8.4b
         */
        $c = get_blog_count();
        if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int)( $c / 50 ) ) == 1 ) ) {
            require_once( ABSPATH . WPINC . '/http.php' );
            $response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) );
            do_action( 'after_mu_upgrade', $response );
            unset($response);
        }
        unset($c);
    }
}

It is unlikely that the error is in line 22.
function get_option() is likely declared in an include() file so the code is availab le to more than one file
all include()d files are considered part of the file being parsed, parsed line 22 could be line 3 of another file(example)
the difficulty in tracing included files for a complex cms, makes reinstall a much simpler option than it appears

wrap code samples between [code=language] code sample [/code] tags makes the code easier to read. eg, [code=php] [code=html] [code=javascript] the [code]

[/code] tags do not display, but the code sample between them is highlighted for syntax

OK, but I've reinstalled Wordpress completely and now the error is happening again! Once again, it happens when I try to add a bit of code to change the Wordpress memory limit to the config file. The text gets clumped together for some reason and then the error message begins.

define(’WP_MEMORY_LIMIT’, ’64M’); was added to the bottom of the file.

Sorry, what exactly do you mean? Try a different config file, or a new Wordpress install from a different source or what?

Thanks.

Some editors add characters, or other code, to files, htese characters screw up the interpreter,
I think Pritaeas was suggesting an editor check,
at the same time a code highlighting editor, I use notepad+ and notepad2 but everyone has their favorite, makes it difficult to add your own screwups by showing any incomplete braces, unclosed tags, etc

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.