#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    6
    Rep Power
    0

    eval() detecting syntax errors


    Is there away to check eval() statements for parse errors before executing them? The problem is that execution of the whole script will stop if eval() statement contains parse errors!!!!

    I am letting users to enter complex comparison statements on the web, and before I run eval on those I would like to make sure that the syntax is right and eval can be run so that it succeeds.

    Thanks for any help,

    Juha
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    126
    Rep Power
    16
    are you aware of all of the security issues that poses?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    6
    Rep Power
    0
    Yes! I am checking string agaist all active functions in PHP. Only comparison are allowed. This script is not offered to public and it is only to be used by admin.

IMN logo majestic logo threadwatch logo seochat tools logo