Browsing articles in "Server applications"
Aug
15
2014

Increase the max upload filesize in Apache/PHP

Have you ever experienced with this message when you implement File upload function in to you PHP code ” Error:The uploaded file exceeds the maximum allowed size in your PHP configuration file “ Your php installation putting limits on upload file size. The default will restrict you to a max 2 MB upload file size.

Aug
26
2013

Fixed :: lftp – Fatal error: Certificate verification: Not trusted

$ lftp user@test.ftp.com:/directory Password: cd: Fatal error: Certificate verification: Not trusted To disable certificate verification in lftp, $ cat ~/.lftp/rc set ssl:verify-certificate no Or if it doesn’t work try this set ftp:ssl-allow no It will be working for you

Jul
30
2013

How to Install and Setup Postfix on Ubuntu

Install Postfix Postfix can easily be installed through apt-get: sudo apt-get install postfix During the installation, you will see a dialogue box appear, asking you which kind of installation you would prefer. Select “Internet Site”. Follow up by entering the name of your domain. Once Postfix is installed there are a few steps that need to be taken before it is fully functional. Configure Postfix Once Postfix is installed, go ahead and open the main […]

Jul
20
2013

How to Install Linux, Apache, MySQL, PHP on Ubuntu

Step One—Install Apache Apache is a free open source software which runs over 50% of the world’s web servers. To install apache, open terminal and type in these commands: sudo apt-get update sudo apt-get install apache2 That’s it. To check if Apache is installed, direct your browser to your server’s IP address (eg. http://12.34.56.789). The page should display the words “It works!” like this. How to Find your Server’s IP address You can run the following […]

Jul
20
2013

How to Check Apache Module and Enable Apache Modules?

We can use apache2ctl -M to the module that has been enabled on apache. Or if you have apache + PHP you can check it from phpinfo() function <?php echo phpinfo(); ?>   What if you want to enable the module you can use a2enmod “The module name”   for example “enable mod_rewrite” :: #a2enmod rewrite   Then restart the apache service #/etc/init.d/apache2 restart or #service apache2 restart

Jul
3
2013

Fix VsFTP – FTP Passive Mode Problems on Amazon EC2 Instances

For a while I was forced to connect to FTP (an installation of VSFTP) on our EC2 server using Active mode, because passive mode refused to work. While this is OK for FTP clients that can be configured to use active mode, other utilities such as screen capture (e.g. Jing) and the wordpress auto-upgrade could not work with active mode, causing all sorts of erroneous malarky. If you’re getting errors such as “227 entering passive mode… […]

Feb
27
2013

SFTP on specific port and using rsa or dsa key

sftp -oPort=2222 sftp -oIdentityFile=/path/to/private/keyfile user@123.456.789.012:/home/something Note: The -oPort=???? has to be before the user@123……

Feb
6
2013

PHP + SSH Authentication using a public key

  <?php $connection = ssh2_connect(‘shell.example.com’, 22, array(‘hostkey’=>’ssh-rsa’)); if (ssh2_auth_pubkey_file($connection, ‘username’, ‘/home/username/.ssh/id_rsa.pub’, ‘/home/username/.ssh/id_rsa’, ‘secret’)) { echo “Public Key Authentication Successful\n”; } else { die(‘Public Key Authentication Failed’); } ?>   This is a known bug in php: password protected private key cannot be used on certain combinaisons. See: https://bugs.php.net/bug.php?id=58573 ssh2_auth_pubkey_file() is broken when the public key file is protected with a password AND libssh2 is compiled with libgcrypt, which is what debian/ubuntu and probably others do. I’m working on a solution for this bug, but if you need this working rebuild libssh2 yourself with […]

Feb
6
2013

Installing PHP’s SSH2 extension on Ubuntu

    On Ubuntu 10.04 LTS, Do this (there’s no need to do any compiling anymore) 1 apt-get install libssh2-1-dev libssh2-php You can now test if PHP recognizes it’s new ssh2 extension by running: 1 php -m |grep ssh2 Don’t forget to restart Apache 1 service apache2 restart

Feb
1
2013

PHP FTP + Passive FTP Server

// create a basic connection $ftpconn = ftp_connect($ftp_ip, $ftp_port); // login with username and password ftp_login($ftpconn, $ftp_user, $ftp_pass); // Switch into passive mode (required for servers behind firewalls / NAT devices) ftp_pasv($ftpconn,true); // Print a directory listing print_r ftp_nlist($ftpconn, “/”);

Pages:12»



Member Area