Install wampserver locally but store files on LAN? - wampserver

I searched and found a lot of questions relating to sharing my site on the LAN or accessing a WAMP on the lan. I want to be clear:
I use WAMPserver 2.5 for local development so I want it on my Windows PC and I'm not sharing it with anyone. But... I want the actual files to be stored on my \SERVER share for purposes of backup. I can't seem to figure out how to tell WAMPserver to do that. By default, it installs in C:\wamp and puts a www folder in that directory and looks for everything there.

Click the WAMP icon in the task bar, then open the httpd.conf file under the Apache directory. Find the DocumentRoot setting, which is currently c:\wamp\www, and change it to your desired directory. Then, a few lines further down, do the same with your Directory setting. Save the file, and restart the WAMP server.

Related

How do I implement XAMPP and Docker side-by-side in Windows 10

I recently ran into the issue where I was working on two Laravel projects: one using Docker, the other using XAMPP. I started my Docker project earlier, so I gave it access to port 3306.
When I went to implement the XAMPP project, I tried editing all the DB settings in the proper places to use the port 3308 so that it didn't collide with my DB docker container. Problem was, now I couldn't connect to phpMyAdmin. I was receiving errors that the settings were incorrect. So what was the solution?
The solution was to reset all of my settings to 3306, docker-compose down my Docker project, and then restart the XAMPP services. Worked like a charm.
So I'll note a couple things:
It seems like phpMyAdmin assumes it has access to 3306 even if you've changed your settings in config.inc.php.
Unrelated to this precise problem, I discovered that XAMPP's PHP version was different than what was installed on my Windows machine, which meant that I had two php.ini files. My php-cli was using the C/Program Files/PHP/php.ini, whereas XAMPP was using the XAMPP php.ini. While the XAMPP php.ini had the correct extensions uncommented, I needed to manually uncomment the appropriate extensions in the php-cli ini file. If you have xampp, go to the command line and use php --ini to check where your CLI ini file is located.
I suggest to try devilbox
The Devilbox is a modern and highly customisable dockerized PHP stack supporting full LAMP and MEAN and running on all major platforms. The main goal is to easily switch and combine any version required for local development. It supports an unlimited number of projects for which vhosts, SSL certificates and DNS records are created automatically. Reverse proxies per project are supported to ensure listening server such as NodeJS can also be reached. Email catch-all and popular development tools will be at your service as well. Configuration is not necessary, as everything is already pre-setup.

How to change file permissions in localhost Windows 10 pro/docker/ddev container for Drupal site?

I have installed a drupal 8.8 site using Composer on a Windows 10 pro system and docker and ddev as the development environment.
The drupal site seems to be functioning normally: I see no errors in the drupal log nor when I run ddev describe.
The only exception: Drupal gives me a warning that sites/default/settings.php needs to be write protected. In the past I have done this on a live site using Filezilla, but this is a development only site and it seems Filezilla does not apply permissions on local files--at least, when I right-click the file locally, I do not find a command for changing permissions.
I tried changing the write permissions with Windows 10 itself, but that did not seem to have any effect--I suspect for windows those are different kinds of permissions.
I poked around online and saw something that made me think I could use phpmyadmin to change permissions. Got caught up in that and struggled with it, until getting some help here (How to access phpmyadmin on DDEV Windows 10 pro localhost with SSL record too long error) but it turns out you can't change file permissions with phpmyadmin, apparently.
I tried to use the address that connected me to phpmyadmin in my browser to connect with Putty, but Putty tells me the host does not exist.
So the help I am looking for: how can I change file permissions for sites/default/settings.php in Windows 10 pro localhost running docker/ddev development environment for my drupal site?
Thank you!
I assume you're talking about this warning?
First, you can ignore this warning completely. You're on a local development environment, and so you shouldn't have any concerns about the permissions of settings.php.
Unfortunately, in a Windows environment, you can't make simple permissions changes as Drupal 8 is suggesting that you do.
Note that settings.ddev.php explicitly provides the skip_permissions_hardening option, $settings['skip_permissions_hardening'] = TRUE; to tell Drupal 8 not to try to change permissions on sites/default and sites/default/settings.php because it's just a dev environment and because when Drupal does these things it just makes things harder.
However, to make most things easier on Windows (doesn't solve that problem)...
Use nfs_mount_enabled
I see there are loads of problems with the new "official" Drupal 8.8.0 composer build on Windows. Most of them are due to the composer build making some assumptions about the ability to set time and ownership, but the docker mount used by default (CIFS) has everything owned by root, so the container can't change permissions (even thought they're wide open).
I found that I could get by all of these things by using NFS to mount into the container, and you'll also find it improves performance quite a lot. Set up for NFS by following the instructions at https://ddev.readthedocs.io/en/stable/users/performance/#windows-nfs-setup

PhpStorm SFTP won't write to remote host (AWS EC2)

I was able to connect SFTP to my AWS EC2 instance, and I can see all the files and browse through them, open them up in PhpStorm etc..., but when I make a change and save any file in PhpStorm, then refresh the page on my browser the change doesn't show up.
It works if I physically do it in VIM, but PhpStorm SFTP is not writing my changes to the remote host
Is there an extra configuration step I need to do to get it to write to the host as soon as a file changes?
One thing I did notice - If I choose the menu options Tools | Deployment the options to upload are greyed out.
Any help is greatly appreciated.
Ok so the answer is that the files were under a different ownership.
So I had to go to the root and execute:
$ sudo chown -R ec2-user:ec2-user *
And that worked.

