Mindblown: a blog about philosophy.
-
How to configure SEO friendly PrettyUrl in Yii2?
We can easily configure Yii2 web applications URL SEO friendly by following below steps- Step 1: Add urlManager in config/web.php Step 2: Add .htaccess in web/ directory Step 3: Check virtual host setup in httpd-vhosts.conf file Step 1: Add urlManager in config/web.php Add the following code in config/web.php ‘components’ section and save the file. For…
-
How to setup multiple virtual hosts on local Apache server?
In this post, we will see how to setup multiple virtual hosts on a local Apache server and this will make development work more user-friendly! Steps: 1. Updating .hosts file 2. Updating httpd.conf 3. Updating http-vhosts.conf 4. Restarting Apache and check the virtual server Let’s consider that we have two projects (3sdev and bookdev )…
-
CakePHP installation and using Cake Bake: An easy way!
In this post, we will see step by step procedure of installing and running CakePHP project in WAMP server! Installation requirements: Apache with mod_rewrite enabled PHP 5.2.8 or greater MySQL /PostgreSQL/MS SQL Server/SQLite Steps: 1. CakePHP installation 2. Setup and configure the sample project 3. Use Cake Bake to run CRUD for the project Steps…
-
Installing Laravel on Windows: The easy way!
In this post, we will see how to install Laravel on Windows (WAMP server)! Requirements: Composer Apache with mod_rewrite enabled PHP >= 5.4 MCrypt PHP Extension OpenSSL enabled Steps: 1. Install Composer 2. Install Laravel via Composer 3. Configure virtual host on Apache 4. Edit host file inside ../system32/drivers/etc folder 5. Browse homepage. Steps details:…
-
Work with UUID type in PostgreSQL- An easy way!
We can easily work with UUID data type in PostgreSQL! In this post, we will see all the required steps. Requirements: Extension “uuid-ossp” must be installed. Check the extension: SELECT * FROM pg_available_extensions; If not available then run following query to add this: CREATE EXTENSION “uuid-ossp”; Verify using: SELECT * FROM pg_extension; Create a sample…
-
Why programmer/developer fails?
Have you thought why you are not a good programmer/developer? Just imagine, you already tried so many things but still no luck to make a smart application that could make you happy! I have been working for years with developers from different regions within the globe and what actually I have found? I found that…
-
How to calculate difference between two dates in hour using PHP?
This is a pretty easy thing but sometimes we forget actually how we can calculate the difference between two dates! PHP Manual is a root source for this solution but its also time-consuming to search and find the procedure. Here, I am writing as a note so, we can check in future as a reference…
-
Yii Installation on IIS server: Application runtime path is not valid issue
After Yii installation on IIS then developer face problem to run the demo application and they see following error message – “Application runtime path “C:\inetpub\wwwroot\projectname\protected\runtime” is not valid. Please make sure it is a directory writable by the Web server process.” To solve this message- 1. Open IIS manager and select the project folder name…
-
How to Install, update and use Yii with WAMP server?
In this post, we will learn how to install and update Yii in WAMP sever! Let’s follow below steps to achieve the goals- Step 1: Assigning the PHP engine location path in the system variable Go to “My Computer” ->Right click and select “Properties” Click “Advanced system settings” from the left pane Under “Advanced” tab…
-
How to connect and use SQL Server 2008 database in ASP.Net MVC 4 EF code-first architecture
This is an important issue which sometimes most of the beginners have face when they start working with SQL Server 2008 database in ASP.Net MVC 4 EF code-first architecture! Here, we will learn an easy solution to this issue. After creating a project in ASP.Net MVC 4 then it comes up with complete hello world…
-
How can use Yii TinyMCE extension on production?
Sometimes developers face issues to use the Yii TinyMCE extension on the production server. It stops showing anything on production except words “Text mode”! This happens because the server already compresses the data and then the extension tries to compress again! As a result, the browser can’t do an auto-refresh and load the new updates.…
-
How can use Yii Bootstrap GridView in your application?
This is very easy! You can try following below code snippets to achieve the goal. But I strongly suggest browsing Yii Bootstrap site for more details. <?php $this->widget(‘bootstrap.widgets.TbGridView’, array( ‘type’ => ‘striped bordered condensed’, ‘dataProvider’ => $dataProvider, ‘template’ => “{items}\n{pager}”, ‘columns’=>array( array(‘name’ => ‘last_name’, ‘header’=>’Name’), array(‘name’ => ’email’, ‘header’=>’Email Address’), array(‘name’ => ‘mobile_phone’, ‘header’=>’Mobile Phone’),…
-
How to Display Input Element on Dropdown Selection in Yii?
To display an input element on dropdown selection is very easy. We can follow below steps to achieve the goals- By Using JavaScript: Selection dropdown 1: <div class=”row”> <?php echo $form->labelEx($model,’status’); ?> <?php echo $form->dropDownList($model,’status’, array(‘ON’=>’ON’,’OFF’=>’OFF’), array(‘onchange’=>’return checkStatus(this.value)’)); <?php echo $form->error($model,’status’); ?> </div> Hidden div. Will active…
-
How to Create Custom Input Validation Rules in Yii Model for Dependent Input Field?
Suppose we want to create a dependent input validation rule in Yii model for dependent 2 input fields. Field one is status and field two is reason. If user select a status from dropdown list then they must be fill-up reason field. If not then it will show an error message. In model rules- public…
-
How to Migrate a WordPress Site From a Local Server to the Production?
Migrating a WordPress site from a local server(localhost) to the production(live) server is easy! We can follow a few steps to achieve the goals. STEP 1: Upload the WordPress project folder to the production server using FTP client software (i.e FileZilla FTP Client). STEP 2: Create a database in the production server and keep database…
-
How to Add Expires Headers on Website and Enhance Load Speed?
Create a .htaccess file with following lines and upload to your website root folder. ExpiresActive on # Your document html ExpiresByType text/html “access plus 0 seconds” # Media: images, video, audio ExpiresByType audio/ogg “access plus 1 month” ExpiresByType image/gif “access plus 1 month” ExpiresByType image/jpeg “access plus 1 month” ExpiresByType image/png “access plus 1 month”…
-
How to Minify Javascript and CSS files using minify Extension in Yii?
To minify JavaScript and CSS files in Yii applications go to the URL and then download the extension. After that, extract the extension into the extension directory. Finally, edit the config.php file with the following lines in // application components section- ‘clientScript’ => array( ‘class’ => ‘ext.minify.EClientScript’, ‘combineScriptFiles’ => true, ‘combineCssFiles’ => true, ‘optimizeCssFiles’ =>…
Got any book recommendations?