0

I am selling extension that has custom php script (ajaxrequest.php). This script needs to be web accessible. I tried to put it into Magento root folder.

The problem is that on some hostings the file won't get proper file permission when extension is uploaded with Magento Connect Manager. For example if I install extension on Hostgator server, it will show 500 Internal Server error and only Hostgator team can change it. Is there any solution for this?

6
  • What are the permissions that produce the 500 error? 0600? Aug 28, 2015 at 20:35
  • yes. there is a solution. build your extension properly, like an extension should be written. Don't use additional php scripts. Use controllers and actions. A php file should only contain a class declaration.
    – Marius
    Aug 28, 2015 at 21:36
  • @Marius As noted in this post, there are scenarios when php script makes sense. I need it for ajax call which is made per each page view. Using Magento object would take extra 13MB memory usage to EVERY page view. Just initializing Magento would take 7MB. By using php script I can minimize it to only 0,5MB.
    – JohnyFree
    Aug 28, 2015 at 22:33
  • @PetarDzhambazov 644, but the problem is about owner. Only when extension is uploaded with Magento Connect Manager on Hostagor sharing hosting. I guess many customers uses Hostgator, this is why I can not just ignore this thing.
    – JohnyFree
    Aug 28, 2015 at 22:37
  • @JohnyFree if permissions are 644 what is the problem to read the file? For ajax calls you need server to be able to read the file nothing else. Sep 1, 2015 at 16:27

1 Answer 1

0

If your customers use shared hosting or a managed server without SSH access, they depend on the hoster. This is their problem and there is nothing you can do about it.

Although Magento Connect tries to make it look like that, Magento is not built as a "plug and play" application. Integrating extensions on a production server should not be done by non-technical people that don't have sufficient access to the server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.