TYPO3 RealURL does not work after Backup - http-status-code-404

My RealURL path segments do not work anymore since a Backup.
I had TYPO3 7.6.10 on my Windows PC.
Then i installed TYPO3 7.6.11 on my new Mac.
I made a dump file of the database and copied all files of my TYPO3 Project.
After finishing, I could successfully login into the backend.
The only problem I have is, that my RealURL does not rewrite my paths anymore.
Actually my first page is called localhost/project/home/ instead of localhost/project/index.php?id=2.
However, the first one always ends up in a 404 - Error.
I don't know why that happens, since i also copied the _.htacces file in the project folder too. Or is that not the right way to back up?
Hope someone can help me.
EDIT
Problem solved: Since OSX is hiding some sepcial files like the .htaccess, i had to make them visible so i could copy them. Now everything is working as it shall!

Problem solved:
Since OSX is hiding some sepcial files like the .htaccess, i had to make them visible so i could copy them.
Now everything is working as it shall!

Related

My installed WPF app is crashing while trying to create a file

I have a problem with my WPF application (a simple clicker game). I've just made a deployment/created a setup project using Microsoft Visual Studio Installer Projects extension for Visual Studio. Everything seemed to work fine, setup works good (tested on other computer) and furthermore the installed application almost works correctly. The only exception is a button calling function which is creating a new txt (something like a draft of a "save" file) file in a folder where the application is installed. Clicking this button cause instant crash of the whole application. Nothing else happens, no error message, the app just turns off.
I assume that the problem lies in access rights to the folder/administrator rights.
I've added txt file with the same name in the application folder using "File System" window in setup project, deployed and installed again. Even when the file exists the problem happend again (probably because of access rights when trying to override file content).
It's may be important that everything worked while running app through VS, also using .exe works fine on any computer. The problem is only with application installed using setup.
I'm not sure where the problem is so it's hard to show some code, to be honest i'm not even sure if it's a problem with code, maybe it can be solved with setting some setup project properties?
I would like to store some data locally between two sessions, i've choosed txt file because it's light and simple even if it's not the most elegant way.
I expect that installed application will be able to create and override txt file in it's folder.
P.S. if you need any code, screenshots or information about my setup please let me know in comments section, I will provide what's necessary
At the moment you install your program you're having administrator-rights. So the folder where your application is, also was created with administrator-rigths.
If you want to store data to this folder, you'll have to run your application as administrator. (not the best idea)
Otherwise you can change your code to write your file at runtime to a different location where you don't need administrator-rights.
For example:
string path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
will give you: "C:\Users\MyUserName\AppData\Local"
string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
will give you: "C:\Users\MyUserName\AppData\Roaming"
string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
will give you: "C:\Users\MyUserName\Documents"
And some error-handling around the saving of the file would be very nice and helpful ;)
Thank you everyone for solution and knowledge, the problem was as I assumed (access to the path denied).
I was using this code to create a path:
Directory.GetCurrentDirectory() + "\\SyntyhCitySave.txt";
Creating a file in a special directory instead of application folder works, that's the solution for my problem:
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\SyntyhCitySave.txt";
Tomtom answer marked as accepted.

Lost code lines when Notepad++ crashed

I was working on a .js file this morning on Notepad++, as usual, when the program just crashed. So I ended it, and re-opened it to see that all my code lines in my .js file, had disappeared, and now all I have left is the file with a size of 0kb because there's nothing left in it. How the hell is that even possible ? It erased everything I typed and saved the file as if there's nothing in it.
Do you know a way to get my code back ? Or did something like this ever happened to someone ? :/ I'm kinda worried because there was a lot of work there and I don't feel like re-typing it all...
When that option is enabled (and it is by default), Notepad++ keeps a backup copy of files you edit.
You can find the backups in the directory %APPDATA%\Notepad++\backup under the format filename#datetime.
I lost four unsaved files when my Notepad++ crashed, I searched through net and found another way to retrieve unsaved files other than backup folder
C:\Users\{username}\AppData\Roaming\Notepad++\backup
Hope it can help others who face the same problem as me. You can try to locate the dump files at
C:\Users\{username}\AppData\Local\Temp\N++RECOV
There will be .dump file inside, this is where I found my unsaved files. You can open the dump file with Notepad++, and see your unsaved works.
This has happened to me a few times lately and I've found a few solutions that make it possible to recover the lost code.
For Windows 7 and probably other modern Windows versions:
Find the file in File Explorer. The size will be 0KB. Right click on it and then choose Properties from the context menu.
Choose the Previous Versions tab. There's a good chance you will find a fairly recent version saved during the latest Restore point. If it's a bit old, it's still probably better than the current 0KB.
Click the Restore button.
My personal optimal solution:
Since this happened to me a few times and the Windows Previous Version was not always up to date, I looked for a different solution that could always give me the latest, most up-to-date version before the 0KB crash.
I discovered that I already had the solution installed on my computer. I have a SugarSync account that always backs up my work files to the cloud. The great part of the service is that SugarSync always keeps the last 5 versions in the cloud, so while the current version will be 0KB, you can download the next to last version and update your file on your computer.
If you have some other backup program, you can check if that service also keeps different versions that you can recover.
I've used notepad++ without any backup for years. One day this happen to me, too.
Here is what I've found as possible solutions:
http://buffernow.com/notepad-plus-crash-recover-your-lost-file/
(similar to Indrajit answer) - not much help. I didn't find my file there.
I have recovered my file one week ago as per answer of Hvck
Same problem here. Same answers:
https://superuser.com/questions/390204/how-to-restore-a-previous-version-of-file-in-notepad
One lesson learned: Use the backup!
use a plugin:
http://www.ilovefreesoftware.com/12/windows/two-plugins-auto-save-files-notepad-auto-save-autosave2.html
use notepad++ backup
http://allinworld99.blogspot.ca/2015/01/notepad-backup-files.html
** UPDATE **
It happened to me again!!! Another way to recover my file: View source on my browser and resave the file to other location. If you are lucky enough to have the file loaded in your browser :) It worked for me for a css file and for a js file.
Comparing the files: what N++ backed-up and the file from browser and files are matching. OMG!
GO to Taskbar click and run %APPDATA%, click to Notepad++ click to backup.
Your files saved by filename.extensionname#year-month-date_time
I know it's too late to answer this, but maybe my answer will help others.
I've encountered the same problem recently. Then it became regular. I did not find a solution to the problem itself, plus it may be caused by many different reasons, so probably no universal solution exists.
However, there is a way to save your files while notepad++ is not closed. Even if the backups folder is empty.
First of all, do not close notepad++. Open a taskmanager, find the notepad++ process and locate the Dump or Create dump file option. Click it. This will create a whole memory dump of the process. This dump will contain the documents you had opened. However you may need to find this data, plus it may be in a different encoding. I guess it is in UTF8 most of the time, but I am not completely sure.
The dump file can be examined with simple programs like notepad++ itself or with a hex editor.
Notepad doesn't auto-save its open file so unfortunately you have lost your work.
On next time you can use Notepad++ it retrieves file automatically
Refer this link may it help you Notepad++ recovery
I tried all the above solutions but nothing was working for me.
But luckily I have opened files one day earlier in eclipse as well. Eclipse and all other IDEs maintain a cache of all the files. You can get the copy of the file from that cache. To get copy from the eclipse.
Right Click on the file Name
Go to Replace With - Previous from the Local History
This answer applies to more recent versions of NotePad++:
Go to the folder of the file, see if there is a subfolder called nppBackup. Recently I've found sometimes the backup wasn't created in %AppData%/Notepad++/backup but it always seems to get created here, with the following file name format [original file name][date stamp]_[time stamp].bak

