- Rebuild your registry
- Clear cache
- Disable modules in MySql
- Run update.php
- Clear cache programatically
- Register globals (use php.ini file)
- Increase memory size (use setting.php file)
Rebuild your registry: (from https://drupal.org/project/registry_rebuild)
How To Use Registry Rebuild With Drush
This is the preferred technique, and it should work with multisite installs.
- You can just
drush dl registry_rebuildand drush will download it into your .drush folder. (Alternately, you can obtain the package another way and copy the folder into .drush yourself.)
- Make a backup of your database.
- On a multisite install, cd into the site you’re rebuilding, as in
How To Use Registry Rebuild Without Drush
This isn’t a module, but it’s just packaged as a module download to make it so
it’s easy to find and people can download it as a package.
- Make a backup of your database using any technique you like.
drush sql-dump >dump.sqlor
mysqldump -uuser -ppassword dbname >dump.sqlor use phpMyAdmin or whatever. I know of no way that this procedure can harm your database, but on the other hand if it doesn’t work, you can get me the database and I can improve the module to deal with your situation.
- Make a directory for the php file, probably sites/all/modules/registry_rebuild (or for a multisite, sites/mymultisite/modules/registry_rebuild.
- *If* your modules are not in sites/all/modules, you will probably have to edit registry_rebuild.php to set DRUPAL_ROOT to what it should be.
- Copy the registry_rebuild.php from the package into that directory.
- You don’t need to enable it. If you were able to enable it it means you didn’t actually need it.
- Either run it from the command line:
point your web browser to
Changing “example.com” to your own site’s base URL of course.
- You should see something like this:
DRUPAL_ROOT is /home/rfay/workspace/commerce.
There were 631 files in the registry before and 508 files now.
If you don't see any crazy fatal errors, your registry has been rebuilt. You will probably want to flush your caches now.
- Hopefully you’ll now be able to go about your affairs in peace, updating, clearing cache, etc.
This package comes with no guarantee explicit or implicit.
Diable module in MySQL fromhttps://drupal.org/node/157632
MySQL Command Line
Step 1: To disable a module via phpMyAdmin you must login to phpMyAdmin. Then you must locate the database where Drupal is installed. Once you have done so look for the “system” table. Click and open it. Click to browse the table. Find the record for the module that is causing the problems and select the edit function. Set the status to “0” and save.
Step 2: To update the cache using the mysql command line, type:
DELETE FROM cache_bootstrap WHERE cid='system_list'
Run the update.php at www.yourwebsite.com/update.php
Access denied. You are not authorized to access this page. Log in using either an account with the administer software updates permission or the site maintenance account (the account you created during installation). If you cannot log in, you will have to edit
settings.php to bypass this access check. To do this:
- With a text editor find the settings.php file on your system. From the main Drupal directory that you installed all the files into, go to
sites/your_site_nameif such directory exists, or else to
sites/defaultwhich applies otherwise.
- There is a line inside your settings.php file that says
$update_free_access = FALSE;. Change it to
$update_free_access = TRUE;
- As soon as the update.php script is done, you must change the settings.php file back to its original form with
$update_free_access = FALSE;.
- To avoid having this problem in the future, remember to log in to your website using either an account with the administer software updates permission or the site maintenance account (the account you created during installation) before you backup your database at the beginning of the update process.
Clear cache programatically:http://billietconsulting.com/2013/06/clear-drupals-cache/
Here is the code to clear Drupal’s cache. Place the file in the right underneath the root of your website and name it clear.php for example, so the path will be example.com/clear.php
// define static var
// include bootstrap
// initialize stuff
// clear cache
Remove the file once you’re done.
more info here: https://drupal.org/node/42055
create a php.ini file and place in root folder of your website (also works for sub-websites) like dev.mywebsite.com then place it in the root/subroot (mywebsite/dev folder)
register_globals = off;
Fatal error -> out of memory:
- Drupal 7: If you need more than 128M, then add the line
to your [Drupal 7 root]/sites/default/settings.php file.I have yet to need this much memory, but I did achieve
a memory increase to 512M using this slightly more complicated
process that involved temporarily changing the permission level
for that file at my online webhost.The following applies to an online installation,
but if your installation is “local” on your computer
just follow the instructions below and ignore the extra steps
required for the online installation.I have not tried the Local approach, but I assume
it would work equally well.
- Download a copy of the file “settings.php”
(if you do not already have a copy on your computer)
that is located at
[Drupal 7 root]/sites/default/settings.php
- Open the file with your favorite text editor
(Eg. WordPad, NotePad, etc.).
- Add a line of code on a line of its own
at the bottom of that file…
- ‘Save’ the file.
- Change the file permission level of the settings.php
file on your server from “0444” to “0777”;
otherwise you will not be able to over-write it with
the newly saved file you have on your computer.In the case of my Drupal 7 installation being on my webhost…
- I go to my online webhost account’s control panel (CPanel)
- Click on the link for the ‘File Manager’.
- Navigate to the file [Drupal 7 root]/sites/default/settings.php
- Change the file permission from 0444 to 0777.This might take some poking around for you to figure
how to do it, but it should be easy enough once you
find the right thing to click.In my case, double-clicking on the “0444” allowed me
to edit the number right there, although
you should also be able to change the permission number
by highlighting the file, and clicking a button or link
called “Change Permissions”; or similar.
- Replace the Drupal 7 settings.php file with the one you modified
by an upload of the file settings.php that you have on your computer
to the proper location on your webhost server
using either your control panel (CPanel)
or your FTP program.
- Change the permission level for the file back to 0444
- You can see the amount of memory you are being allowed by going to
‘Reports’ > ‘Status report'; and scrolling down to “PHP memory limit”.It should read ‘512M’ if you have followed the above steps.
- Replacing the modified settings.php file on my website
with a copy of the original settings.php file
returned the “PHP memory limit” to what it had been before.
- I have read that “Restarting the server” is required for local installations
although I have no experience with that.
All the best.
- Download a copy of the file “settings.php”
- source: https://drupal.org/node/76156#comment-4583384
This is the recommended approach if you have access to the server’s php.ini. This will not be possible in some shared hosting environments, though your host may be able to adjust it for you. Note that this change will affect all websites and PHP scripts on the server.
- Locate the php.ini file used by your web server. You can click the “more information” link on Drupal’s status page’s PHP section. which shows the phpinfo() page. Locate theConfiguration File (php.ini) Path row on that page. During installation Drupal checks the PHP Memory Limit, and if it is less than 32M (16MB for Drupal 6), an error message also provides the path to the php.ini file.
- Edit the memory_limit parameter in the php.ini file (usually in a section called Resource Limits)
memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)
If there is no section already for this, place the above line at the end of the file.
- Restart Apache.
php.ini in the Drupal root folder
Add the following line to a php.ini file in your Drupal root folder:
memory_limit = 64M
This will only work if PHP is running as CGI/FastCGI.
Latest php.ini file in my sub-website’s root folder looked like this:
register_globals = off;
and the settings’php had 528M memory