WordPress.org

Support

Support » Plugins and Hacks » Insert PHP » [Resolved] Warning messages

[Resolved] Warning messages

  • Dear all,

    I’ve included a php class in the function.php file and I am including it in a wp page and using it. Everything I want appears well but there are also printed these 3 warning messages on the top of the content I need.
    I am a little bit confused, can anyone help me?

    Warning: include(simplelinkedin.class.php): failed to open stream: No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/plugins/insert-php/insert_php.php(48) : eval()’d code on line 10

    Warning: include(): Failed opening ‘simplelinkedin.class.php’ for inclusion (include_path=’.:/Applications/XAMPP/xamppfiles/lib/php’) in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/plugins/insert-php/insert_php.php(48) : eval()’d code on line 10

    Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/plugins/jetpack/functions.opengraph.php:131) in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/themes/twentytwelve/functions.php on line 570

    Thank you,

    Marco

    https://wordpress.org/plugins/insert-php/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WillBontrager

    @willbontrager

    Marco, two things:

    1. Looks like you might have a line something like this in the PHP code to be processed by Insert PHP:

    include("simplelinkedin.class.php");

    If, as you say, everything you want appears well, you might not need that class. But if you do, try providing a location with the class file name in the include() function.

    2. It appears functions.opengraph.php tries to cache output prior to sending header information to the browser. It won’t work because some page content has already been sent by the time the PHP code is processed by Insert PHP.

    To get rid of this warning, functions.opengraph.php probably needs to be modified.

    Will

    Really really really thank you so much!
    I removed the include line and it works good. Now I just have to get rid of the last warning that has to do with ‘functions.opengraph.php’. I tried to deactivate the jetpack plugin which allows me to publicize posts written through wordpress to social networks. However there is still this warning:

    Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-includes/l10n.php:189) in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/themes/twentytwelve/functions.php on line 570

    Can you help me a little more?

    Thank you so much.
    Marco

    Plugin Author WillBontrager

    @willbontrager

    Hi Marco,

    This is more a PHP coding question than an Insert PHP question.

    See http://www.php.net/manual/en/function.error-reporting.php for code to suppress certain errors, warnings, and notices.

    If functions.php isn’t influenced by other error level handling code, warning suppression code might be put into the code processed by Insert PHP. At least it could be tried.

    Important: Always make a backup copy of files before making changes.

    If needed, perhaps someone at a PHP coding forum can help with determining what error handling code to use.

    Sincerely,

    Will

    Hi Will,

    I thank you again, you have been really really helpful!

    Kind regards,

    Marco

    Plugin Author WillBontrager

    @willbontrager

    This is a gratuitous post to mark the thread resolved.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Warning messages’ is closed to new replies.
Skip to toolbar