Support » How-To and Troubleshooting » strpos() [function.strpos]: Empty delimiter. in compat.php

strpos() [function.strpos]: Empty delimiter. in compat.php

  • I have no idea what happened. I was not doing anything besides moving around my admin panel when this error suddenly appeared on my site at the top of all pages.

    strpos() [function.strpos]: Empty delimiter. in /home/spoken/public_html/wp-includes/compat.php on line 124

    I searched the forums here for both strpos() and compat but found nothing to help me out.

    My site is spoken-for.org and as of now, the error is still there. I upgraded to 2.2.1 from 2.2 after getting this error, but it’s still there.

    Line 124 of compat.php reads:
    return strpos(strtolower($haystack), strtolower($needle), $offset);
    and is under the section “added in PHP 5.”

    I have PHP version 4.4.4.

    Thanks, everyone

Viewing 4 replies - 1 through 4 (of 4 total)
  • Well… adding:

    AddHandler application/x-httpd-php5 .php

    To the top of my htaccess to make my site use PHP5 worked in getting rid of it and so far all my plugins seem to be okay…

    And…. it’s back. I should be running the newest version of WordPress yet out of the blue, here it is again. There’s an error at the top of my pages on the frontend that quickly gets hidden under the header image but this is what my admin panel says, I can’t do anything in there whatsoever:

    Warning: strpos() [function.strpos]: Empty delimiter. in /home/spoken/public_html/wp-includes/compat.php on line 55
    Warning: Cannot modify header information - headers already sent by (output started at /home/spoken/public_html/wp-includes/compat.php:55) in /home/spoken/public_html/wp-includes/pluggable.php on line 694

    Googling this and the first result is –da da da– this thread, followed by unrelated stuff.

    The PHP5 call in my htaccess was still there but commented out with #. I DO NOT remember doing that, not sure why I would have done that. My server is now apparently running 4.4.8 of PHP. Trying to remove that line or uncommenting it, even, results in the site not being to load at all. Changing it to this:

    AddType application/x-httpd-php5 .php
    AddType application/x-httpd-php .php4

    (which I found in the only other thread a search of these forums turned up) results in the site loading on the frontend but still with the error and still with the errors and unuseable backend.

    Moderator Samuel Wood (Otto)


    WordPress.org Tech Dude

    Change this line:
    return strpos(strtolower($haystack), strtolower($needle), $offset);

    To this:
    return @strpos(strtolower($haystack), strtolower($needle), $offset);

    That will suppress the warning.

    Thank you Otto42! As you can see, I only know enough PHP and WordPress to get myself into trouble. 😛
    That does suppress the warning and lets me back into my admin panel. I guess there’s no real issues here to worry about??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘strpos() [function.strpos]: Empty delimiter. in compat.php’ is closed to new replies.