PHP Netbeans, Cannot Connect to server via SFTP - php

Im trying to connect my project via sFTP. and everytime I run the project it says.
Cannot Connect to Server http://abcd.efg.com
Reason: java.net.UnkownHostException: http://abcd.efg.com
But when I hit ok. the application then starts at my browser. which is weird, I set up the project as New Project, and PHP Application with existing Sources because I already have a project. then set "Run as: remote website (ftp,Sftp)"

use abcd.efg.com instead of http://abcd.efg.com
you cannot connect over sftp and http at the same time :).
Netbeans is expecting the hostname to connect over sftp, surely it doesnt like http://hostname.com over :22

Related

How do I connect my website on a external server to my database run off of Xaamp on my local host machine?

I have been building a website for a project using XAMPP. It has a database for users to register which stores their details. I was going to test my website with my friends by physically giving them my laptop however due to coronavirus I can no longer do so. As a result, I have had to upload my website to my university server for people to access the URL, however how can I reconnect this with my database that is on my XAMPP?
The code that I'm not sure how to alter is here and this is in a php file on my uni server (this may not even be the correct code to alter):
$db = #mysqli_connect('localhost','root','','databasetable') or die ("Could not connect to server");
OR
Is there a way for people to access my XAMPP files on my machine remotely for my friends to test the website and be able to make a log in etc.
Thanks in advance :D
You can expose your localhost databases by using tools such as http://ngrok.io/.
The command ngrok tcp 3306 will create a secure tunnel that can be used in your code.

Moving MySQL database from local MAMP server to host's server

I've developed WP site locally using MAMP. I know how to transfer WP site to server using FTP but problem is how I get MySQL DB to server. Before I've done this in cPanel and that's easy. Now there's no option to use cPanel or phpMyAdmin on the host. I can get connection to server with FTP and SHH. So is it possible to move DB from MAMP to server somehow? If not what should I do?
Thanks in advance!
You could FTP the export of your SQL dump file to your live server, then if you have SSH access and can connect to the MySQL command line, you could import your SQL dump file. This article should be helpful:
https://stackoverflow.com/questions/17666249/how-do-i-import-an-sql-file-using-the-command-line-in-mysql
You didn't specify what type of live server you're running, that information would be helpful!

I want to use PHP to query my current domain SQL server

I have tried everything
Wamp and XAMPP only provide thier own local server and wont let me specify my own server
I have tried IIS and PHP but it doesnt work at all
I would like a simple way to get my SQL server to use PHP in my domain, i dont need it to be remote access yet
Appreciate some hand holding at this point :(
Thanks
Hi thanks for replying
I have explained below what everything meant by using xammp or want iis and php
The server I have is on the Microsoft SQL server management studio
All of the all in one installers will just user local Host and thier own server and database I want to use mine.
Whenever I try using MySQL connection it says it has activley refused connection.
I've added my credentials into the security section on the server. Allowed remote login and specified ports on the server manager program.
Why isn't there a simple step by step program to enable php use on my server and or connect it to my online site..

How to access xampp server?

I installed XAMPP server in a rackspace cloud server. Now I want to access it from my local PC, like accessing web server through IP and coding & executing. Any solution would be grateful received.
If you want to connect to remote server from local machine, then
you can use PuTTY - http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
Here is a brief tutorial on how to use it:
http://www.gamexe.net/other/beginner-guide-ssh/
or you can search for another one.
There are many articles about PuTTY.
How about using FTP to write your code and execute. I work directly off my server I use Netbeans as my IDE of choice and it has a ftp feature that lets you work with files directly off your server.
Is that what you meant when you wrote:
web server through IP and coding & executing

SFTP listing directory

I'm trying to make a connection to a secure sftp site, however I'm not able to list the directory,however, it's possible to connect using python "expect" or php"ssh2_connect" but it gives me the following mesg: Received disconnect from xx.xx.xx.
If I use a GUI appliction like winscp I'm able to go to the sftp server and retrieve files.
I need to script it thus a cli interface is needed.
PS: just in case someone ran into this. I'm trying to connect to Avisena.com sftp server
You can do this easily with paramiko, checkout SFTP with Python

Categories