To change its settings, edit the file and change the parameter’s value via a text editor. This PHP configuration file location varies depending on the web server. It lets you control your site’s PHP-related rules, such as setting the size limit when uploading files and hiding error messages. htaccess file to keep prying eyes from looking at your is a configuration file containing your web server’s PHP settings. Upload your new custom php.ini to the root folder of your Drupal site.You may need to temporarily change the permissions on the directory from 755 to 777 (don't forget to change them back later), or ask your host for help. You may see an error message such as cp: cannot create regular file `/home/YOURUSERNAME/public_html/drupal/php.ini': Permission denied in your error log. If you cannot see the new php.ini file then possibly the permissions on the directory which should contain it did not permit PHP to copy the file there.Open it in a text editor like PS PAD, search for the string register_globals and set it to off. Now, when you go to the root folder of your Drupal site, using FTP, you should see a new php.ini file.If you see a message like Warning: system() has been disabled for security reasons in /home/YOURUSERNAME/get_the_ini.php on line 1 then you may need to try an alternative command to PHP's system, such as exec, shell_exec or passthru, or ask your host for help. All it does is create a copy of the default php.ini and puts in the folder you specified. In your browser, go to (which should display a blank screen).Upload it to your root folder and in your browser, go to Scroll down a bit and it should indicate the exact path for where your default php.ini is located on the server. If you are unsure where on the server your default php.ini is (there may be a number of different versions on your system, and it is important to get the right one), create a php file called phpinfo.php with the following in it.on some servers you might want to use /usr/local/lib/php.ini for the 1st path and /home/YOURUSERNAME/public_html/drupal/php.ini for the 2nd path) and uploading it to the root folder of your drupal site. Make a copy of the default php.ini by creating a php file using the snippet below, editing it to suit your server paths (e.g.This is what I did.(thanks to Dublin Drupaller for putting me straight on this) In other words, when I upload a custom php.ini, it replaces the default it's missing all the other settings and breaks the site. the folder containing Drupal's index.php), but, I don't know what else to put in it besides the register globals switch. I am able to upload a custom php.ini file to the root folder of my Drupal installation (i.e.htaccess file didn't work for me (because PHP is running as CGI, not as an Apache module) I'm unable to access and edit the default php.ini for my sites.My shared host had register_globals switched on for some reason and was slow to respond to tech.support.The reason I created a custom php.ini file for my site was because: This explains how to make a copy of the default php.ini file, so you can create a custom php.ini file for your Drupal site and make changes, such as increase memory limit, disable register_globals, switch off safe mode, increase max file upload size etc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |