Archive for the ‘Php’ Category
script in root of WP
Writing $text to a file:
If you have seen an error like ”Fatal Error: __PHP Allowed Memory Size Exhausted” in apache logs or in your browser, this means that PHP has exhausted the maximum memory limit. This post will show 3 different ways on how you can increase the php memory limit and also explain when you should use them.
Use the following code:
ini_set("log_errors", 1); ini_set("error_log", "/tmp/php-error.log"); error_log( "Hello, errors!" );
You can specify which php.ini file is used within a certain directory if you have multiple php.ini files.
To do this, edit your .htaccess file located in the directory you wish to use and add the following .htaccess code:
SuPHP Or PHPSuExec is a module that increases the security of the server and executes PHP files under the ownership of the owner of the file instead of the Apache user i.e. “apache”.
Your service provider might have forgot to tell you that you need to enable your user defined php.ini configuration by adding this line in the .htaccess file that you find in your public_html folder:
Php has multiple functions to do this task. Lets take a look at each of these