Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Variable Notices

Asked Modified Viewed 3,816 times
C
cap97
C
cap97 10
cap97 cool
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
asked
Newbie

Now that globals are forced off, when you pass a variable improperly you get a message like, "NOTICE: Undefined variable yadda yadda."

Is this text a natural error from php or is there a locale for this somewhere? Where is it defined, I guess is my question.
0 replies

13 posts

W
Wooya
W
Wooya 10
PHP-Fusion DEV Team
It's not a bug, it's undocumented feature...
  • Senior Member, joined since
  • Contributed 205 posts on the community forums.
  • Started 11 threads in the forums
answered
Senior Member

It's PHP internal error. To avoid such errors you can always put this code in your script:
error_reporting(0);
0 replies
G
googlebot
G
Visit the new home of the merge between Hacking Vs. Security and Security Override!
My copyright removal has been switched over from HvS to SecurityOverride.
  • Senior Member, joined since
  • Contributed 638 posts on the community forums.
  • Started 28 threads in the forums
answered
Senior Member

W
Wooya
W
Wooya 10
PHP-Fusion DEV Team
It's not a bug, it's undocumented feature...
  • Senior Member, joined since
  • Contributed 205 posts on the community forums.
  • Started 11 threads in the forums
answered
Senior Member

Yeah. read last post carefully ;)
0 replies
C
cap97
C
cap97 10
cap97 cool
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Newbie

Actually, I like the errors, as it's better to let me know what's happening rather than have the page just not work. But on other sites where I've forced globals off, I do not get these error messages from PHP, so I was curious if it was something PHPFusion created. But it's not, it's error_reporting(E_ALL) called in maincore.php. Thanks all!
Edited by cap97 on 17-07-2008 19:41,
0 replies
G
googlebot
G
Visit the new home of the merge between Hacking Vs. Security and Security Override!
My copyright removal has been switched over from HvS to SecurityOverride.
  • Senior Member, joined since
  • Contributed 638 posts on the community forums.
  • Started 28 threads in the forums
answered
Senior Member

If your page has an error and not a warning (undefined INDEX is a warning, or a notice - not an error), it will still say UNEXPECTED '}' on line XXX etc etc etc or whatever the error is.
Edited by googlebot on 17-07-2008 19:50,
0 replies
W
Wooya
W
Wooya 10
PHP-Fusion DEV Team
It's not a bug, it's undocumented feature...
  • Senior Member, joined since
  • Contributed 205 posts on the community forums.
  • Started 11 threads in the forums
answered
Senior Member

Quote

cap97 wrote:
Actually, I like the errors, as it's better to let me know what's happening rather than have the page just not work. But on other sites where I've forced globals off, I do not get these error messages from PHP, so I was curious if it was something PHPFusion created. But it's not, it's error_reporting(E_ALL) called in maincore.php. Thanks all!

error_reporting(E_ALL) in maincore is for RC purposing. In final release this code will deissapear. Generally: production scripts shouldn't report any errors even if their occurs. This is potentialy dangerous for hackers. Read my article about PF security (it not covers all security issues but most important). PHP is great scripting language but also is more open for security issues than others, where rules about vars declaring are must ...
0 replies
M
muscapaul
M
Paul

Time flies like an arrow, fruit flies like banana (Groucho Marx)

Sites: Diptera.info (site owner); Online-Keys.net (site owner); Sciomyzidae.info (site co-owner); muscapaul.com (defunct; site owner)
  • Veteran Member, joined since
  • Contributed 1,075 posts on the community forums.
  • Started 8 threads in the forums
answered
Veteran Member

Quote

