Hello,
This will be a bit long and will do my best to explain my issue. Thanks in advance to those who are willing to read and try to help.
I have a running drupal site (Drupal 4.7 Civicrm 1.5) in producton. I need to import thousands of records and updates to current records. I am not willing to do this without a bit of testing first. The production site is running php4, not sure which version of apache.
I have a test server running ubuntu linux, apache2 and php5. I want to copy the working site from the producton ISP to my test system. The test system web server is running and phpinfo() returns a page. Mysql is running. I have a working drupal site on this system which I installed from scratch and I am having no trouble with it. On the test system I create a new user, lets call it "drupaltest". I create a database named "drupaltest" and a mysql user names "drupaltest". I grant the mysql user "drupaltest" all the required rights.
No I move the site. On the production site I tar up all the files in the working public_html directory. I untar them into the drupaltest/public_html directory on the new server. I next edit the sites/default/settings.php file to update the $db_url value to point to the new mysql database. I adjust the .htaccss as well.
Now move the mysql database. On the production site I run mysqldump to build a SQL restore file. Next, on the new system I run mysql and input the restore file. The database is now on the new system. Phpmyadmin now shows a fully load database. Next, truncate the cache table.
I now try to access the new site from my browser on my windows system.
I now see:
Page Not Found
Looking at the code I have determined this is being returned by menu_get_menu() in includes/menu.inc
Here is the call stack from right at entry of index.php
Phpidex.php Call to includes/menu.inc menu_execute_active_handler() Call to menu_get_menu (returns a value) Call to $_GET (returns a value) The call to substr in the next piece of code returns $path=null
while ($path && !isset($menu['callbacks'][$path])) { $path = substr($path, 0, strrpos($path, '/')); }
The code next executes:
Return MENU_NOT_FOUND;
And we are quits.
-------- Now my question. What is wrong with the way I moved the site by using tar and mysqldump. This seems like a logical method since the only thing installed on the production site was the code in public_html and the tables created in mysql.
I have been at this for days. Could use some help or a few suggestions.
Larry
On 12/2/06, Larry Hedrick lhedrick@dharmatech.org wrote:
I next edit the sites/default/settings.php file to update the $db_url value to point to the new mysql database. I adjust the .htaccss as well.
Does updating the $base_url help?
This is my first use of the drupal support fourm. If this post does not get to the correct place, please instruct me on the proper reply method. This is a reply to a person who answered my original post.
-----------
$base_url is set to:
$base_url = 'http://mysite.com';
Since the code quits near the starting function calls in index.php, this has to be something simple or obvious related to the code I loaded into public_html. If I invalidate the name of the database in the $db_url value the browser will report an error saying it can't get to the database. This indicates to me that the database is at least being opened.
Back to the code in includes/menu.inc
function menu_execute_active_handler() { if (_menu_site_is_offline()) { return MENU_SITE_OFFLINE; }
$menu = menu_get_menu();
// Determine the menu item containing the callback. $path = $_GET['q']; #lrh # #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #on my working system $path has been returned as #the string "node" #on the system which fails it returns "home" #don't know what this means at this point echo $path; # $paths is set to "home" ??? while ($path && !isset($menu['callbacks'][$path])) { $path = substr($path, 0, strrpos($path, '/')); }
#$path is now null and we return page not found
Larry
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Jiann-Ming Su Sent: Saturday, December 02, 2006 11:09 PM To: support@drupal.org Subject: Re: [support] Need to move drupal site to a new server.
On 12/2/06, Larry Hedrick lhedrick@dharmatech.org wrote:
I next edit the sites/default/settings.php file to update the $db_url value to point to the new mysql database. I adjust the .htaccss as well.
Does updating the $base_url help?
On 12/3/06, Larry Hedrick lhedrick@dharmatech.org wrote:
This is my first use of the drupal support fourm. If this post does not get to the correct place, please instruct me on the proper reply method. This is a reply to a person who answered my original post.
$base_url is set to:
$base_url = 'http://mysite.com';
If drupal is installed in ~drupaltest/public_html/, then shouldn't $base_url be http://mysite.com/~drupaltest?
On Sunday 03 December 2006 08:00, Larry Hedrick wrote:
This is my first use of the drupal support fourm. If this post does not get to the correct place, please instruct me on the proper reply method.
Yes, this is the correct place, but the traffic in here isn't so great.
You can also try the forums at: http://drupal.org/forum or, probably more specifically for your situation: http://drupal.org/forum/21 or: http://drupal.org/forum/22 which I see you are doing: http://drupal.org/node/100505
The forums are a little more active, and more heavily watched, but it seems to me that you can get a different slant from the mail list.
This is a reply to a person who answered my original post.
$base_url is set to:
$base_url = 'http://mysite.com';
Try setting it to: $base_url = 'http://mysite.com/~drupaltest'; (from your original post)
Or, better yet, commenting it out. Drupal versions 4.7.0 and above do not normally need that setting specified.
[ s n i p ]
I personally have no clue what is causing your problem, but the two other things I would try (besides the above), are varifying you have the .htaccess file in the root directory and checking for & disabling Clean URLs (http://mysite.com/?q=admin/settings).