phpDesigner 8 how to FTP files to remote server - php

I've never had so much difficulty trying to figure out something that should be so simple! I used the FTP Manager to set up a new connection. That's fine, and I see the connection in the FTP/SFTP panel. But then what?? From my Project Panel, I right click the files > Export To > FTP Folder. Then I get the FTP Properties window asking for login credentials - every single time. It just doesn't store the profile from the FTP Manager. Furthermore, I don't even see where to associate my local directories to the remote one. ???
I've searched online for over an hour now. Apparently, the built in FTP tool is buggy, but there is little else information.

Related

I screwed up my_functions.php in WordPress and can't get in to fix it - deadline fast approaching

I created a my_functions.php file and installed it to WordPress as a plugin (started with something real simple, then expanded it).
It does what it's supposed to do, but it runs every time the web site is opened.
I left in the echo commands for debugging so all the comments are displayed, and after it ends, the web site is displayed.
I can fix that, but here's the real problem: I can't log into WordPress-Admin in order to fix it.
When I log into wp, the function runs and ends and that's it - nothing else - it doesn't take me to the admin area.
I tried using FTP to log into wp, but I'm not that familiar with FTP and I'm getting a credential error. BTW, I'm using my wp login info.
Maybe there's a way to prevent functions from running during login, like shift-run in Windows that prevents on-open scripts from from running?
Thanks for your help.
FTP: Wont be the same as the wp login details. You need to get those from your host.
You can deactivate the plugin by logging into your web host cPanel, locating the plugin folder in /wp-content/plugins. Simply download a copy of the plugin folder then delete it from the web files. Wordpress will then load fine and you can take the time to go through your code.
You would be better to setup something like XAMP (Linux), WAMP (windows) or MAMP (mac). Its local development environment which will allow you to develop locally so you can access files though your normal file manager.

Trying to connect local wordpress site to a remote db

There is a site at my job that has only been maintained by 1-2 developers for a while but as more developers are being added to it we want to implement git. The workflow we're looking for has everyone using a local copy that is connected to the same remote database. We can all push and pull code as needed while any database changes would be shared that way.
I'm running into a weird issue where many files are refusing to load or clicking on any link results in a redirect to the xampp dashboard.
I downloaded xampp and created a directory in htdocs called local_test. I downloaded all the sites files into that directory with ftp. Grabbed the dbs info from the host and whitelisted the outside ip address on the host.
I went into wp-config.php and changes all the db values so it connect correctly. Plus I added:
define('WP_SITEURL', 'localhost/local_test/');
define('WP_HOME', 'localhost/local_test/');
At first I was convinced it was a db issue, but I can connect to the database remotely just fine using mysql workbench so I doubt it's that. The footer and the header show up, just not much of the content in between and like I said whenever I click on a link it redirect to the generic xampp dashboard.

Trying to work on a client's Drupal site from my local machine

I have a client who wants me to update their Drupal site. I've never done this before, and I want to work on it from my local machine just in case something goes wrong. I have no idea where to even start!
First off, how do I access my client's site files so I can get them onto my computer? I've tried entering the information the client gave me into Cyberduck, but it won't give me access. Is there another way to get access?
Also, how do I host it locally? I have XAMPP, but I'm not sure how to use it.
That being said, I have found a few forums that should help me set up the local server. I just don't know how to get the files from the live server to my computer.
I know this is a super noob problem, but I could use the help. Thank you!
Well, for the basic question, you have to get the correct credentials from your client. There's no alternative, really :D
While you're at it, you'll want a copy of the site's database too.
For the question "how do I host it locally?" Here's how I would go about it.
Get the site into version control.
Given that you were given (S)FTP credentials, I'm guessing the site is not version-controlled. If that's correct, then that is probably the very first thing you want to do. This will allow you to keep track of the changes you've made on your local site that are different to the production version.
Create an empty directory on your computer.
Navigate to the directory in a terminal and run git init.
Add a .gitignore file to that folder (you can create your own, or use one customized for Drupal).
Download the site's files into the directory created in step 1.
Add the files from the in the directory to the git repository by running this command in a terminal: git commit -am "First commit of Drupal files to repository."
There's a good help page about working with Drupal in git on drupal.org.
Create and populate your database.
Get a database dump from the live site.
Create a new database and database user on your machine.
Import the database dump into your new database.
Record the database credentials in settings.php or settings.local.php and store them somewhere safe, preferably in a password manager.
Change the database credentials in settings.php or settings.local.php to match the credentials of the database you've just created.
(For safety and to avoid confusion, I always create local databases with a different name, user, and password than the live site has. This means if your local credentials are compromised, the live site isn't, and it means you can't connect to and change the live site's database by accident.)
Set up the webserver in XAMPP
Create a new site in XAMPP called e.g. example.local that points to the directory that contains the file index.php
Add the following line the file called /etc/hosts on your computer:
127.0.0.1 example.local
Test that this works in a browser by visiting e.g. http://example.local or http://example.local/robots.txt.
Move your local changes to the Production site
How you will be able to do this depends to some extent on your client's web-hosting infrastructure, and what version of Drupal your client uses. but in any case, you will have three separate concerns for changes you make:
Code changes
You will need to deploy changes you make to the code back to the server. Ideally you would probably do this via Git either by cloning directly into the live site or (far better!) as part of an automated build process. By the sound of it, you may just have to FTP the changes back up.
Be careful not to re-upload your modified settings.php or settings.local.php file!
Content changes
You probably have to test some/all of your content changes locally and then recreate them on the live site. Because your client may have made changes to the live site while you were working, you can't risk importing your local database into the live site.
Configuration changes
Changes to configuration should be managed in code (i.e. as part of 1. Code changes above) if that's possible. In Drupal 7, the Features module is usually the best way to accomplish this (here's an answer I wrote describing the Features workflow). Drupal 8 has the Configuration Manager. Be aware that these two tools can both be tricky to use well.
Your client needs to gave you access to the files so you can put them into htdocs on XAMPP, then you need the database (also provide by the client), start XAMPP, create a new database on localhost/phpMyAdmin and import the db of the site. On the proyect code go to sites/default/settings and change the db settings to your local settings. Then you can go to localhost/{your-proyect} and it should work.

