Eclipse Che failing to open file on restart - cakephp

I have started using Eclipse che to develop a app using CakePHP. However when I exit and come back to the project it comes up with an error
The file app/config/database.php could not be opened
and i can no longer see the file in the directory structure. Creating a file of the same name does not produce an error.
All this file contains is a class with an array containing the infromation about connecting to a database eg ip, username and password.

Related

Migrate files from drupal 7 to drupal 8

I have Drupal 7 website and i need to upgrade it to Drupal 8 i’ve followed drupal website documentation for upgrading to drupal 8 using web browser https://www.drupal.org/docs/8/upgrade/upgrade-using-web-browser#source-site
Now both sites installed in the same server with different domains.
When i added database access all data migrated successfully else the media files because I have an error in public file directory input  i’ve tried the following directories but each one return error.
1- When I added public files directory with the website address as https://drupal7migration.mydomain.com/sites/default/files 
Or
https://drupal7migration.mydomain.com/sites/default/files
the error was unable to read from public files directory. Client error 'Head  https://drupal7migration.mydomain.com/sites/default/files' resulted in a 404 not found response.
2- When I added the local file directory:   /var/www/vhosts/drupal7migration.mydomain.com/httpdocs/sites/default/files
Or
/var/www/vhosts/drupal7migration.mydomain.com/httpdocs/sites/default/files/public
Or
/var/www/vhosts/drupal7migration.mydomain.com/httpdocs/sites/default/public
the error was "unable to read from public files directory".
also the sites folder has 777 permission.
So, what’s the right public file directory that should be added to migrate both database and files successfully?
The files folder usually lives in :
/sites/yourSite/files.
Given the errors you indicated, it sounds like the “web server” doesn’t have enough permissions to the /sites/yourSite/files (read, write , and execute).
So determine the user under which your web server is running and make sure that use has enough permission.
See docs for more:
https://www.drupal.org/docs/7/install/setting-up-the-files-directory
Also, look at your web server vhost to get the actual documentRoot location.
I don’t think what you have is correct:
 /var/www/vhosts/drupal7migration.mydomain.com/httpdocs/sites/default/files
Is probably meant to be
 /var/www/vhosts/drupal7migration.mydomain.com/sites/default/files
Normally,
You have /
var/www/HTML/example.com
Point
to your Drupal install as:
/
yourDrupalInstall/sites/example.com
Or
 /yourDrupalInstall/sites/default
/files

Tizen cannot create file in native service application

I am developing a wearable application for Samsung Gear Fit 2 in Tizen 2.3. The app is hybrid type, where I need to write the sensor data obtained in native application into a file. However, file pointer is null and new file is not created. 'errno' shows the message "Permission Denied". I have checked the permissions for creating file. Also, the same code runs perfectly on Gear S2 without any error
Have you set right permissions ? and in which path are you writing ?

setup file is not working fine on client machines

