Posted by Anonymous on November 17, 2011 at 3:39am
I recently had to reformat my hard drive and start over, and now I've done most of my re-installing. (Also now have an imaging program to prevent this in the future!) I want to get my localhost set up again, but I'm having a memory limit problem when trying to import. I did a dump from the host, and tried to import, but got the size error. I increased the upload_max_filsize, memory_limit, and post_max_size in php.ini, since I found that could be a possible solution. That did not work. I tried bigdump - errored out on that as well.
I'm still on 6.x for this site, and I'm using WAMP.
Does anyone have any ideas for me? Thanks for your help, Linda
Comments
When you say "I did a dump
When you say "I did a dump from the host", what do you mean? Did you do a straight MySQL dump? Did you use the Backup/Restore module? Something else? That'll help narrow down the options.
I tried both ways, actually.
I tried both ways, actually. By dumping I mean that I did an export from phpmyadmin. But I also used Backup and Migrate. Could not import using Backup and Migrate though, because the site is not showing up locally. It says it's offline sometimes, sometimes wants me to install...
I woke up with a possible solution... I could do a fresh install of the latest d6, install backup and migrate, and import that way. I'm not all the way awake yet, so I haven't thought that all the way through. Does that sound right?
If I were in your situation,
If I were in your situation, and had a Backup/Restore file, I'd do exactly that (do a clean D6 install somewhere) -- especially since it sounds like the site at present is acting a little flaky. I'm sure there's a way to tweak your settings or files, but a reinstall is the easiest way to success I think. And I like easy!
It worked.... almost. The
It worked.... almost. The site now appears but the theme is not showing - so I brought down the themes directory. Well, actually the whole sites directory, except I thought the settings.php file should remain. Should I have brought it all down?
After the restore - I received this error: warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'views_access' not found or invalid function name in C:\wamp\www\drupal\includes\menu.inc on line 453.
This is from that file - line 453 is in the last else line:
function _menu_check_access(&$item, $map) {
// Determine access callback, which will decide whether or not the current
// user has access to this path.
$callback = empty($item['access_callback']) ? 0 : trim($item['access_callback']);
// Check for a TRUE or FALSE value.
if (is_numeric($callback)) {
$item['access'] = (bool)$callback;
}
else {
$arguments = menu_unserialize($item['access_arguments'], $map);
// As call_user_func_array is quite slow and user_access is a very common
// callback, it is worth making a special case for it.
if ($callback == 'user_access') {
$item['access'] = (count($arguments) == 1) ? user_access($arguments[0]) : user_access($arguments[0], $arguments[1]);
}
else {
$item['access'] = call_user_func_array($callback, $arguments);
}
}
}
Does anyone have any suggestions? I'm drawing a blank.
Try changing the theme
For the disappearance of the theme. Sometimes if you change the theme or even go to the theme selection page and keep the same theme, but then save the choices that is enough to trigger a reset and flush the cache.
Similarly, for the menu problem, assuming that you have flushed the caches, you can try to disable views save the modules list and then reenable it.
move to the command line
I don't use WAMP, but one strategy to solve this problem is to move from the Web based tools to command line tools. The limits on the Web are, in part, to prevent either an intentional or unintentional denial of service. The command line does not have, or generally need, such safeguards. Here are some links about using the command line mysql in WAMP.
http://www.ibsteam.net/blog/web-development/how-import-sql-file-within-w...
http://www.wampserver.com/phorum/read.php?2,33782,33789
Although I'm using the
Although I'm using the command line more and more, I'm not real comfortable on it yet. Eventually I plan to move everything to Ubuntu. For now I'm still using WAMP on windows. I'll get there eventually! Thanks for the information.
Take the Plunge
Linda
Take the plunge and move to LAMP ASAP, I do MS administration and used WAMP and suffered with it for a couple of years but there are nothing but problems tring to get things like DRUSH and Make File to work. These platform is really important for some of the support materials that some of the contirb developers provide. If you have a development environment that can support 4GB of memory to support a Virtual Box and windows don't wait if not buy a new computer. The contrib module Qucikstart will have you up and running in no time (with an lamp stack and example systems for 6 and 7. Once there you can learn the comman line without all of the other installation stuff that gets in the way with WAMP.
my.cnf
I'd also suggest looking for, and tweaking you MySQL configuration file -- usually my.cnf.
There's' some documentation on d.o here: http://drupal.org/node/85768
Thanks! I'll look into that!
Thanks! I'll look into that!
If your database is too big
If your database is too big to import you can sometimes make it small enough to import by clearing cache before you do your export
I'm pretty sure I've seen
I'm pretty sure I've seen this before when my database import fails half way through because I have a corrupt import file (bad up/download or mismatched charachter encoding, etc).
It sounds like you are trying to do this with PHP Admin and this is failing on you. You can try mysql query browser, but the command line tool is much more reliable. I'd suggest using cygwin (command line tool). Make sure the mysql client is installed. I know you said you are still getting used to the command line, but it would be the next thing I'd try.
The import command isn't too bad, run it in the same directory of the file, on the server where the DB is located:
mysql -v -D yourDatabase < your_import_file.sql -u drupalDatabaseUser -pIt will then prompt for the database users password, and after you enter it you'll get a glimpse of the matrix as it does the verbose output of the import process. If there are any errors they will show up at the end (another good reason to do it with the command line is because you can see exactly what, if anything, is failing).
If you run the command this way, then you have to be on the server (either directly on the machine, or ssh in). If you need to connect remotely we can walk you through that if we need to.
new info
New info:
1. Seems like the index page is the only page that will even show up in my localhost. The menu that should be on the left does not even show up.
2. Every other link takes me back to the server configuration page.
3. The admin menu does show up, but anything I try to access, for example the modules listing, I get taken back to the server configuration page.
4. Of course hard-coded links work, but no internal ones.
After all this is solved, I guess I'll take the plunge and move to the Linux environment. I have been using VMware Workstation because it was made available for free for a class, but do plan to change to VirtualBox. Until then, I'm not comfortable trying to do the command line suggestions even from cygwin. Seems like there is a lot of setting up to do, to even use that tool.
I do need to get this WAMP environment back up to get a registration page live that is overdue. So I need to wait until this is done before I can make the switch to Linux. Here is what I have running now:
WAMPserver v2.2
Apache 2.2.21
PHP 5.3.8 (wasn't there an issue with something not running correctly with the latest version of php, at one time?)
MySQL 5.5.16
So to review, I did a fresh install of the lastest d6, and downloaded Backup & Migrate, and ran the import.
The import ran ok but gave the error I mentioned above.
I copied all of the sites directory down from the host server, except for the settings.php file.
Before this, I had tried the import in phpmyadmin, but got the size error.
Does anyone have anything new for me to try? If not - would someone be willing to meet me to give assistance? Coffee shop? I'll buy! I'm on far east side of Madison but could drive anywhere in the area.
I appreciate suggestions already received, and anything new.
Thanks!
Make sure your .htaccess file
Make sure your .htaccess file got copied. I have had issues before when moving files from one place to another when .htaccess was missed. Your problem sounds just like a problem I had
Well, there are two .htaccess
Well, there are two .htaccess files that I found. I looked at the one at the drupal directory level and there was only one line missing, the php_value memory_limit. So I copied that line in. It did not make a difference, unfortunately. The .htaccess file I found in sites/default/files was only three lines, and was the same as what is on the host. Is there another location I should look for it?
I gave up
I gave up. Thanks to everyone for trying to help me! I got the overdue work done I needed to, on the live site (yeah, I know). Now I'm going to set up VirtualBox and dive into the command line. Wish me luck!