php

Fedora install pecl uploadprogress

To install pecl-uploadprogress you might need to do the following

1 - Login as root.

$ su -l
Password: "Enter your root password"

2 - check if php-devel is already installed. So just run the following command and if it is not present it will install it and if it is prsent it will just update it.

$ yum install php-devel

3 - Once php-devel is installed just run the following command to install pecl-uploadprogress

$ pecl install uploadprogress

4 - Once it is installed add the following line to your php.ini file
 

PHP regular expression tutorial

Regular expressions are a powerful way of analyzing and retrieving values from text strings .

The regular expressions basic syntax

To use regular expressions first you need to learn the syntax of the patterns. We can group the characters inside a pattern like this:

1 Start and end indicators as ^ and $
2 Count indicators like +,*,?
3 Logical operator like |
4 Grouping with {},(),[]
5 \ is used as a general escape character

A basic example would looks like this:

<?php
if (preg_match('/tutorial/', 'tips and tutorials are very useful')) {

how to increase the upload filesize limit

To check your upload_max_filesize setting, create a php file called info.php in your web root directory with the following code in it

phpinfo();

and view it in a browser.Check your current upload limit .
To make changes to the upload limit you will have to edit the php.ini file .
For Fedora users it is present at /etc/php.ini .

Open the php.ini and check for
upload_max_filesize 32M

You can change it whatever file size you wan to upload .
Once the changes have been done restart apache .