Script Modify: Help

I have been helping a not for profit organisation to move servers and reinstate their bespoke PHP CMS website after the website creator/coder who also was hosting their site and administering it, deserted them.

The script is fully owned by the not for profit organisation. However some key files have been encrypted using Ion Cube. While the migration was largely successful, I am trying to resolve a niggly problem which refers to account paths within these encrypted files which is throwing up errors on certain functions.

What I want to do is add an htaccess file which prepends a little script to all php files within directories and sub directories in problem areas, that will replace the account paths on the script to the new account path:

for example replace /home/xxx/yyy with home/aaa/bbb before the script is compiled by the server.

I know what the old account path and the new account paths are but cannot work out the php required to do this to prepend to the encrypted file as I am very much a noob. I don’t know if this approach will work but, if implemented correctly, I don’t see any reason why it shouldn’t.

I would be grateful for any help.

it should be easy just to add a htaccess file to the directory with something like this

Redirect /olddirectory/oldfile.php newdirectory/newfile.php

this means when ever the code looks for the old file it should be redirected to the new one

If I had a new file, I would have just replaced the existing one…

It’s a line of an encrypted script which is a function pointing to a fileupload location.

Different story altogether…Thanks for your help…

Sponsor our Newsletter | Privacy Policy | Terms of Service