NetBeans deletes my resources when cleaning or renaming the project

I have been having a troublesome issue working with NetBeans:
I have a program which uses big amounts of images, text files and sounds. I place them all on a "resources" folder inside the "build" folder. I have read that is the right way, since NetBeans uses this folder as "root" for the project. The BIG problem comes when I press by mistake "clean and build", or rename the project, since both actions ERASE THE WHOLE build directory. When this happens, I lose all of my data, and have to start over editing images, etc. Please notice that I make backups, but I still have to start over since last backup (the image files are changed very frequently), so this is not a definitive solution. Since this is a long-term Java project, it has happened several times, and it is very frustrating.
Is there a way to place my resources on a directory OUTSIDE of my project folder? In case there is not, can I somehow configure NetBeans so it places the deleted files somewhere (like trash bin or somewhere else)?
If it helps, I'm working under OSX system, but I think the same would apply for other operating systems.
I have seen similar questions have been posted, but not solved. Please help!!
I finally worked it out!
If you put the resources directory under the src folder of the proyect, when you clean and build the project, NetBeans will make a copy of this for you, on the build folder. This is not intuitive at all. I would still like to know if it is possible to access any folder out of the project folder, like the Desktop for example.

Sublime Text 2 - Files won't update

When I add files via the terminal, Sublime doesn't seem to pick up the changes. I have to remove the project and re-add it to sublime for the files to show up. Does anyone know of a solution to this? Thank you in advance.
I had the same issue. I'm not entirely sure what exactly caused it, or how this resolved it, but I opened the project up and removed all folders from the project. I quit ST2 and opened it back up, then re-added the folders. Since then everything works fine, files update, and I'm once again to get saved changes to overwrite files on the local filesystem (it wasn't doing that before either).
I've shut it down and started it back up repeatedly, and was able to confirm every time that it was picking up new changes I had made to some files via vim.

Cannot delete, a file with that name may already exist

This is starting to vex me. I recently decided to clear out my FTP, and stumbled across an old Wordpress install I forgot I had (oh yes, very security conscious me). Anyway, for some reason deleting the directory failed so I investigated to see what was causing the blockage and I've narrowed it down to a file in wp-content.
Now when I try to delete this file I can get two errors. I've tried in Windowx Explorer (FTP) and the Web Control Panel's File Manager. Here's some error shots:
As you can see my File manager thinks the file is a Symbolic Link. While it scares me that
my web server is host to an obviously religoious artifact I'm also heavily confused by the situation.
I've tried renaming the file.
I've refreshed the FTP view.
I've tried moving the file to another dir (which worked, no success on deletion though).
I've tried editing the file and then deletion.
And I'm at a loss. Is there a special way to delete SymLinks? I've never heard of them, until now.
edit
Oho Windows you really are a magician of sorts. I decided to take a look at my FTP via command prompt and guess what? The file doesn't exist. Whether ftp ignores symlinks I don't know but I'm about to give up :P
First of all, try emailing your webhost either for SSH-access or to remove the symlink for you.
If you get SSH-access, use:
unlink index.php
Or if neither works: Create a PHP file there (for instance remove.php) that contains:
<?php unlink("./index.php") ?>
Then open that file in your browser, afterwards remove the remove.php file.

Resources