wampserver tray icon is missing [duplicate]

This question already has answers here:
Re installing Wamp Server without replacing the existing mysql database
(2 answers)
Closed 4 years ago.
I have had wamp server 2.2 installed in c: drive, (Windows 7), running Apache 2.2.9, Mysql 5.5.24 and PHP 5.3.1.
Then I re-installed it in another drive (d:) and transferred the data and www directory code there.
It worked ok for a while, with the localhost sites running perfectly, etc., but after a few days, the tray icon stopped displaying in the taskbar, when I run 'start Wampserver' in Start menu. Also, 'start Wampserver' shortcut icon is missing as well.
When I run it from the Start menu, I can see wampapache service running in the Services list, but wampmysqld is stopped. I can start it manually though, so eventually, wamp server runs ok, but with the tray icon in the taskbar missing and evidently, without having access to it's menu.
Also, when this issue first appeared, I noticed that 'wampmanager.exe' file was missing from wamp root directory and I needed to re-copy it there.
Is there any way I could retrieve the tray icon back without having to re-install wamp server again?
Ok quite a bit of confusion here!
First it is not good to try to install WAMPServer more than once on the same PC. The second install will work and become the installation that is used but a few things go wrong.
The start menu and desktop shortcuts to start WAMPServer will probably still be pointing to the folder from the first install. So these probably disappeared when you eventually deleted the old C:\wamp folder.
You can re-create these very easily by going to D:\wamp\ and making a shortcut of wampmanager.exe and putting that back onto your desktop and into the start menu.
Once you have these back, all should work again as you expect.
Please check if "barimage.bmp" image is missing.
If missing please download it from >>>https://www.uploady.com/#!/download/8cG1gif5Y1E/gXfCRpWrU0qfo0g8
and save it to wamp folder.
And try again. Hope this will help you.

Get old wamp installation data to work on new computer

I'm having a big problem with my wamp server for some months now.
I've developed 6 sites locally using wamp server. I had a problem with my computer and copied all my site directories to a hard Disk.
I got a new computer with W8.1 on it and copied back the wamp-folder. I tried to lunch it, but its not working. So i've installed a new wamp server. But i've no idea how to import my site from the old server to the new.
My first problem is that I can't get my old site running on the new wamp installation. I did not save my databases before my computer went down.
But I thing I can find it on the mysql folder from the old system backup. Where and how, I've no idea. So I would like to take my sites from the old wamp and installed it on the new one or get it to work on the new wamp. I've already googled for one month now but I could not find any solution!
Option 1. ReCreate the old WAMPServer on the new PC
If you have the complete directory structure backed up from your old PC then you can just copy the complete folder structure from your backup to the new PC.
Make sure you put it on the same disk and folder that it was originally installed on, so if it was originally installed in C:\wamp make sure you copy it back to that folder.
Launch the wampmanage.exe from that folder ( C:\wamp\wampmanager.exe )
Using the wampmanager menus do
left click wampmanager -> Apache -> Install Service
left click wampmanager -> MYSQL -> Install Service
WAMPServer should now be as it was before your problem
Windows 8.1 has a blank C:\windows\system32\drivers\etc\hosts file, so you will also need to add all the domains for any Virtual Hosts you had created, but at a minimum it should have these entries.
127.0.0.1 localhost
::1 localhost
Option 2. Add your old Apache/PHP/MYSQL to the new installation of WAMPServer
Remember, one of the big advantages of WAMPServer over other Windows AMP stacks is its ability to have more than one version of each of Apache/PHP/MYSQL in the same WAMPServer instance ready for easy switching between verions of all of these.
So you could keep the new installation and selectively copy over the Apache/PHP/MYSQL versions and then copy over your 6 sites.
So STOP WAMPServer
copy the OLD \wamp\bin\apache\{apacheversion} folder to NEW `\wamp\bin\apache\
copy the OLD \wamp\bin\php\{phpversion} folder to NEW `\wamp\bin\php\
copy the OLD \wamp\bin\mysql\{mysqversion} folder to NEW `\wamp\bin\mysql\
Restart WAMPServer
You should now see that the old and new version of Apache/MYSQL/PHP are available.
Now copy your OLD \wamp\www\??? site folders into NEW \wamp\www\??? and your 6 sites should also be available.
Now you can switch back to the old versions of Apache/PHP/MYSQL and run your sites like that, or backup you databases properly using the old MYSQL version and then restore them to your new MYSQL version
You switch versions using the wampmanager menus like so:-
wampmanager -> Apache -> Version -> (click the required version number )
wampmanager -> MYSQL -> Version -> (click the required version number )
wampmanager -> PHP -> Version -> (click the required version number )
Six years later, I just resolved this exact same problem. I tried #RiggsFolly's solutions to no avail. Reading logs to try debugging this whole mess became tedious real fast, especially if the paths between the old and the new installations don't match anymore.
Considering a new clean wampserver installation and an old wamp(64) directory from somewhere else:
First, export your mysql's databases.
To do that, use the command line to reach C:\path\to\old\wamp\bin\mysql\mysql{version_number}\bin and start the mysql server with the mysqld command (when you are done exporting, use mysqladmin -u {user name} shutdown). Now, export your databases with mysqldump or any other method you will find around and re-import them inside your new installation.
Transfer the folders of your projects inside www from the old to the new installation.
Recreate your virtual hosts by pointing the paths out to the related pasted folders inside www.
There you go. This way, everything was cleanly imported and you don't have to worry about a dirty setup which will bug at some point.
I hope it helps someone else.

Resources