Problem: YII Command tool was not working in the newly created YII application, While using the below command in the command prompt not getting any respond, but normally its work with other YII application. Every path has been configured correctly and not getting any errors. /var/www/yii-1.1.16/framework/yiic shell Screenshot: Solution: This caused due to access rules …
Tag: PHP
Permanent link to this article: https://blog.openshell.in/2015/03/yii-command-tool-not-working/
Sep 28
How to read large XML files efficiently using PHP?
Recently I was faced problem of parsing large XML file using PHP. While parsing small files are no problem and all its quickly parsed, an attempt to parse larger files often causes time-out or Internal Sever Error. We will not able to use DOM or SimpleXML extension to parse the large XML documents in PHP. …
Permanent link to this article: https://blog.openshell.in/2014/09/how-to-read-large-xml-files-efficiently-using-php/
Aug 21
Create URL Slug from Post Title using PHP
The following functions will helps to create search engine optimization url for the website. This will strip all the special characters and punctuation away from the URL and place hyphen in between each words. For acheving the required results, used regular expression function that replaces spaces between words with hyphens and its remove the special …
Permanent link to this article: https://blog.openshell.in/2014/08/create-url-slug-from-post-title-using-php/
Jun 21
phpmyadmin – Cannot start session without errors, please check errors
Unfortunately sometimes we get the problem with phpMyAdmin, here is the error from phpMyAdmin on ubuntu machine. phpMyAdmin – Error [code] Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. [/code] To find out where the session.save path http://wiki.phpmyadmin.net/pma/session.save_path run this script …
Permanent link to this article: https://blog.openshell.in/2014/06/phpmyadmin-cannot-start-session-without-errors-please-check-errors/
Jun 19
How to use Jsonp method in JQuery
JSONP is JQuery(JavaScript) method used to request data from a server in a different domain, something prohibited by typical web browsers because of the same-origin policy. JSONP takes advantage of the fact that browsers do not enforce the same-origin policy on<script> tags. JSONP is a viable solution for cross-domain Ajax. JSONP does not work with …
Permanent link to this article: https://blog.openshell.in/2014/06/how-to-use-jsonp-method-in-jquery/
May 01
How to declare dependencies and use composer in php
Using Composer: We will now use Composer to install the dependencies of the project. To use Composer in your project, you’ll need one file: composer.json. In this file you will describe the dependencies of your project. So let’s create the file: [code]vim composer.json[/code] Declaring Dependencies: Once you created a composer.json file within your project which …
Permanent link to this article: https://blog.openshell.in/2014/05/how-to-declare-dependencies-and-use-composer-in-php/
Apr 30
How To Install and Use Composer on Ubuntu
Introduction Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. Dependency management Composer is not a package manager. Yes, it deals with “packages” or libraries, but it manages them on a per-project basis, installing …
Permanent link to this article: https://blog.openshell.in/2014/04/how-to-install-and-use-composer-on-ubuntu/
Mar 02
How to download file from remote URL in PHP
There are many ways in PHP to download file from the remote server. We can use php functions like copy, file_get_content, fopen, fsockopen & Curl to download the remote files. For your reference here I have explained about copy, fopen and Curl method, I have choosen these methods based on simplify and easily everyone can …
Permanent link to this article: https://blog.openshell.in/2014/03/how-to-download-file-from-remote-url-in-php/
Jan 03
Serailization & Unserialization in PHP
Serialization which help us to store or transport PHP data structure such as an array or object. All the storage meduim or database can store String type. It will generates a storable representation of a value. This is useful for storing or passing PHP values around without losing their type and structure. Essentially, it takes a …
Permanent link to this article: https://blog.openshell.in/2014/01/serailization-unserialization-in-php/
Dec 13
Dynamically create form in javascript on fly
To create a form dynamically using JavaScript on fly of the webpage. This which helps to create form and input controls dynamically. [javascript] /* To create form with javascript */ var form = document.createElement("form"); form.setAttribute(‘method’,"post"); // form method form.setAttribute(‘action’,"test.php"); // form action url form.setAttribute(‘name’,"frmName"); // form name form.setAttribute(‘id’,"frmId"); // form ID form.setAttribute(‘target’,"_blank"); // form target …
Permanent link to this article: https://blog.openshell.in/2013/12/dynamically-create-form-in-javascript-on-fly/