• Resolved kaydub15

    (@kaydub15)


    Hi,

    I have dreamhost and recently changed the PHP Mode from V. 4 to V 5.3 (I’m not sure why it was set to version 4 since apparently it has not been supported since 2008). Anyways nothing seem to be seriously broken, but I now read the following error on the top of my website (both on the front-end and within the WordPress dashboard):

    Warning: strpos() expects parameter 1 to be string, array given in /home/kdub/outdoorvancouver.ca/wp-includes/functions.php on line 3033

    Here is the code from functions.php which is the default wordpress code (Line 3033 is the one that reads “if ( function_exists(‘apache_get_modules’) ) {”

    —-

    global $is_apache;

    if ( !$is_apache )
    return false;

    if ( function_exists(‘apache_get_modules’) ) {
    $mods = apache_get_modules();
    if ( in_array($mod, $mods) )
    return true;
    } elseif ( function_exists(‘phpinfo’) ) {
    ob_start();
    phpinfo(8);
    $phpinfo = ob_get_clean();
    if ( false !== strpos($phpinfo, $mod) )
    return true;
    }
    return $default;

    —–

    Thanks for any help!

    My website is outdoorvancouver.ca and I have limited coding knowledge! Thanks!!

    Karl

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter kaydub15

    (@kaydub15)

    Update – It actually appears to have broken something, as now when I go to preview a draft post all I see is the following:

    Warning: strpos() expects parameter 1 to be string, array given in /home/kdub/outdoorvancouver.ca/wp-includes/functions.php on line 3033

    Warning: Cannot modify header information – headers already sent by (output started at /home/kdub/outdoorvancouver.ca/wp-includes/functions.php:3033) in /home/kdub/outdoorvancouver.ca/wp-includes/pluggable.php on line 876

    [No bumping, thank you.]

    Thread Starter kaydub15

    (@kaydub15)

    Apologies for the previous bump, will not do that anymore

    Update #2 – I’ve found and followed the instructions for ‘cannot modify header’ issue (http://codex.wordpress.org/FAQ_Troubleshooting) and checked for any whitespacing at the beginning and the end of both the functions.php and the pluggable.php file.

    There were no spaces at the start/end of either file.

    Thread Starter kaydub15

    (@kaydub15)

    I read through countless forum discussions on this topic, all explaining to remove whitespaces, which there were non on any php files.

    I also disabled all plugins by renaming the plugin folder to confirm the issue was not from a plugin and it wasn’t.

    Finally, I went back into the dreamhost panel and changed PHP mode from 5.3 (recommended) to 5.2 (old, not recommended) and the site is is functioning again.

    I’m not sure why my wordpress install does not like 5.3, but I’ll leave it at 5.2 for now!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Warning: strpos() expects parameter 1 to be string, array given in functions.php’ is closed to new replies.