SPECIAL OFFER: Only $69 for access to everything in OSTraining for 1 year! You save $75!  2
Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!

How to access local Drupal 7 site with XAMPP

3 years 8 months ago #125390 by SamStamport
I have installed XAMPP and downloaded my prod to it.

How do I access my local site through my browser? When I type localhost it takes me to XAMPP dashboard.

Please Log in to join the conversation.

3 years 8 months ago #125391 by Valentin
Replied by Valentin on topic How to access local Drupal 7 site with XAMPP
Hi Sam,
Do you have a Drupal installation inside XAMPP?

You can have subfolders located inside "htdocs" directory.
i.e. C:\xampp\htdocs\

In your browser you would go to http://localhost/subfolder/ - where subfolder is one of your Drupal sites.

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 8 months ago #125393 by SamStamport
Replied by SamStamport on topic How to access local Drupal 7 site with XAMPP
I installed Drupal at localhost/htdocs. When I type that into my browser I get:

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.
Error 404
localhost
Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.19

Please Log in to join the conversation.

3 years 8 months ago #125396 by Valentin
Replied by Valentin on topic How to access local Drupal 7 site with XAMPP
You need to have your Drupal site in a new subfolder.
For example: /htdocs/your-drupal-site/

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 8 months ago #125399 by SamStamport
Replied by SamStamport on topic How to access local Drupal 7 site with XAMPP
Actually, I tried that too, but it didn't work.

There's probably something subtle that I missed. I search the web over the weekend to see what I can find.

Please Log in to join the conversation.

3 years 8 months ago #125402 by Valentin
Replied by Valentin on topic How to access local Drupal 7 site with XAMPP
What's the name of the folder where you have your Drupal site?

Let us know if we can be of any help

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 8 months ago #125407 by SamStamport
Replied by SamStamport on topic How to access local Drupal 7 site with XAMPP
I tried

ColumbiaBlooms

columbiablooms

and

cb

none work.

Please Log in to join the conversation.

3 years 8 months ago #125419 by Daniel Pickering
Replied by Daniel Pickering on topic How to access local Drupal 7 site with XAMPP
Hi Sam,

Putting Stuff in Web Folder

Under XAMPP root directory there is a folder called htdocs. That’s where you should put your web site related stuff. For each web site you create, it’s better to create a folder inside htdocs folder and then put content inside that to avoid conflicts.

For an example, you can create a folder called learnphp inside htdocs folder and put welcome.php inside that. Then you can access it via the URL http://localhost/learnphp/welcome.php.

Thanks,
Daniel

Please Log in to join the conversation.

3 years 8 months ago #125514 by SamStamport
Replied by SamStamport on topic How to access local Drupal 7 site with XAMPP
Hi Daniel,

OK. So I see how your example will work. Now let's translate into the Drupal 7 world.

I created a folder inside htdocs called "cb" and dumped all my code & files there from my ADD archive. There is an index.php file among others. I assume this is where it all starts with the browser? So I typed localhost/cb/index.php. I still get the 404 error.

What am I missing?

This business of learning Drupal gets very frustrating!

Thanks,
Sam

Please Log in to join the conversation.

3 years 8 months ago #125524 by Daniel Pickering
Replied by Daniel Pickering on topic How to access local Drupal 7 site with XAMPP
Hi sam,

Well now it depends how you exported your site did you just drop all the files in that location ?

It's probably best to to follow are drupal backup guide for moving your site.
www.ostraining.com/class/backup
www.ostraining.com/class/moving

Thanks
Daniel

Please Log in to join the conversation.

3 years 8 months ago #125688 by SamStamport
Replied by SamStamport on topic How to access local Drupal 7 site with XAMPP
The moving video is for Drupal 8. I'm using Drupal 7. I'm pretty familiar with Backup & Migrate, but will watch that video.

In the meantime, I've finally successfully imported my old database and dropped all the old file system (code & files) into XAMPP in C:\xampp\htdocs\cb.

I'm getting the following error that I hope you can help me with. The first line or so is from this print statement I added to database.inc print "$dsn $username $password $driver_options";.

