Category Archives: aptana

How to connect to Aptana studio 3 using ssh + password? (SFTP)

I rented a VPS a few days ago and been messing around with it for a little while. One thing I'm really struggling with: getting an easy file exchange system for an eventual website I want to build. Ideally I'd want just a folder on my MacBook that I can link directly with an identical folder on the Linux server with Aptana Studio 3 (I really like their IDE).

So far my main problem is that I can't connect through Aptana with SFTP on the server, because either I can input the private key to Aptana and it won't have the user's password, or I can input the password but it won't have the ssh key :(

I've tried several things, such as setting ssh's config strictmodes no, changing usePAM no and PasswordAuthentication no. All this does is not allowing me to login to the server anymore AT ALL, forcing me to hard reset everything on the server.

OS: Ubuntu 14.04 (64-bit)

Actions after fresh installation of the OS by DigitalOcean:

  1. adduser user01
  2. visudo insert user01 ALL=(ALL:ALL) ALL
  3. nano /etc/ssh/sshd_config change: PermitRootLogin no and add: UseDNS no (no idea why, but a tutorial of DigitalOcean told me to xD), AllowUser user01
  4. Login to new user and sudo from there :)

After this I install Apache, MySQL, PHP and phpMyAdmin, but I'm pretty sure the installation of these programs shouldn't influence the availability of server contact with Aptana Studio 3

Anything having any tips on how to approach this problem would be greatly appreciated! If you have any questions, feel free to ask :)

How to connect to remote server in Aptana Studio 3

I have following web server configuration

OS: Ubuntu 12.04

Web Server: Apache 2.2.22

PHP: PHP 5.3.10-1ubuntu3.21

MySQL: 5.5.47

  • Virtual Host for web project 'MyWebSiteName001' is created in Apache server using Webmin.

  • 'user001' is created under User Accounts and has Administrative privileges.

I have successfully installed Aptana Studio 3 on my computer. I also created new web project named 'MyWebSiteName001'. Now when I go to Create New Connections' option and try to connect to remove server project in FTP mode using user001/password, it is giving below error.

establishing ftp connection failed connection: refused connection

So I am not sure what I am missing or wrong I am doing and thus I am not able to connect to remote server. So please let me know how can I resolve this issue?

Disable syntax errors for PHP code inside JavaScript file in Aptana Studio 3

I am having PHP code inside my JavaScript file, which is processed by the server by setting the handler for the .js file extension to php5-script using a .htaccess. In Aptana Studio, I couldn't find an option in the settings where I can set the file type to a mix of PHP and JavaScript, or disable errors, or anything else.

I have found a similar question but this is just related to the PHPStorm IDE which I do not want to use.

The content of my .js file currently looks like this:

<?php
header('Content-type: application/javascript');

$app_base_path = $_GET['_app-base-path'];
$app_route = $_GET['_app-route'];
?>

$(function() {

    var APP = {

        // syntax errors are thrown here
        // the single quotes could be escaped to reduce syntax errors
        // looking for a way to make a code like this possible without any syntax errors
        base_path: '<?= $_GET['_app-base-path'] ?>',
        route: '<?= $_GET['_app-route'] ?>'

    };

    $('body').append('APP.base_path: ' + APP.base_path + ' --- APP.route: ' + APP.route);

});

Disable syntax errors for PHP code inside JavaScript file in Aptana Studio 3

I am having PHP code inside my JavaScript file, which is processed by the server by setting the handler for the .js file extension to php5-script using a .htaccess. I tried opening the .js file in Aptana Studio using PHP Source Editor and JavaScript Source Editor, however, both editors highlight the php code as syntax error. I couldn't find an option in the settings where I can set the file type to a mix of PHP and JavaScript, or disable syntax error highlighting for PHP code in JavaScript, or anything else.

I have found a similar question but this is just related to the PHPStorm IDE which I do not want to use.

The content of my .js file currently looks like this:

<?php
header('Content-type: application/javascript');

$app_base_path = $_GET['_app-base-path'];
$app_route = $_GET['_app-route'];
?>

$(function() {

    var APP = {

        // syntax errors are thrown here
        // the single quotes could be escaped to reduce syntax errors
        // looking for a way to make a code like this possible without any syntax errors
        base_path: '<?= $_GET['_app-base-path'] ?>',
        route: '<?= $_GET['_app-route'] ?>'

    };

    $('body').append('APP.base_path: ' + APP.base_path + ' --- APP.route: ' + APP.route);

});

changing the default web server in aptana3

I am using Aptana3 for web development and want to test the html and php codes in the browser.When i hit the run button, aptana uses its inbuilt server to deliver the pages.I have a WAMP stack installed on my system and wish to use apache instead of inbuilt server for tetsting my pages.

I have tried changing the run configurations but the change is temporary and works only for that instance i.e., when i run again the default server is used.

how to permanently change the web server in Aptana 3.