How to edit php so civicrm can find the extensions
You can define a directory for your extensions and point CiviCRM to it. Remember that custom extensions directory should be kept outside your CiviCRM installation because they will be easy to manage in case you need an upgrade on your install. 

Below are the steps which i propose you carry out to setup your extensions directory


create your directory probably /home/../../../extensions 
Give appropriate permissions to your extensions directory
Go to your CiviCRM install, under administer >> System settings click on Resource URL.
place the full path of the directory you created above in the "Extension Resource URL"
Now any extensions you place in the directory above should be seen and interpreted properly as an extension 


-* you can verify and install by navigating to Administer >> System settings >> Extensions( there you will see all extensions ) 

If that does not make sense to you then you can follow from Extensions