Posts

Showing posts from 2015

Setup Basic Apache Web Server in Ubuntu 13.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 create mysql password

:~$ 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++
:~$  sudo apt-get install phpmyadmin php-mbstring php-gettext supply mysql password supply phpmyadmin user password For Ubuntu 9.10++ and Apache2, the corresponding setting is located in the file /etc/apache2/conf-available/phpmyadmin.conf which is a link to /etc/phpmyadmin/apache.conf

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 c…