1

Possible Duplicate:
How to find out where a function is defined?

I am working on a php project which I have to do some styling and I've been trying to search for string using Sublime Text's "find in files". The text is a function name used like:

echo advspecial();

but it seems "advspecial" doesnt exist. I tried renaming advspecial just to test if its a function then I get an error "Call to undefined function"

My question is, why can't I find it in the files? Could it be inside a mySQL database?

Community
  • 1
  • 1
killebytes
  • 940
  • 1
  • 10
  • 24
  • Check for other paths being `include`d into the code. – mellamokb Apr 02 '12 at 15:32
  • Question got closed before I could post, lol typical... I made a quick little PHP script that will scan your entire project to look for the string. http://codepad.org/uj8kPDgx – Lawrence Cherone Apr 02 '12 at 15:45
  • it turns out the file is encrypted by ioncube! Anyway, I dont think this question is a duplicate of the above bec. it doesnt answer my question. – killebytes Apr 03 '12 at 01:53

2 Answers2

1

If you are running this locally, try viewing the page and seeing if the error appears. If it shows an error then the function is probably defined in a file that you forgot or from a remote source.

If there is no error, then the function exists somewhere in your project, and Sublime is probably just experiencing a glitch.

There is no way that the function could be defined inside of a database.

Jesse Rice
  • 48
  • 1
  • 7
  • You never know. Someone might have stuffed a string of PHP code into a DB table to eval() at a later date. I'd hope nobody would be crazy enough to actually do that though. – GordonM Apr 02 '12 at 15:40
0

If you get "Call to undefined function" is exactly that, the function is not defined. Is not possible to store a function in a database.

I recomend you to find using something like this (in linux/unix) inside the proyecto directory:

# grep -r -i * -e "advspecial"

Greatings.

Jorge Olivares
  • 1,477
  • 1
  • 11
  • 14
  • The file-system is a database, however, you can store functions in there as well as inside MySQL. And why should grep work better than "find in files"? Isn't that the same? – hakre Apr 02 '12 at 15:38