views:

50

answers:

3

Hello

I have acquired a PHP application that has a system class encoded with Ion Cube PHP Encoder.

I copied the files and moved them to a new server, a development one. The first thing that got me was the application was to only work on the domain it was on, so obviously not from localhost or any other server.

I'm guessing somewhere in the encoded code is a string comparison from a hardcoded string to where the site is running from.

I'm not looking to do anything illegal or against the software license - just I want to do all the development on a different server, and then push the files back to the original domain.

Basically, minimise downtime for the production site.

Is there any tricks I can do? Can I stuff with my hosts file to do it?

Thanks

Update

Forgot to mention that I have tried changing $_SERVER before the PHP checks. There is also a config file which asks for the URL. Leaving it on the old domain doesn't work, and changing it results in the invalid domain error.

A: 

Have you tried searching for "ioncube decoder"?

Sergei
A: 

It would depend on how exactly Ion Cube checks the host - if it uses hostname or equivalent then you would need to modify config on the server to think it has the same name as the production server, this is unlikely to be a good idea, but still maybe better than a developmestruction environment.

If it just checks the host HTTP header then you can just modify your hosts file back and forth

tobyodavies
A: 

what operating system are you using ?

add the domain name to your host file as 127.0.0.1 (localhost)

e.g: under linux

add this to file /etc/hosts

127.0.0.1  thedomainname.com

checkthis link to find other OS hosts file link text

this should make the apps running on your localhost to refer to it's self

technomage
I have Windows 7 and OS X Snow Leopard.
alex
It's in /etc/hosts on OS X. Just make sure to edit it as root. Open a console and type `sudo pico /etc/hosts`. Hit ctrl+x when you're done in pico.
no