WordPress.org

Forums

Insert PHP
[resolved] Warning messages (6 posts)

  1. difimon
    Member
    Posted 2 years ago #

    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/

  2. WillBontrager
    Member
    Plugin Author

    Posted 2 years ago #

    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

  3. difimon
    Member
    Posted 2 years ago #

    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

  4. WillBontrager
    Member
    Plugin Author

    Posted 2 years ago #

    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

  5. difimon
    Member
    Posted 2 years ago #

    Hi Will,

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

    Kind regards,

    Marco

  6. WillBontrager
    Member
    Plugin Author

    Posted 1 year ago #

    This is a gratuitous post to mark the thread resolved.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Insert PHP
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic