By stildawn on
Hi All
Carry on from another thread:
My Problem:
Ok a few problems..
Have gone live here... http://www.madigan.co.nz/
So... As you can see the home page works fine, however when you click on any of the links it doesnt work... Now I think this is cause they go to http://Localhost/node/XXXX....
Also I cant login to my admin account etc...
What I have done is this:
1. Exported my database.
2. Enabled Mysql and myphpadmin in the host control panel. Made the users etc.
3. Using the host myphpadmin I created a database called Madigan Freight and then imported my exported database... All good.
4. Changed the settings.php to include the new user:password in the '$db_url =' line. (now looks like this "$db_url = 'mysqli://madiga:XXXX@localhost/Madigan+Freight';"
5. Uploaded using filezilla... All the files from htdocs to htdocs on the host.
Thats basically it... But as you can see the site is not working at all really... Just the homepage is showing, but neither any other pages nor the client login or anything else is working.
Any help would be greatly appreciated...
ThanksMcFilms Quote:
Hey! I thought we had an understanding. Didn't you agree to: "Questions should be asked separate from one another"? I hesitate to add to this thread because it has spider-ed away from the original "3 questions" as new issues pop up. Not trying to be rude... the point of searching and then asking new questions allows other searchers to get the info in the future.
Anyway, further down in your settings.php file, what is $base_url = set to?
Please don't be afraid to use the search field for any follow-up questions. And feel free to start a new thread.Ok heres what it says currently:
/**
* Base URL (optional).
*
* If you are experiencing issues with different site domains,
* uncomment the Base URL statement below (remove the leading hash sign)
* and fill in the absolute URL to your Drupal installation.
*
* You might also want to force users to use a given domain.
* See the .htaccess file for more information.
*
* Examples:
* $base_url = 'http://www.example.com';
* $base_url = 'http://www.example.com:8888';
* $base_url = 'http://www.example.com/drupal';
* $base_url = 'https://www.example.com:8888/drupal';
*
* It is not allowed to have a trailing slash; Drupal will add it
* for you.
*/
# $base_url = 'http://www.example.com'; // NO trailing slash!
I dont think that part is turned on?
Comments
=-=
did you clear cache tables after the move, or before you exported the database? you don't mention that you have. It was mentioned in the first thread, in a comment by me, that got muddied with multiple questions.
Yes I cleared the cache (had
Yes I cleared the cache (had to, to be under the sql upload limit)
Um. The top links (Home, Links, Useful Info, Forms, Contacts) are Primary links in drupal?
The services links are a new menu I created and put in the left side bar block?
I dont know if this is what you mean? I made all this using Drupal... I didnt write code myself for them?
=-=
I know you didn't write the code, but obviously you put the menus there as drupal doesn't have any primary menu items by default.
goto administer -> menus ->primary links
when you typed them in, did you use /localhost/ ?
do the unclean urls work? those with ?q= in them?
ioe: yoursite.com/?q=admin or yoursite.com/?q=admin/buld/menus ?
Um ok. I went back to the one
Um ok.
I went back to the one on xammp on my harddrive... And found this:
For example the menu item in primary links for 'Home' is 'http://localhost/node/1'
I did that for all of the links, What I did was open the made node... Be it home, links, or useful Info etc and I copied and pasted the address out of the address bar and put it in the 'path' when I made the menu items?
What are unclean URLs? I have unclean enabled if that makes any difference?
Your links should just be
Your links should just be /node/1 etc. Then when you move the site to another domain they'll still work.
No leading slash. It may
No leading slash. It may mostly work sometimes, but it's not truly Drupal-portable.
.dan. is the New Zealand Drupal Developer working on Government Web Standards
ah-ha!
So HOME is pointing to 'http://localhost/node/1' ? That won't work. It's trying to point to your desktop machine.
What if you try just '/node/1' which is the clean URL version. If that doesn't work try /?q=node/1
EDIT: I see someone already replied... but two good things to keep in mind: 1.) If you use this "relative link" method (just the stuff after the http://sitename.com OR http://localhost), your links will work on your loacalhost, your server. or even a new domain should you move or clone the site.
And 2.) You might want to consider flicking on the Drupal core "Path" module. This lets you call out the url for the page you are creating at the time of creation. So you could name that page url "home" and it would appear at http://sitename.com/home
A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com
Well, that's your problem then
Manually entering 'localhost' into links or menus will .. well, not be portable, as you've found. That's normal HTML issues.
Drupal links are 'node/1' etc. You'll see that in the help text for menu item editing.
Drupal ensures that 'local' links stay local even after you move the site. It won't/can't do that if you've entered fully-justified URLs to remote servers.
.dan. is the New Zealand Drupal Developer working on Government Web Standards
Ok... So go back and change
Ok...
So go back and change them all to just...
node/X
And then rehost all the files etc and it should work?
Do I need to redo the database as well?
Thanks guys.
go to admin
You SHOULD be able to just go to your site.com/user page, log in. Then go to site.com/admin/build/modules and make sure Path is enabled (see my post above).
Then go to site.com/admin/content/node/overview and edit your pages, edit each page and create a URL for it. Finally go to /admin/build/menu/list and point your menu to the pages.
If you REALLY want to do it locally first, you should only have to update the database. No PHP files get changed.
Cheers!
A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com
Problem is I cant get to
Problem is I cant get to admin yet... If I try login it comes up with an internal error.
I changed in locally and am re uploading 'htdocs' now... So I also need to reimport my local database?
Thanks
=-=
you should fix this on your localhost
The reexport the databse.
Ok heres what ive done
Ok heres what ive done now...
http://www.madigan.co.nz/
So I went into my local site. And changed all the link paths from "Localhost/node/X" to just "node/X"
I then uploaded all the files from my local 'htdocs' to the host 'htdocs'
I then reexported my local database and imported into the host database...
But as you can see from going to the site... it doesnt work, however now its coming up with an internal error message.
I still cant login to get to the drupal admin menus so I have to make the changes locally then upload the htdocs each time.
http://www.madigan.co.nz/?q=u
http://www.madigan.co.nz/?q=user works, so that means your host is not supporting clean-urls.
checklist for migrating to a new server
See the note on unsetting clean URLs if needed.
See the rest of thetroubleshooting guide
When you get a 500 error, that means that Apache should be logging the details for you. You should be able to get access to your logs on your server - see what your host provides. Error logs are for a reason - for you to look at - you must find them and look at them. If you don't know how, you must get that info from your host.
.dan. is the New Zealand Drupal Developer working on Government Web Standards
Ok. When I went into my local
Ok.
When I went into my local copy... It wouldnt let me put the path as "?q=node/X" it came up as invalid path...
So for now Ive just put in the full path again e.g "http://madigan.co.nz/?q=node/X"
Once thats working (im uploading now) Ill look at the login thing...
I still cant get into drupal admin on the host version...
=-=
you put in the full path where?
does yoursite.com/?q=user/login take you to the login screen ?
I put the full path in the
I put the full path in the menu items path box in drupal... Like where it used to say Localhost/node/1 etc
yeah I get the login screen, but I cant login.
=-=
your host must have the apache module mod_rewrite enabled to use clean urls as mentioned in doc pointed to http://drupal.org/requirements
On your localhost, disable clean urls for the time being. Export the database and import into new site.
fire off an email to your host asking about mod_rewrite.
ensure to clear all cookies from browser in the case there is a cookie conflict interfering with the login process.
I disabled cleanurls in my
I disabled cleanurls in my localhost one, But it still wouldnt let me put just "?q=node/X" in... But yes hopefully when its finished uploading again all the pages will at least work in the short time and we can figure out why I cant login...
Does the apache module mod_rewrite have something to do with the Logining in?
Ok... Touch wood... But for
Ok...
Touch wood... But for some unknown reason it is all working now....
I can login, and my boss can login on his computer, hell even the contact form works...
But this doesnt making any sense...
=-=
unsure what doesn't make any sense.
All I did was change the
All I did was change the paths and turn off clean urls and now everything seems to be working...
Maybe I just dont know what Im talking about...
Anyway... Thanks all for your awesome help, couldnt have done it without you. Cheers