Page 1 of 1

php errors - what to do?

Posted: Fri 10. Aug 2007, 19:12
by spirelli
Plase have a look at http://www.****.net/sdcontact.phtml

I'm getting these nasty error messages

Code: Select all

Notice: Undefined index: class in /var/www/vhosts/****.net/httpdocs/include/inc_front/content/cnt23.article.inc.php on line 117

Notice: Undefined index: class in /var/www/vhosts/****.net/httpdocs/include/inc_front/content/cnt23.article.inc.php on line 294

Notice: Undefined index: class in /var/www/vhosts/****.net/httpdocs/include/inc_front/content/cnt23.article.inc.php on line 324

Notice: Undefined index: class in /var/www/vhosts/****.net/httpdocs/include/inc_front/content/cnt23.article.inc.php on line 746
How can this be stopped?

Thanks!

Posted: Fri 10. Aug 2007, 20:34
by DeXXus
Turning off "notices" in PHP:

Change the line in "php.ini" to error_reporting=E_ALL & ~E_NOTICE

Posted: Tue 14. Aug 2007, 14:54
by spirelli
Right,

what's the deal with these errors. Doesn't that mean that there is something wrong? Just switching off the reporting won't fix them, right?

I'd be happy about an answer.

Also, I don't have access to php.ini, but else where it said that I could create a php.ini file in the phpwcms root directory. I did that and added:

error_reporting=E_ALL & ~E_NOTICE

but it does not work :(

Posted: Tue 14. Aug 2007, 15:26
by flip-flop
Is there a directory before the phpwcms root -> The real account root?

Put it in there.

Knut

Posted: Tue 14. Aug 2007, 15:49
by DeXXus
spirelli wrote:Right,

what's the deal with these errors. Doesn't that mean that there is something wrong? Just switching off the reporting won't fix them, right?

I'd be happy about an answer.
They're not errors. They are a notice to the programmer of -potential- programmatic problem(s) depending on syntx and usage of a particular programming construct and the data handling methods it uses.

Posted: Tue 14. Aug 2007, 17:22
by spirelli
unfortunately, it seem I can only upload to the directory that holds the website files. I'll contact the host company. Many thanks for all your explanations.

Posted: Tue 14. Aug 2007, 18:32
by spirelli
I'got this response from the host company:
We don't make changes to our php.ini file globally ... However you can change your own php registry flags in your .htaccess file. I have made the change you have requested and the error has gone away!
It seems thay've added this to the _.htaccess file

Code: Select all

# These settings are recommend
# Maybe you might have problems
# with other scripts that needs
# register_globals ON
php_flag magic_quotes_gpc Off
php_flag register_globals Off
Hope that will be fine. The notices have gone for now -- good.

Posted: Tue 14. Aug 2007, 20:12
by juergen
Hi there

this: " _.htaccess " is just a file with nothing to do or say....

this " .htaccess" file knows the server as for his own, but perhaps this is hidden for normal ftp view.

So if you'll go and change anything its needed in the file without the leading underline...

greetz juergen

Posted: Tue 14. Aug 2007, 23:00
by DeXXus
And look for this type of line:

Code: Select all

php_flag error_reporting "E_ALL & ~E_NOTICE"