I created a windows form application and my application will read the data from the two xml files in which these files are stored in application bin\debugger folder ,these files will change while running the application and also my form is using the windows media player and some other xml files which are stored in the system drives.
I created a setup file like below procedure
right click on Solution > Add > New Project >setup name
in Application folder I added two xml files and while adding the primary output of application i got a pop up box saying that it depends on the wmp.dll i added that one also.
created a shortcut for primary output ,cut and pasted into user's desktop and next in User Program i created a new folder in that folder i created a shortcut for primary output of an application and named as a setup file next I builded the setup file and after wards and I installed the setup in developed code machine its working fine but when i install the setup file on another computer it is not working please tell me what will be the reason, i'm struggling for this since from 3 days
Note: I added the system drives files in that locations before application running on the client computer
public partial class Form1 : Form
{
XmlDocument SysDetails = new XmlDocument();
XmlDocument UsrDetails = new XmlDocument();
Public Form()
{
string filePath1 = Application.StartupPath;
string org1 = filePath1+ "\\UserFirstDetails.xml";
UsrDetails.Load(org1);
XmlNode NdeFirst= UsrDetails.SelectSingleNode("UserFirstDetails/IsFirstTime");
FirstTime = NdeFirst.InnerText;
if (FirstTime == "True")
{
NdeFirst.InnerText = "False";
XmlNode productnum = UsrDetails.SelectSingleNode("UserFirstDetails/ProductOrderNum");
productnum.InnerText = ProductNo;
UsrDetails.Save(org1);//here i'm getting an exception ,please help me
in setup project it is points to C:\Program Files\Default Company Name\Setup Project, How to make C:\Project Files folder ReadOnly attribute to false
}
}
}
Based on the code sample and the Access Denied error...
Programs cannot write to the ProgramFiles directory unless they are elevated to admin level. So there are two solutions:
There are directories for user data, such as Application Data Folder, User's Application Data Folder etc, and that's where data files should be created and updated, and installed to, not the Program Files directory.
If your program does a bunch of things that require admin privilege and you decide that users need to have admin privilege to run it, then give it an elevation manifest so there will be an elevation dialog when the program starts up.
There's an article here:
http://www.codeproject.com/Articles/17968/Making-Your-Application-UAC-Aware

weblogic domain server.out log file manually modified locked

I have a 2 questions regarding Weblogic.
I am using Weblogic 10.3.6.
Yesterday I deployed the war file.
Following are my 2 questions
1) When I restart the server the sys out logs at location
domains//servers//logs/Server-name.out
domains//servers//logs/Server-name.log
are not getting updated
Actually logs were getting updated initially but I cleared the log file by manually opening the log file and deleting its content.
Later I found on official oracle website that
"Oracle recommends that you do not modify log files by editing them manually. Modifying a file changes the timestamp and can confuse log file rotation. In addition, editing a file might lock it and prevent updates from WebLogic Server, as well as interfere with the Accessor"
I think my log files got locked due to above reason.
Is there any way I can do to get updates in log files.
I have restarted the server as well but the logs are not getting updated.
2) I have deployed my web application using packed war file. When I deploy using war file it is expected that the war file gets exploded at some temporarily location in weblogic server. War gets deployed successfully but when I checked the contents of
WEBLOGIC/bea10.3.6.0_BI/user_projects/domains/Managedserver_7011_7012/servers/Server-chanakya/tmp/_WL_user
It is blank.
I was expecting that war should get exploaded inside the _WL_user folder. But it is not happeining right now.
Please let me know what I can do with respect to above problems.
Thankx in advance.
First question:
Generally speaking the .out file is created during server start and not updated once the server reaches the RUNNING state. The .log file should be updated continually however. It is safe to delete both of these files and once the server is restarted they should be regenerated. If for some reason they are not, go to server name -> Logging tab -> Log file name and specify the full path and name for a new log file.
Second question:
If you chose nostage for your deployment, it will not be copied to your server and will live wherever the file originally was. stage mode should copy the file to tmp/_WL_user after starting out under a stage directory. You can remove your deployment from the weblogic admin console and also delete the tmp and cache folders and try the deployment again if you need to. It's also possible the deployment failed... check the Deployments link in the admin console to make sure it reached the Active state.
Last - welcome to Stack Overflow. In general you should ask one question at a time.

Setting file path to a project to be deployed in a GlassFish Server via web project in Java

I have a project and I do some file read-write processes to get some values about glassfish server responses.
For example, in a write process, I declared my file like this :
BufferedReader reader = new BufferedReader(new FileReader(
"D:\\stajyer\\Glassfish Deployment\\out.txt"));
It's okay when I'm working on my local jetty server. But this project will be used as web project in other computers, this is a problem. There won't be this file in their path.
So what should I do to solve this problem?
How could I embeed my text file into my project?
P.S: In D:\stajyer\Glassfish Deployment\out.txt, Glassfish Deployment is my project's name.
Thanks for help, I tried to be spesific as much as I could.

Resources