We help IT Professionals succeed at work.

reverse engineer .sql from php files

yan hassell
yan hassell asked
on
224 Views
Last Modified: 2017-03-20
I'm looking for a way to recreate a MySQL db based on the PHP files.  Basically an old client wants to resurrect an old web app and he only has the PHP files.
is there some app/script that can run through PHP files and extract any update/insert/select queries and generate a .sql to be used to create tables?
any other suggestions on how to bring this back to life?
Comment
Watch Question

John TsioumprisSoftware & Systems Engineer
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
thats my last option.  was hoping to find something more automated.
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
its not built with a framework.  just a bunch of php files.  The server it was hosted on has long been decommissioned so I dont have any access to backups unfortunately.
Dave BaldwinFixer of Problems
CERTIFIED EXPERT
Most Valuable Expert 2014
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2019
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Most Valuable Expert 2011
Author of the Year 2014
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Consultant
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
thanks for all the help guys.  Im going to leave this open another day or so and then try to figure out how to spread the points ;)
CERTIFIED EXPERT

Commented:
lol, I did resurect the dead a few times and was quite happy with that. my personal feeling is old apps are usually properly written or simple enough that it does not matter. i'd never suggest using whichever framework unless i have a good reason to, and the information provided is way too little for that to apply... my belief is frameworks usually add complexity and are often less short-lived than the corresponding app so unless you're building something really huge, or short-lived, or structured in a way you feel you might as well take over the framework's development if needed, or... stay away from them...
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.