Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
758 views
in Q2A Core by

Hello guys, I'm getting anoying plugin errors all over the place, how can I fix them?

Notice: Undefined index: admin$ in /home/movielan/public_html/how2games/qa-include/qa-app-format.php(1264) : eval()'d code on line 72

Notice: Undefined index: email in/home/movielan/public_html/how2games/qa-plugin/NoahY-q2a-share-7e40224/qa-share-widget.php on line 4
Notice: Undefined index: admin$ in /home/movielan/public_html/how2games/qa-include/qa-app-format.php(1264) : eval()'d code on line 72

 

1 Answer

+1 vote
by
selected by
 
Best answer
  1. they're not errors, they are notices
  2. showing notices is a security risk on your site, not just an annoyance
  3. you should turn off error display in your php.ini file for production sites
  4. I'll try to add suppression for these notices.
by
How can I surpress the notices?
by
Noah, although they are just notices, shouldn't you fix them? At the very least you can use @$var['admin'] to suppress the notices.
by
Thanks, yeah, I should fix them, but then I should do many things :)

I can't find either of these in my plugins...
by
Noah is there a way to edit that php.ini with a shared hosting? I can't access that file directly because I'm limited to the //public_html
by
Now I learned that it can be done by editting the .htaccess, the issue here is that if add "php_flag display_errors off" I get Internal Server Error (500).

This is my .htaccess

DirectoryIndex index.php
RewriteEngine On
#RewriteBase /your-sub-directory
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]
by
I was able to reach the host support, they edited the php.ini and the Notices are gone.
by
I think another way is to put a php.ini file in your public_html directory.  I think on most sites that will be picked up and override the main file.

But of course, host support is always the most reliable :)
...