Wooya wrote:
[error_reporting(E_ALL) in maincore is for RC purposing. In final release this code will deissapear. Generally: production scripts shouldn't report any errors even if their occurs. This is potentialy dangerous for hackers. Read my article about PF security (it not covers all security issues but most important). PHP is great scripting language but also is more open for security issues than others, where rules about vars declaring are must ...

I think I will leave it in my maincore. It forces me to do it properly.
0 replies
E
Elactos
E
Elactos 10
Infusions & modifications for PHP-Fusion v7
http://www.redward.org
  • Member, joined since
  • Contributed 138 posts on the community forums.
  • Started 5 threads in the forums
answered
Member

Quote

muscapaul wrote:

Quote

Wooya wrote:
[error_reporting(E_ALL) in maincore is for RC purposing. In final release this code will deissapear. Generally: production scripts shouldn't report any errors even if their occurs. This is potentialy dangerous for hackers. Read my article about PF security (it not covers all security issues but most important). PHP is great scripting language but also is more open for security issues than others, where rules about vars declaring are must ...

I think I will leave it in my maincore. It forces me to do it properly.


Same for me.
0 replies
W
Wooya
W
Wooya 10
PHP-Fusion DEV Team
It's not a bug, it's undocumented feature...
  • Senior Member, joined since
  • Contributed 205 posts on the community forums.
  • Started 11 threads in the forums
answered
Senior Member

Quote

muscapaul wrote:

Quote

Wooya wrote:
[error_reporting(E_ALL) in maincore is for RC purposing. In final release this code will deissapear. Generally: production scripts shouldn't report any errors even if their occurs. This is potentialy dangerous for hackers. Read my article about PF security (it not covers all security issues but most important). PHP is great scripting language but also is more open for security issues than others, where rules about vars declaring are must ...

I think I will leave it in my maincore. It forces me to do it properly.


Better way is to do it at the end of maincore like I'm doing:
if (iSUPERADMIN) {
error_reporting(E_ALL);
} else {
error_reporting(0);
}


You will see PHP error messages not others...
0 replies
G
googlebot
G
Visit the new home of the merge between Hacking Vs. Security and Security Override!
My copyright removal has been switched over from HvS to SecurityOverride.
  • Senior Member, joined since
  • Contributed 638 posts on the community forums.
  • Started 28 threads in the forums
answered
Senior Member

Interesting, Wooya.. Very interesting..

I never thought of that. Bravo
0 replies
M
muscapaul
M
Paul

Time flies like an arrow, fruit flies like banana (Groucho Marx)

Sites: Diptera.info (site owner); Online-Keys.net (site owner); Sciomyzidae.info (site co-owner); muscapaul.com (defunct; site owner)
  • Veteran Member, joined since
  • Contributed 1,075 posts on the community forums.
  • Started 8 threads in the forums
answered
Veteran Member

LoL, it is for my localhost development sites only. ;)
0 replies
W
Wooya
W
Wooya 10
PHP-Fusion DEV Team
It's not a bug, it's undocumented feature...
  • Senior Member, joined since
  • Contributed 205 posts on the community forums.
  • Started 11 threads in the forums
answered
Senior Member

Quote

muscapaul wrote:
LoL, it is for my localhost development sites only. ;)


Yup, but in fact I'm always testing my work on produce servers to make it right
0 replies
M
muscapaul
M
Paul

Time flies like an arrow, fruit flies like banana (Groucho Marx)

Sites: Diptera.info (site owner); Online-Keys.net (site owner); Sciomyzidae.info (site co-owner); muscapaul.com (defunct; site owner)
  • Veteran Member, joined since
  • Contributed 1,075 posts on the community forums.
  • Started 8 threads in the forums
answered
Veteran Member

That's the next step. ;)
0 replies

Category Forum

Locales Forum - 8

Labels

None yet

Statistics

  • Views 0 views
  • Posts 13 posts
  • Votes 0 votes
  • Topic users 5 members

5 participants

M
M
Paul

Time flies like an arrow, fruit flies like banana (Groucho Marx)

Sites: Diptera.info (site owner); Online-Keys.net (site owner); Sciomyzidae.info (site co-owner); muscapaul.com (defunct; site owner)
  • Veteran Member, joined since
  • Contributed 1,075 posts on the community forums.
  • Started 8 threads in the forums
C
C
cap97 10
cap97 cool
  • Newbie, joined since
  • Contributed 5 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
W
W
Wooya 10
PHP-Fusion DEV Team
It's not a bug, it's undocumented feature...
  • Senior Member, joined since
  • Contributed 205 posts on the community forums.
  • Started 11 threads in the forums
E
E
Elactos 10
Infusions & modifications for PHP-Fusion v7
http://www.redward.org
  • Member, joined since
  • Contributed 138 posts on the community forums.
  • Started 5 threads in the forums
G
G
Visit the new home of the merge between Hacking Vs. Security and Security Override!
My copyright removal has been switched over from HvS to SecurityOverride.
  • Senior Member, joined since
  • Contributed 638 posts on the community forums.
  • Started 28 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet