How to try to understand why the connection to hosts in PhpStorm occurs? - ftp

The situation is as follows: everything worked perfectly, PhpStorm worked without problems with FTP on the Remote Host tab. But at some point, it suddenly stopped doing it and when I open the project and try to view the contents of the host(s), this happens:
I can not click the [...] button to check the host(s) settings. If I connect to host(s) through another ftp client, everything works fine.
Question: how do I understand what the problem may be, and eliminate it?

Based on your idea.log file the issue seems to be with KeePass file that IDE is uses to store your credentials (logins and passwords). You can check the path to that file at Settings/Preferences | Appearance & Behaviour | System Settings | Passwords
It's either inaccessible (has access permissions issue .. or wrong Master password) .. or is somehow corrupted.
Try this: close IDE, go there, backup that file (just in case) and try to open it with some another program that understands such KeePass format. That's to see if it's good inside.
If it's bad/cannot be used -- just delete it and IDE will create a new one on next launch.

Related

Directly edit files of an FTP server using Atom

I have tried time and time again to get remote-edit working within atom. I have added my known working FTP server, click on the Browse Hosts button, and attempt to connect. I am 100% sure the username and password are correct. I don't know what kind of data to provide, other than it worked once, but has never worked again.
From a look at the source, remote-edit prints all errors to the console. To open the console, open the View menu, then browse to Developer and click Toggle Developer Tools. Or use the shortcut CmdAltI (it's probably CtrlAltI on Windows.) This should help finding the cause of your problem.

SFTP in Sublime Text 3 not working

I'm having the strangest problem.
On a fresh Sublime Text 3 installation, I'm trying to get SFTP (wbond) to function.
I've tried following the documentation, but can't get it to work. I've followed this to a tee, but for some reason my installation acts differently to the same input.
I've installed package manager, sidebar enhancements and SFTP from wbond.
In the linked Youtube video, when he goes to "browse" an FTP server and there isn't one setup, it jumps to a new file automatically where he can input his data. Mine just pastes the content of this file directly into the document I'm in.
If I create a new document, go File > SFTP/FTP > Setup Server... and input my FTP data (that works perfectly fine in clients such as Filezilla) and save, nothing happens.
If, afterwards, I go File > SFTP/FTP > Browse Server... I get a popup asking me to setup a new server, even though I just did.
I feel like I'm not seeing the forest for the trees here, and I'm probably missing something simple.
Any help you can provide is greatly appreciated.
File turns out needs to be saved in
%USERPROFILE%/AppData/Roaming/Sublime Text
3/Packages/User/sftp_servers/
folder.
It can be accessed in Sublime 3 clicking Preferences->Browse packages...

How to automatically FTP files that I am editing

I'm trying to figure out how to autoftp with Filezilla. Are there any other programs that do this right off the bat?
I use WinSCP for some of its amazing benefits. I connect to my FTP server with WinSCP and let it monitor my local folder /website/public_html.
Any changes I make in my local folder automatically get uploaded to my FTP server by WinSCP. The feature is called Keep remote directory up to date:
http://winscp.net/eng/docs/task_keep_up_to_date
As for SCSS, I also use it:
I have a script that opens a console window to watch my /website/scss files and compiles them to /website/public_html/styles/. WinSCP sees the CSS file has changed (or is new) and automatically uploads it.
Notice: The only downside is you cannot reach your error_log as that is automatically generated on the server by PHP. To do this you can easily instantiate another WinSCP to connect to your website. Now you have 1 WinSCP monitoring your local folder and 1 WinSCP where you can access your site map.
If by "autoftp" you mean "update the file on the server whenever I save it" and you're working with code, then I'd recommend the wonderful Notepad++
Notepad++ certainly is wonderful for this particular function and it even saves a cache of the whatever has been accessed and modified from the remote server.
The downside however (for me) is that Notepad++ will not auto-upload preprocessed CSS files like .scss or .less. I tried actually opening the resulting .css files in Notepad++ to mimic the act of editing them, but that still puts an extra step in the process. I have to click over to the tabs and manually save them (after the 'your file as changed prompt').
Currently, after I make changes, I click over to FZ and upload the files manually.
This response is late, but hopefully it will be helpful to those looking to get past Filezilla's "do you want to overwrite" prompt every time a file being edited locally is saved. Unfortunately, the Filezilla developers are staunchly opposed to making this behavior optional. It is a problem for many, especially when working with limited desktop space, since every time the prompt appears, one must expose the hidden filezilla window just to click okay.
Anyway, the answer is WinSCP. It is also free and is so similar to filezilla that I needed no learning to use it immediately.
Cheers!
There is an easier way to do that with NetBeans IDE, there is an option to upload files with FTP or SFTP on save, manually or on Run
Right click on your project and click Properties
Click the second category run configuration
Run As: Choose Remote Website (FTP,SFTP)
Project Url: put your website live link eg www.example.com
Upload files: Choose On Save
Remote Connection > Manage > Add > Connection name (put one) > FTP
Now add your ftp details. Make sure your Initial directory path is correct, (your website path) so you will not accidentally replace any files from other website in the file manager
Unfortunately there no option on filezilla can auto agree upload when file has been changed.
Mobaxtern can do that. You can choose "always upload" when file has been changed.
You can edit the file with any editor, whenever you save, it will upload.
I like to use WebDrive ($40) which mounts a remote server (S)FTP/SSH/Cloud to a local drive (eg. X: on Windows). You can then just do everything to drive X: as if it's a local drive and WebDrive automatically uploads the changes to the remote server.

IIS Express 8 - Cannot write configuration file

I am trying to use IIS Express 8 for a MVC site in VS2012. I am getting the following error whenever I attempt to create the site:
Filename:
\?\C:\Users\xxxxxx\Documents\IISExpress\config\applicationHost.config
Error: Cannot write configuration file
Is there some way to force IIS Express to use a different location for the config & logs folders? I understand I can point to a different location when I am running iisexpress.exe from the command line, but I have no control over this when using Visual Studio.
Alternatively, has anyone got any suggestions why the error is happening? (Side note: My laptop is in a corporate environment which has some stupid encryption on the "Documents" folder, however I haven't had any problems with other software that saves to this location. I also have given the "Everyone" group full access to the folder.)
EDIT - After following the instructions at http://learn.iis.net/page.aspx/1286/iis-80-express-readme/ I still can't seem to get this working. I've tried the following:
Added HKCU\Software\Microsoft\IISExpress\CustomUserHome registry key pointing to my alternate directory
Added HKCU\Software\Microsoft\IISExpress\8.0\CustomUserHome registry key pointing to my alternate directory
Added HKLM\Software\Microsoft\IISExpress\CustomUserHome registry key pointing to my alternate directory
Added HKLM\Software\Microsoft\IISExpress\8.0\CustomUserHome registry key pointing to my alternate directory
Setting the %IIS_USER_HOME% environment variable pointing to my alternate directory.
Any other suggestions?
#Brad
I had your same problem just now. Removing the encryption on the IISExpress folder and the "Read Only" attribute solved it. In my company Documents is also encrypted, but I don't think removing that encryption from IISExpress would be a problem of any sort.
Hope this helps.
I had a very similar error message caused by a completely different problem.
The Error:
C:\VS\TFS_Projects\SomeSolution\SomeProject\SomeProject.csproj : error : Creation of the virtual directory http://localhost:55063/ failed with the error: Filename: \\?\C:\VS\TFS_Projects\SomeSolution.vs\config\applicationhost.config
Error: Cannot write configuration file due to insufficient permissions
More Details: I couldn't even open the project, as opening it would fail.
I could get prior changesets, and they would actually open fine, but if I got latest the projects couldn't be opened.
Solution: In my case, it turned out that when we changed TFS servers, someone had added the ".vs" folder to source control along with everything else. Under which, one developer had his applicationhost.config set up to run sites on a D:\ drive, while I had no such D:\ drive (well, it was a DVD drive.) I was able to get this working by finding a prior changeset with the un-altered applicationhost.config and replacing my local file. (I could have attempted to actually delete the folder, but I didn't go that route.)
Afterwards, we removed the ".vs" folder from source control.
(I put this solution here because it's where google landed me, so other people having this error message might find the above solutions don't fix it for them, and thus they might be having this problem.)
I'm also in a corporate environment with Encryption on the users folder, and removing encryption and removing the read only flags on everything in the IISExpress folder worked for me.
I'm using Visual Studio 2017 on Windows 10 and to fix this problem I had to disable the OneDrive setting "Save space and download files as you use them". After changing the setting my computer crashed but after rebooting I was then able to change SSL Enabled and everything worked.
For anyone googling this; this might be the same problem as this: http://connect.microsoft.com/VisualStudio/feedback/details/878812/use-iis-express-is-broken-in-vs-2012-on-windows-8-1
You can check it by downloading Prcocess Monitor and run it with a filter for "Path" contains "\Documents\IISExpress\config" and then try to change the project to use IIS Express. If there is a CreateFile entry with the result 0xC0190052 as one of the last entries then this is the same issue.
After struggling with this, and verifying encryption and read-only attributes, and having them not work, my solution ended up being:
Navigate to the folder containing the IISExpress folder (in my case, it was in my OneDrive, not Documents folder)
Right click on IISExpress folder > Security tab > Advanced button
Change Owner to yourself, even if it already is
Check the "Replace owner on subcontainers and objects" box
This may not appear until you've completed the Change owner dialog
Open the IISExpress folder
Right click on config folder > Security tab > Advanced button
Add a user > Add principal
Change location to local machine (and not a domain)
Enter the name NETWORK SERVICE and "Check Names"
Press OK to get back to the Advance Security dialog
Make sure to check "Replace all child object permission entries with inheritable permission entries from this object"
Worked in Windows 10 with IISExpress 10, for both VS 2013 and VS 2017.
C:\Users\xxxxxx\Documents\IISExpress\config\applicationHost.config
Uncheck the read-only attribute from the file. It worked for me.
Adding the registry entry seemed to work, however, using environment variables in the registry entry did not. In my environment only our documents directory is redirected, so I simply wanted to move the IIS Express config directory up one level to the %USERPROFILE% directory. However, that did not work. IIS Express read the environment variable literally and of course failed to run.
I had the same issue before, running VisualStudio as Administrator (Run as Administrtor) resolved the issue.
I also had the problem and tried to fix it with setting the registry key in HKCU\Software\Microsoft which didn't work.
The error I made, was using HKCU because, since I do not have permissions to edit the registry under by normal account (which I use to run visual studio), I was using an administrative account. Then of course, HKCU was for that account.
So I just used HKEY_USERS\"my normal user's SID" instead and, when starting iisexpress.exe manually, it created its files at the location indicated. What still didn't work was using iisexpress from visual studio. It still seemed that VS didn't use the registry setting at all.
Finally I resorted in setting a non UNC path for Shell Folders\Personal and User Shell Folders\Personal in HKU\"my normal user's SID"\Software\Microsoft\Windows\CurrentVersion\Explorer\ which did the trick.
I received the same error but in a different context. Opening a project (.csproj file) provided by another developer returned this error and failed to do anything:
Creating of the virtual directory http://localhost:58753/
failed with the error:
Filename: \?\C:\Users\xxxxx\Documents\Clients\xxx\Gen
II\xxx\,vs\config\applicationhost.config
Error: Cannot write configuration file
I removed both Encryption and the R/O attribute from the directory containing the project files and applied to all subfolders and files. Visual Studio can now read the project.
In my case I moved the folder to another location, so I had to edit the applicationhost.config file and changed the virtualdirectory entry to the new location. Removing encryption and setting read only off did not help. I imagine if I had just copied it instead of moving it, it would have happily continued working.

Can Notepad++ automatically upload local files to the server when I save?

I use Notepad++ with its NppFTP plugin. I am required to keep local copies up to date, so I edit the local files then upload them to the server. I'm wondering if there is a way for Notepad++ to automatically upload the file to the server as soon as I save it, without me having to press another button.
I'm open to using other FTP programs but I would rather stick with Notepad++ as the text editor
I know this question is slightly dated, but I would just like to put out there to alleviate future confusion for anyone who tries to find an answer to this question that as far as I know, NppFTP currently does this by default. There is a window beneath the main file view area that informs you of current FTP operations. Dreamweaver has started crapping out on me regularly so I had to find an equally powerful solution; it seems like Notepad++ just might be that!
Instead of trying to do this solely with Notepad++, I've gotten a similar workflow using Filezilla as well.
I set Notepad++ as my default text editor (Edit -> Settings -> File Editing -> Use Custom Editor) in Filezilla.
I can right-click on a local file (in Filezilla) and press "edit". Whenever I save the file in Notepad++, Filezilla detects the difference and prompts me to upload the file.
Will reply back to this post once I can get this process to be completely automatic.
Researching about same problem , i found from the Notepad++ Plugin Manager NppNetNote plugin. It allow you to edit both files at time (Local and remote) wich is like edit local and publish.
Edit: I'm sorry. Mistake. Now that plugin is called NppDocShare, and acts as server/client for a live document. You can edit a file from two locations (Notepad++ executions) at twice, but cannot edit two files nor emulates the autoupload.
I'd try the #Gabriel Ryan Nahmias and he's just RIGHT. The NppFTP plugin does that you wanna, but is a little tricky (obvious when you do) to configure.
By default, the program uses a variable path (Global cache: %CONFIGDIR%\Cache\%USERNAME%#%HOSTNAME%) to store the local copy that is uploaded at save. You need to create a pair folder when create a ftp CONNECTION PROFILE to say to NppFTP plugin how you wanna threat the file/connection. Otherwise, the ftp file goes to global.
Once the profile is created, i.e; C:\myfolder\ vs / (/ is relative to ftp) any file Edited or Created will be created/autouploaded to FTP at save. Also, you can open the FTP file, and it will be threated as the local one. Untill you save that, the real local file is not overwritten. If you dont like the file from FTP, simply close file and open from the local folder. So, you can chose which document wanna edit at start :)
Works Like Magic. Now im in love with Notepad++ :)
Extra: The subfolder creation is not magic. This only works from FTP to Local. You can edit a file from FTP subfolder and the folder plus file will be reproduced into local. No way to create from Local to FTP. You must create the ftp subfolder by hand :X (Unexpected)
You can manage files by two ways. Creating a profile per folder/proyect or create multiple local cache directories to a single profile. BUT, only the first one will be available (You will reorder it on each use). No magic here :( and it's more easy to create profiles and choose from the droplist at connect.
Anyway, i think the NppFTP is doing the things very well.
I had the same problem. Solved updating the NppFTP plugin to the latest stable version.
Cheers!

Resources