Moved site to new drive, DB won't work with old drive removed - mamp

I have a site in MAMP-PRO for windows (installed on C drive) that I need to move due to a failing drive (F drive). I have moved the site folder to the new drive (N drive) and changed the path for the host in MAMP settings and restarted the servers - everything works fine. When I remove the failing drive, I can not get the site to connect to it's database (regular sites, HTML/PHP only, work fine), but anything database related (like wordpress) just tried to load indefinitely. When I put the failing drive back in - everything works again. I have validated that even with the failing drive in, changes on the new drive are what is reflected in the browser, so I know that the host file and document root changes are working, it's the database connection that seems to be the issue. I have no idea why this would be. Any suggestions?

Solved. Caching plugin in Wordpress was the culprit.

Related

Powershell copy vs move cmd

I'm running into some issues with my existing powershell script that copies data from a remote location into a local folder - that local folder also happens to be sync'd with google drive for desktop.
I'm seeing incomplete files being uploaded etc. In order to combat this I think it would be easier/better to change where the initial remote > local is putting its files, and instead of copying directly into the sync folder - copy into a temp/staging location that's NOT the sync folder.
Once that process is complete then use the powershell move-cmd to simply 'move' which will just update file locators to be that of the sync folder.
I think this will solve my issue.
Anyone see any problems with this approach?
If you have ruled out device connectivity, multiple files being uploaded at once vs. a single file being uploaded, and mobile device app or internet browser there is nothing wrong with your approach. If you need anymore assistance please reply to this thread or mark this as the answer.

Synology DSM6 versus Slim Framework

I try for a while to make Slim Framework working on my Synology (DSM 6.1.3-15152 Update 1).
I already played with Slim in the past so I thought that will be easy... but nah... can't make the routing work. Always get a 404 except for the root.
I did make my .htaccess file correctly, but I can put anything in it the website just act as if the file was not there.
So it must be the AllowOverride All the problem...
and here I am : tons of .conf and other files that look like what I need but every time it don't work.
I'm not even sure to know if I have to restart something after editing / creating a someting.conf in some site-enabled folder.. so I restart everything. (webStation + apache server) and it take a looOong time to restart...
I try to make it work with WebStation + Apache Http Server 2.4 (as making it work with nginx look like even more complicated). The website is a virtualhost on port 7878...
I can access my Synology using ssh... so if someone know how to do it I will be glad. I loved Slim framework in a past project and I would like to use it again but man...
Thanks.
This is dumb. I use a tool to sync my local files to my Synology. This tool always told me "everything sync successfully"... I just realized, this tool do not sync file that start with a "."
I was using Cloud Station Drive to sync my files and by default the option to sync file starting with a "." is disabled. I realized it by going straight in the folder using ssh.
I created manually my .htaccess file and now everything work.
I leave it here in case someone get the same stupid problem...

Fail to access Modx Manager from a different computer. Says password and username are incorrect

I am new to Modx. I successfully installed and set up Modx on my laptop on localhost using xampp. However I would like to work on Modx on my desktop. I have copied over the htdocs onto my desktop. And have set up my database identically. When accessing Modx Manager, my username and password is said to be incorrect. I am using the same username and password and it works on my laptop (I have checked for typos). I do not understand why I am unable to log in. Can someone guide me so I can successfully work on my Modx on my desktop computer?
Often a stale session from your browser can prevent login. Try logging in from an incognito window.
Also, did you ensure that the MODX install on your desktop has the correct paths in config.core.php files? There's one in your document root, one in your manager folder, and one in your connectors folder.
Furthermore the paths and DB connection info need to be environment specific, in {core_path}/config/{config_key}.inc.php
When you migrated the site to your desktop, did you run the setup program again? Often that helps to fix paths, but you need to normalize the config.inc.php file first.
If you can access the database directly, you can change the hash_class value for your user in the modx_users table to hashing.modMD5 temporarily so that you can manually enter an MD5-hashed password. Maybe there's an issue with the PBKDF2 on your desktop local environment.
Some ideas to try, anyways.

Netbeans Remote Synchronize doesn't list files when a subdirectory is used as upload directory

I've setup several sites previously to use Netbeans Remote Synchronization so I can edit files on the server from my machine and it has worked perfectly.
The problem I'm having right now is that when my FTP configuration in Netbeans uses the root folder it lists everything correctly but when I use a sub directory for example website.com/subdir as the upload directory or as the FTP initial directory the sync results come up blank - doesn't list anything at all on the remote side except directories in that sub directory.
My PC is a windows 7 64 bit machine, and the server is a standard shared hosting account running CPanel.
Also, I have been able to run the subdir synchronization on a different pc, could it be the firewall on this one? If so, why does it list the root folder properly?
Has anyone else had this issue? Any suggestions on how to fix it?
Thanks.
found the problem. The FTP path on this PC required the /public_html before the subfolder paths. i.e. essentially ftp://mydomain.com/public_html/path/to/subfolder
This wasn't the case on my laptop as I used the subfolder path right after the domain i.e. ftp://mydomain.com/path/to/subfolder and it worked fine, different versions of netbeans perhaps.

how save file on server using HostingEnvironment.MapPath()

in this code iam trying to save text document on server / wwwroot folder. nothing happens :(!
if i am working on localhost and doing the same routine like this, everything works fine and i can save text document on local pc.:
If the same code works in your Dev machine and not working in Production, It should be folder Permission issue. I guess you have to change the folder permissions in server so that ASP.NET can write to that directory.
Checkout this link which explains how to do that.
Make sure you are not giving Write/Modify Permission to "Everyone"