Tuesday, 28 May 2013

How to Increase the Maximum File Upload Size in WordPress

[caption id="attachment_595" align="alignleft" width="300"]mediafilesize Increase the Maximum File Upload Size[/caption]

By default the WordPress gives the uploading limit around 2 mp size. This does not nowadays, because even a minute movie with HD takes much heavy size file. In this post, I will give you some tricks to increase the maximum file upload size in WordPress.

Step 1: Take your theme functions.php file

Just add the following code into that,
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );

Step 2: Create or Edit php.ini settings

In your root folder, create (If you do not have) a new file called php.ini, add the following code
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

Step 3: Do some in .htaccess

add the following in your root .htaccess file
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

Notes:-

If you are in a shared hosting this techniques will not work, In that case you would have to contact your hosting provider to increase the size limit.

Thanks for reading.

 

Sunday, 12 May 2013

Setting Up Apache Server Virtual Host In Your Windows OS

imagesFor Coders, This Virtual Host option is flexible in project making. There is lot of 3rd party tools available in the market like Xampp, Wamp, but those are set to be in proper directories or else it wont work.


If you are a php developer and need to organized your website projects on certain folder with each individual host address e.g. "test1.web", "test2.web", you can use any name for virtual host but don't use ".com" extension as this will tell the browser to look the website on the internet and not on your local pc.


This procedure assume that you have already installed the apache for windows, php module for apache


Step -1 :-


open the apache configuration file, note that better to install the apache on the root of drive C:


(c:/apache/) to make it compatible for short naming folder, ok so assume your apache was installed on the root drive c:


so open the configuration file on c:/apache/conf/httpd.conf and enable the virtual host module, scroll down to near end of configuration and you will find this



# Virtual hosts
# Include conf/extra/httpd-vhosts.conf

uncomment the vhost module by removing the hash character on fron of it so it will look like this



# Virtual hosts
Include conf/extra/httpd-vhosts.conf

ok save the file.

Tuesday, 7 May 2013

PHP Tutorials for beginners – Variables

php variableHi Friends, Hope you are doing well. I believe that you have gone through our previous PHP tutorials and get some ideas. That is fine. Today we are going to talk about PHP Variables.

PHP variables as containers for storing data.

Rules for PHP variables:

  • A variable starts with the $ sign, followed by the name of the variable.

  • A variable name must begin with a letter or the underscore character.

  • A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ ).

  • A variable name should not contain spaces.

  • Variable names are case sensitive ($y and $Y are two different variables).


OK. Do not get sleepy, If you go for example you can easily understand what is variable.

For eg 1:
<?php
$a = "Hello, ";
echo $a;
?>

Check this output in your localhost, it will show Hello. 

This is it, Here $a is a variable, which contains hello value into that. Like that way we have to use php variables.

Eg 2:
<?php
       $v = 2500;
       $x = 7500;
       $y = 5000;
       $z = $v+$x+$y;
       echo $z;
?>

Do this practice in your localhost. Now you can get clear view about these variables.

Notes:

We do not initiate data type in PHP variables. It automatically converts the variable to the correct data type, depending on its value.

If you use alphabets, make double codes (in between that). for example ( $name = "hello word, how are you"; ) and should end with semi colon.

PHP has four different variable scopes. We will see about those in next tuto's.

Thanks for reading. Post your comments.

Saturday, 4 May 2013

Dual-Booting Ubuntu Linux and Windows.

Dual-Booting Ubuntu Linux and Windows 7/Windows Vista (with the Windows bootloader)

Ubuntu is one of the most popular Linux Operating System (for free, of course) , and has gained most of its popularity due to its ease-of-use and its appeal to people who don't like to wage war against their PC to make it work for them.

Step-by-Step Ubuntu, Vista Dual-Boot Pictorial

Installing Ubuntu...

These steps assume that you have Windows already installed and are installing Ubuntu to some free space on the drive. If that's not the case, you'll have to follow the steps a little more loosely than they're written.

Step One

Insert your Ubuntu CD or DVD in the drive, and boot from it to begin setup. You can usually do this by either pressing F8/F12 to select the boot device or by changing the order of boot devices in the BIOS, depending on your motherboard manufacturer:

1

Wednesday, 1 May 2013

PHP Tutorials for beginners – 2

Hi Guys, Hope you guys have successfully installed xampp server or wamp server in your computer. That's is fine, Still If you have confusion go back to our previous tutorial or put your queries

in comments section, I will try to update you. As I told you earlier PHP is a server-side scripting language designed for web development. It is influenced by C, C++, Perl and Java. For this PHP implementation you must know basic programming about C language coding. If you are good in C or Java, Which is very easy to implement. PHP commands can be embedded directly into an HTML source document rather than calling an external file to process data. You can make a full php code to output. Like that way we are going to develop.

PHP codes must start with <? and ends with ?>. In between these we should put our code.

OK let us start our first php program here. Open any editor like notepad, notepad++, intype etc. which is your favorite in your system, do write following eg codes.

Eg 1:

Assume we should display Hi everyone, This is a beautiful world with beautiful people. we are going to display this sentence through PHP.