Jump to content
MakeWebGames

Recommended Posts

Posted

I keep getting this error when I actually try and do the crime that I created.

Fatal error: SUHOSIN - Use of eval is forbidden by configuration in /home/marfur93/public_html/docrime.php(21) : eval()'d code on line 21

Help Me Please!

Guest Anonymous
Posted

Re: MCcodes v2.0 problem

 

Fatal error: SUHOSIN - Use of eval is forbidden by configuration in /home/marfur93/public_html/docrime.php(21) : eval()'d code on line 21

Pretty self explanatory really...

suhosin is configured to prevent the use of the eval() function.

You will have to either manipulate the php.ini file itself, to toggle this nature or rewrite the crime formula evaluation routines.

See: http://www.hardened-php.net/suhosin/con ... sable_eval

Posted

Re: MCcodes v2.0 problem

Just so that you know, the account I am having problems with is not being hosted by myself, so i probably won't be able to edit the php.ini file.

Posted

Re: MCcodes v2.0 problem

I've seen that crime equation and it's crap.

You could easily achieve the same thing by changing the equation over from using that eval statement into being hard coded. You'll need two columns though instead of the one in the database. Since you have to parts to that equation, and you would be storing just the number that is the "modifier". One is a crime level modifier, and the other one I think is a will modifier.

Guest Anonymous
Posted

Re: MCcodes v2.0 problem

Or of course write your own expression evaluator... For example, one formula I noticed was:

 

((WILL10)/185)+((IQ-10)/10000)+((AGIL-10)/10000)

 

Now this is a simple expression to evaluate using preg_replace.

Stage #1 - replace the constants WILL, IQ, AGIL etc with their current values

Stage #2 - Evaluate and replace all bracket expressions (number operator number)

Stage #3 - Strip simple brackets (number)

Stage #4 - Repeat until only a simple number left.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...