• Thanks in advance for your help.
    I am new to wordpress When trying to post a new blogpost I got this message: Only variables can be passed by reference in c:\wamp\www\wordpress\wp-admin\includes\post.php on line 379. Is there some editing to do in my post.php file?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Have you tried:

    – deactivating all plugins to see if this resolves the problem? If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the default theme to rule out any theme-specific problems?

    Thread Starter reyach

    (@reyach)

    Hi thanks for your help.. Deactivated plugins, switchback to original default them, yet same Fatal error: Only variables can be passed by reference in c:\wamp\www\wordpress\wp-admin\includes\post.php on line 379

    Do you think a PHP config file needs tweaking?
    Thanks again,

    No – I think that’s unlikely. Try:

    resetting the plugins folder by FTP or phpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    – re-uploading the wp-admin and wp-includes folders from a fresh download of WordPress

    Thread Starter reyach

    (@reyach)

    Hi – Active_plugins is set to the value suggested. Renamed plugins folder and created an empty plugins folder – still error message.
    I have not tried to freshly install wp-content folders as I am working on a local server and its easy to see the files are identical.

    Just to mention the error message appears in a new window when I click on ‘add post’ What folder/file(s) is ‘add post’ calling to?
    Thanks again for your help.

    Thread Starter reyach

    (@reyach)

    Hi – Active_plugins is set to the value suggested. Renamed plugins folder and created an empty plugins folder. I have freshly install wp-includes folders – I am working on a local server so no FTP.

    Error message still there. Looking at the post.php need a script editor to find out what’s on line 379?

    Any other suggestions. Thanks again for your help.

    Thread Starter reyach

    (@reyach)

    Sorry for the treble posting !!

    I have found with post.php this at line 379

    $post = get_post( wp_insert_post( array( ‘post_title’ => __( ‘Auto Draft’ ), ‘post_type’ => $post_type, ‘post_status’ => ‘auto-draft’ ) ) );

    Is there anything odd about this call?

    As wordpress3 is fairly new, perhaps we can compare it again an earlier post.php file. I don’t know clutching at straws here! πŸ™‚ Thank you!

    Maybe try a Google search? I seem to remember a similar issue, which was resolved by finding and deleting all whitespaces after the closing ?> php tag, in all your WP files (including plugins). There was a plugin that actually performed this chore, and it found numerous instances in the official WP php code where spaces existed after the closing tag. Maybe it’s that?

    Thread Starter reyach

    (@reyach)

    thanks Blago πŸ™‚ any links to where i might find this plugin??

    Seems like this is a PHP issue: I’m using PHP 5.0.5 and had this error also.

    I changed the code at line 379 to the following and it worked:

    $post = get_post(( wp_insert_post( array( 'post_title' => __( 'Auto Draft' ), 'post_type' => $post_type, 'post_status' => 'auto-draft' ) ) ));

    You’ll notice the only difference is a set of double parenthesis inside the get_post method call.

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

The topic ‘installation on WAMP’ is closed to new replies.