Posts

Showing posts from 2015

Setup Basic Apache Web Server in Ubuntu 18.04+ ( LAMP : Linux Apache MySQL PHP)

Image
Update all repository and install all updates :~$ sudo apt-get update && sudo apt-get upgrade Install LAMP ( Linux Apache MySQL PHP) SERVER :~$ sudo apt-get install lamp-server^ select *apache Ubuntu 16.04 below you will be prompted to create mysql password . After this continue to phpmyadmin installation. Ubuntu 18.04 check this tutorial : MySQL in Ubuntu 18.04 :~$ sudo service apache2 restart Server should now be accesible in your browser via http://yourip or http:// localhost Install PHPMyAdmin :~$  sudo apt-get install phpmyadmin For Ubuntu 16.04 below you will be prompted to supply mysql password and supply phpmyadmin user password. For Ubuntu 18.04 you need to create mysql user and password for phpmyadmin. See how here : https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql For Ubuntu 9.10++ and Apache2, the corresponding setting is located in the file /etc/apache2/conf-av

CakePHP | File Upload

 In your view <div class="col-md-4"> <div class="box box-warning"> <div class="box-header"> <h3 class="box-title"><?php echo __('Profile Picture'); ?></h3> </div> <div class="box-body"> <?php echo $this->Form->create('User', array('action' => 'upload_profile_pic', 'role' => 'form', 'enctype'=>'multipart/form-data')); ?> <fieldset> <div class="row"> <div class="col-md-12"> <div class="form-group"> <?php echo $this->Form->input('photo', array('label' => false, 'type' => 'file', 'class' => 'form-control', 'id' => 'photo')); ?> </div><!-- .form-group --> </div> </div> <div