Can't ftp to azure webapp

I've created simple webapp + mysql database on azure and i've set ftp username/pass. I'm following this article:
https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-mysql-deploy-use-ftp/
Everything is fine up to the ftp part, i just can't connect to that ftp. I tried using the username/pass i set in Deployment Credentials. I tried using the username/pass i see in the PublishSettings file, but nothing is working.
I tried via linux ftp cmd and filezila and played with active/passive.
When i telnet ip 21 i'm getting timeout too.
Could someone please explain how to connect to that azure ftp?
Thanks
One common problem is that you need to have the username look like YourSiteName\YourUserName and not just YourUserName.
If you look under 'FTP/Deployment username' in the Azure portal, it gives the correct name with the site name prefix.
According to the offical documents, the section Deploy by copying files to Azure manually of the doc Deploy your app to Azure App Service introduce the steps of deploying the WebApp via FTP.
The key point of deploying via FTP on Azure is the FTP connection information, you can follow the steps 5 to 7 of the section Get MySQL and FTP connection information of the doc Create a PHP-MySQL web app in Azure App Service and deploy using FTP to find them from the .publishsettings file got on the Azure new portal, please see the picture below.
The method shown in the tutorial you link to is how I do it when I need to lookup my azure credentials - by downloading the Publish Profile and pulling the information out of there.
Here's how I do it:
using FileZilla (https://filezilla-project.org/) I plug the publishurl in the host field, leave the port blank, select FTP - File Transfer Protocol, use explicit FTP over TLS if available, Logon Type: Normal, enter userName in the user field, userPWD in the password field.
Click Connect and the FTP connection is made (after I click the security msg).
So it's a plain old FTP connection. There's nothing special going on.
If this isn't working for you I would suggest the problem isn't with your credentials, check the webapp has been started in azure, check you can ftp with another site\server.
Good luck. Hope this helps.

Clueless on how to put my PHP project in the Internet

Good day!
I've searched for many sites on how I could deploy my PHP projet in the internet but I don't know how to do it because I am confused with some of the technical terms.
You see, I am using xampp for my local web server. Now I want to put it in the internet. I found some free web hosting sites so i've decided to upload all my htdocs files inside it.. But how can I put the xampp (apache server) and my mysql database on it? I'm confused. Please help. A step-by-step procedure of what should i do could be really helpful. Thank you in advance.
Get a hosting account (try www.bluehost.com for instance).They will set you up with a Linux server and MySQL. You don't have to install Apache or MySQL, you will use whatever they've got. All you need to do is upload your PHP files to the right folder, setup your database on their server and you should be good to go.
If you buy a domain-name and space, connect them using the NS settings
If you are using a free, then the settings are already okay.
Export the database from your XAMP.
Login to the remote server. There you'll find PHPMyAdmin. Import the database.
Upload the file.
Make sure file listing is off. That is if a user goes to any directory he can not see the file list!
Done :)
Simplifying a bit, there are two ways you can get your site online.
First, you could purchase or rent a server that is yours and yours alone. This is commonly called "dedicated hosting" and costs somewhere around $100 / month. If you choose this option, you have your own server housed in a datacenter somewhere, and you must install Apache, MySQL, and any other server software you care to use.
I doubt, given what you've described, you have chosen this option.
Second, you could rent "shared hosting" from any one of the dozens of hosting providers out there. If you do this, with a typical cost of $2 to $10 per month, the hosting provider is administering the server. You have no direct access at all. Your only access is through the tools they provide.
Given that, how specifically you can upload files is up to them (is it FTP? SSH? a horrifying web-based upload tool of some kind?) Similarly, how you access your MySQL databases (assuming they offer MySQL databases) is entirely up to them as well.
Many providers now use a tool called cPanel for this administration, so you may try browsing to www.example.com/cPanel (using your domain) on the off chance that works. If not, though, follow the instructions your host provides. Only they can correctly describe how their setup works.
The hosting will be already having apache and mysql installed you only have to put your files thats it
I suggest you contact your webhosting site. The web hosting needs to host php, and mysql. Then you can upload your files to their web server, and copy your mysql database to their mysql server.
You do not need to transfer xampp to your host: apache and mysql are running on nearly every server
Upload all your files in your htdocs directory via ftp to your server
To transfer your database, use phpMyAdmin. It is installed with xampp and alos installed on nearly every server. In phpMyAdmin, use the export/import functionality
In your php file where you connect to the db change the login settings to the settings the hoster gave you
That should work...
Hosting Company already have setup for apache,php, mysql. All you need to uploads all your
files from xampp htdocs to a right folder like public_html using a ftp software like
filezilla. They also provide a control panel like using which you can manage your mysql
database and all others settings like directory permission.

Categories