Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

PHP auto_prepend_file

Can anyone tell me where you set a PHP auto_prepend_file directive on Infinity?

It's usually in .htaccess, though on some systems it has to be set in .user.ini

Thx, Ian.

Comments

  • I'm sorry, but that setting is not supported on InfinityFree. There are a few PHP settings you can edit, but you'd need to switch to premium hosting for more fine grained control.

    I'm not sure what you need to use the function for, but if you're using WordFence, rest assured that we've implemented plenty of security measures on the server level. WordFence might say you need to implement all their suggestions to keep your website safe, but know that our servers will already stop most attackers before WordFence gets a chance to do anything.

  • The app is Mara CMS, and it needs prepending for some of its more advanced features, although it is not essential for basic functionality.

    The restriction could be worked around, but the wider problem I see here is that I have no way of knowing what other PHP features are disabled on the free space. If I hit another issue of the same kind and it proves insurmountable, that might mean relocating the site.

    As for going the paid route the client is a charity and have insisted that costs have to be kept to a minimum. I'd rather they allowed me to buy webspace, save a lot of hassle, but that's the way it is.

    Regards, Ian.
    https://iwrconsultancy.co.uk

  • @iwrconsultancy said:
    The app is Mara CMS, and it needs prepending for some of its more advanced features, although it is not essential for basic functionality.

    The restriction could be worked around, but the wider problem I see here is that I have no way of knowing what other PHP features are disabled on the free space. If I hit another issue of the same kind and it proves insurmountable, that might mean relocating the site.

    You can easily check the current PHP settings, including which modules are enabled and which functions are restricted, by using the phpinfo() function. Simply create a PHP file anywhere on your website with the contents <?php phpinfo(); and open it in your browser.

    Also, this isn't really a PHP feature, it's a PHP setting. PHP features are the functions and extensions which are available to use within your code. auto_prepend_file is not something you can use within your code, it must be configured on the server level.

    And when it comes to editing PHP server configuration: you can't edit any PHP settings EXCEPT error log level, error display and PHP timezone. Which are also exposed through the Alter PHP Config menu in the control panel.

    @iwrconsultancy said:
    As for going the paid route the client is a charity and have insisted that costs have to be kept to a minimum. I'd rather they allowed me to buy webspace, save a lot of hassle, but that's the way it is.

    Please keep in mind that servers and network connections aren't free. InfinityFree is not a charity, we cannot afford to give premium quality features away for free.

Sign In or Register to comment.