php errors - what to do?

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

php errors - what to do?

Post by spirelli » Fri 10. Aug 2007, 19:12

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!

User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus » Fri 10. Aug 2007, 20:34

Turning off "notices" in PHP:

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

spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post by spirelli » Tue 14. Aug 2007, 14:54

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 :(

User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop » Tue 14. Aug 2007, 15:26

Is there a directory before the phpwcms root -> The real account root?

Put it in there.

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )

User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus » Tue 14. Aug 2007, 15:49

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.

spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post by spirelli » Tue 14. Aug 2007, 17:22

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.

spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post by spirelli » Tue 14. Aug 2007, 18:32

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.

User avatar
juergen
Moderator
Posts: 4553
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Post by juergen » Tue 14. Aug 2007, 20:12

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

User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus » Tue 14. Aug 2007, 23:00

And look for this type of line:

Code: Select all

php_flag error_reporting "E_ALL & ~E_NOTICE"

Post Reply