NetBeans Localhost development - netbeans

I have a php project which I want to test on localhost. I was suggested to use a no-ip domain name. I've done that and using this tutorial
and now I have a directory with a name same as the domain name on localhost. The project was previously connected a similar no-ip domain name(I wasn't present at that time) but then it expired and I'm setting it up again.
I have replaced every instance of the previous no-ip domain name in the code base with the no-ip domain name that I created and changed the project's Run Configurations in NetBeans but when I navigate to the domain name I don't see the obvious changes I've made in the development code.
When I test the connection it succeeds and when I save changes the Remote Log say that the changes have been saved and that the file has been received. When I navigate to localhost/shhasan.ddns.net I get a database error which points to Loader.php. I've checked Database.php and its the same setup which has worked before as the username, password, hostname is consistent with those on phypmyadmin. I've been stuck at this issue for 2 days now I would really appreciate help.

Your Loader.php is looking for a database/DB.php, but you only have a database.php.

Related

Windows 2012 name change Machine account didn't

I'm currently running into an issue where we changed over the name of a server (windows 2012). With the old name everything worked fine, after the name change it appears that the app pool identity is stuck with the old machine name in the machine account.
The site is using win auth to connect to our SQL server and provides an error:
LOGIN FAILED domainname\oldmachinename$
I notice when I change the app pool identity, the error changes, so it seems to be stuck with the old computer name, even though it's updated in local server data and control panel system properties.
How can I force the new name to be seen as the machine account?
I would remove the machine from the domain, change the hostname, re-join it to the domain, and that should alleviate the incorrect hostname issue.

With firebase hosting how do I change the domain name

I have previously configured firebase hosting successfully but now want to change the domain name I am using.
It appears you can Edit the current domain name but this doesnt seem to do anything that I can see when I enter a new domain name.
Not sure how to proceed.
Thanks,
Craig.
So I sent an email to firebase support and this process involves removing your current domain and adding a new domain which involves some downtime whilst they procure a new SSL certificate, etc.
If anyone is attempting to do this and does not want to incur any downtime its not too difficult. The highlevel process I have followed to move from olddomain.com to newdomain.com without downtime is detailed below:
Procure another temp server (i.e. amazon or whatever) and bring up nginx
Deploy your static files (css, js, html, jpg, etc) to this temporary server
Procure a cert for olddomain.com and deploy it on your server. You can get some free ones for a month if you have a search (dont want to endorse any particular product here)
Ensure the site is running as olddomain.com on your temp server (hack you hosts file to force your domain name to point at the new temp server.
If all good, modify your DNS for olddomain.com so it points at your temp server.
Wait a few hours to ensure all traffic going to your temp server (look at w3c style logs to ensure traffic is coming in)
You can now safely remove your olddomain.com and setup newdomain.com under firebase hosting without losing traffic to olddomain.com
Once newdomain.com setup and running on firebase hosting, configure olddomain.com to do a redirect to newdomain.com. May want to leave this up for a while depending upon how much traffic you are expecting to olddomain.com.
Job done without any downtime :)
Hope these steps are of use to others.
Thanks.
I created a new project with the desired domain name, then switched to the new project using the firebase use <project_id> command from Firebase CLI.

error database "/" does not exist on scaled JBoss app on OpenShift

I deployed a WAR in a non-scaled app on OpenShift with JBoss AS7 and a Postgres DB and it works fine.
I deployed the same WAR in a scaled app (otherwise same set up) and it fails whenever it tries to talk to the DB.
The error is: org.postgresql.util.PSQLException: FATAL: database "/" does not exist
I had a sort of similar looking issue with the HAProxy configuration, since the haproxy.cfg assumes the domain root context (i.e. "/"), but the actual context includes the WAR file name (i.e. "/warname/"). Updating haproxy.cfg to fix the context solved that problem, and I'm guessing that there is a similar configuration solution to connect to the DB, which is in a separate gear since the app is scaled.
Can anyone steer me in the right direction?
Thanks
If you are running a scaled application, the port that PostgreSQL runs on it a non standard port, make sure that you are using all of the environment variables to connect to your database and it should be fine. SSH into your gear and run env | grep POSTGRES and you should see all of the environment variables you should be using. Also note that your host is now an FQDN instead of a local address.
It turns out that the OPENSHIFT_POSTGRESQ_DB_URL environment variable may or may not include a trailing "/" (for non-scaled apps it is not there, for scaled apps it is), so appending "/dbname" works for non-scaled apps, but doubles up the "/" for scaled apps, which is obviously wrong. By writing safer code to check for the presence of the trailing "/" the problem is solved.

GitLab - Cannot push or pull. It seems to be a permission issue

Hope someone will be be able to help: I've installed GitLab and for a few days it seems that worked ok (I could push and pull only from a client but not from the machine that runs GitLab itself), however that's no longer the case. I have been working on the server (its my own server that I've setup for development/learning/personal stuff but I don't believe I've changed anything that could affect Gitlab, so I'm don't know what to do.
At the moment I can't push or pull from either my local machine (OS X 10.8.3) not from my server (Ubuntu 12.0.4). I've run the test several times and all is green. When I do git config user.name or git config user.email it comes back with my name and email respectively. I've also searched online but couldn't find anyone in exactly the same situation, however I did try many of the approaches suggested: I've deleted and generated more ssh keys, changed config in /home/git/gitlab/config.yml to reflect my setup (I'm running apache). My GitLab is 5.2 and I've followed the instruction on GitLab's homepage. In order to make it working with apache instead of nginx I've followed the instructions here:. This question seems the closest to describe my problem, however the solution is not clearly described, so I couldn't follow. The web ineterface works fine and I can commit either from my local machine (using sshfs) and my server. I just can't push or pull. The error I get is:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
I'd appreciate any help. I've been struggling with this for days now and I'm on the brink of give GitLab up...
Many thanks
EDIT: On my server I've got three accounts: user1 (main, first user, root), user2 a sudoer that also has admin privileges and git which also is a sudoer. After more investigating, I'm pretty sure this is a problem of me messing up with permission and the ssh key. Can someone point me out: when I generate the ssh key, which user should I be logged in as? In which computer should I generate this key? On my server or my Mac? Also, when I've tried push from my server directly (I was physically logged in the server rather than sshed to server via my Mac) GitLab was asking for git's password. I then generated a key logged as git on the server and added to GitLab through the web interface and the error appeared again (the same as before). Still not fixed.
The problem in my case was that I changed the git credentials on my local machine (when you create a new repo, you set the user name and email Git and git#localhost respectively) that I had changed and didn't realise. That's why every time I was trying to either push or pull I got the error. Once that was changed back to the correct settings, Gitlab started working again. Leaving as it might be helpful to someone.

Umbraco on Azure: can I change hostname?

I've deployed in Windows Azure a website made with Umbraco, using
Windows Azure Accelerator for Umbraco.
For development and test i used a test Hostname. Now it's time to switch to the official DNS hostname..
How can I change current hostname?
Actually i configured hostname at deployment time (the only way i know to do this) but i can't deploy again, since many files have been changed working on website on Azure.
EDIT
Let me explain: at the step prompt in the image (during web site deploying) I used as Domain Name "test.mywebsite.com", and configured real DNS.
Now the website is configured, so I'd like to make mywebsite.com point to that site;
But is'nt enough if i configure mywebsite DNS! Shall I deploy again? An will I lose any of the changes I made?
I'd like to make two comments on your question:
1) In order to host your Azure application under a custom host name, you will need to sign up with a DNS provider that supports C-NAME records (most do). I suggest someone like GoDaddy.com because by default C-NAME records can only resolve your "www.domainname.com" records and cannot do anything for queries where "www." is dropped from the URL. DNS providers like GoDaddy also have an option to redirect all traffic destined for "domainname.com" to a URL of your choice. This is a huge deal for Azure apps. Frankly speaking, it is somewhat disappointing that for all the PaaS and IaaS features of Azure, DNS was not included in the overall package.
2) I am a little worried when you say that you can no longer redeploy your app due to the changes made. Can you elaborate on that? Have you made changes to the application's code running on VM's in Azure without going through redeployment process? If so, this is a huge no-no. Your VM's running in Azure are not "permanent". Microsoft and your redeployment process can (and will) re-stage those VM's to the original package at any given time. Microsoft will re-image your VM's at least once a month during their monthly OS upgrades. But they can also do so when they need to move your VM to another rack, etc. Whatever changes that you make to your app must be either stored in source-control before deployment or in a permanent storage facility like SQL Azure, Azure Storage, etc.
HTH
Finally i think that the answers to my questions are:
-Shall I deploy again? Yes, i must deploy again
-Will I lose any of the changes I made? Many changes will be mantained since are stored into DB. But I have to do many activities to make new website work!
This answer confirms my theory:
In my case, I created and uploaded a site with a name, let's say
http://www.contoso.com and then paid a domain from a registrar let's say
http://www.example.com, when I mapped
http://MyAcceleratorsService.cloudapp.net/ to my new domain
( http://www.example.com ) and tried to open that domain I got the home page of
the Accelerator and not the uploaded site.
I had to upload the site again to Azure (using UploadUmbracoSite.cmd
from Accelerator application) and when uploading enter the same domain
name as the one I registered: http://www.example.com. Then, I was able to
browse my uploaded site as expected.
As for your question, will upload site again using
UploadUmbracoSite.cmd (is in the Setup folder) and will enter the new
domain name when requested.
Exactly what I was trying to avoid.. but the only solution, i suppose.
Well it was not easy to publish again, i got errors of many type (i suppose tied to some components that i've installed after deploy and that are not installed in new deployed website).. i'm going to solve them.
Edit
Completed my work:
- loads of different attempts, no-one worked
- CTP backup of DB
- deleted DB and website
- new full deploy of umbraco
- CTP restore of DB
finally:
-all work on content is OK
-all work on styles, pages, templates is lost
Changing hostname is hard; dont'use test hostname but definitive hostname from the beginning.
If anyone has suggest, i'll be pleased to test it, anyway
This is not really an answer to your question, but it might be a solution to your problem: Use a CNAME record to make the production DNS name point to your development name. E.g. www.productionname.com will the point to www.testname.com. I am not sure if everything will just work out of the box, but it seems to be worth a try.
This requires, that your hosting provider allows you to set up CNAME records.
http://en.wikipedia.org/wiki/CNAME_record