mysql:host=mariaDB;port=3306;charset=utf8;dbname=columbiablooms admin Ils3040 Arraymysql:host=mariaDB;port=3306;charset=utf8;dbname=columbiablooms admin Ils3040 Arraymysql:host=mariaDB;port=3306;charset=utf8;dbname=columbiablooms admin Ils3040 Array
Notice: Array to string conversion in C:\xampp\htdocs\cb\includes\database\database.inc on line 307
mysql:host=mariaDB;port=3306;charset=utf8;dbname=columbiablooms admin Ils3040 Array
Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\cb\includes\database\database.inc on line 308

Thanks,
Sam

Please Log in to join the conversation.

3 years 8 months ago #125696 by Daniel Pickering
Replied by Daniel Pickering on topic How to access local Drupal 7 site with XAMPP

SamStamport wrote: In the meantime, I've finally successfully imported my old database and dropped all the old file system (code & files) into XAMPP in C:\xampp\htdocs\cb.


That is excellent news Sam. Could you provide a screen print of the error I don't actually use xamp so anything else you can provide help me research the issue for you.

Thanks
Daniel

Please Log in to join the conversation.

3 years 8 months ago #125721 by SamStamport
Replied by SamStamport on topic How to access local Drupal 7 site with XAMPP



Please see attached image.

Thanks!

This message has an attachment image.
Please log in or register to see it.

Please Log in to join the conversation.

3 years 8 months ago #125734 by Valentin
Replied by Valentin on topic How to access local Drupal 7 site with XAMPP
Hi Sam,

May you double check:
  • The database details are correct
  • The site is not missing files from modules or Drupal core

Looking forward to help you

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 8 months ago #125736 by SamStamport
Replied by SamStamport on topic How to access local Drupal 7 site with XAMPP
I'm pretty sure I'm not missing files or modules because I dropped a backup copy straight into the new XAMPP file structure.

As far as database details are concerned, you'll have to be a bit more specific. I made changes to settings.php from information I found in phpMyAdmin.

$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'columbiablooms',
'username' => 'admin',
'password' => '****',
'host' => 'MySQL',
'port' => '',
'driver' => 'mysql',

Please Log in to join the conversation.

3 years 8 months ago #125737 by Valentin
Replied by Valentin on topic How to access local Drupal 7 site with XAMPP
By database details, I mean the user, password and database name from your Drupal site are correct in order to connect to the database.

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 8 months ago #125739 by SamStamport
Replied by SamStamport on topic How to access local Drupal 7 site with XAMPP
How would I find out?

Please remember that although I've been trying to teach myself Drupal over the last year I still am not familiar with all the subtleties. When you say check the "user, password, and database name from my Drupal site" you need to be more specific.

At this point I cannot use the GUI because it will not start due to the error message I previously posted. You need to tell me which files in which folders I need to look at.

I created a new user account in phpMyAdmin with what I thought was correct information, but this is all guesswork. Despite all the time I've spent surfing the web I have yet to find a tutorial (that is current) that will tell me how to do all of this correctly. Apparently Acquia Dev Desktop did all this for me. Now I have to do it myself. It is very frustrating.

Here is a screen image of some of the stuff displayed by phpMyAdmin.

This message has an attachment image.
Please log in or register to see it.

Please Log in to join the conversation.

3 years 8 months ago #125740 by Daniel Pickering
Replied by Daniel Pickering on topic How to access local Drupal 7 site with XAMPP
Hi Sam,

'username' => 'admin',

Is the username for phpmyadmin root or admin because it is usually root? If that is the case edit your file to 'username' => 'root',

Thanks
Daniel

Please Log in to join the conversation.

3 years 8 months ago #125755 by SamStamport
Replied by SamStamport on topic How to access local Drupal 7 site with XAMPP
That did not solve the problem.

I've decided to give up on XAMPP. I will completely wipe it from my computer, reboot, and try MAMP instead. I found a nice blog about it here www.ignoredbydinosaurs.com/posts/278-installing-drupal/ . Do any of you have experience with MAMP?

If MAMP does not work I'll try Arvixe.

Sam

Please Log in to join the conversation.

3 years 8 months ago #125759 by Nick
Hi Sam,

Most of us use MAMP on Mac and don't have issues with it. From what I've seen the Windows version of MAMP has been reliable too.

Kind regards,
Nick

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!