How to increase upload file size for PHP application

How to increase upload file size for PHP application

By  •  PHP

Maximum upload file size for PHP is bound to the lowest value of both post_max_size and upload_max_filesize directives in your configuration. post_max_size affects maximum file upload size as file upload is normally an HTTP POST operation.

Maximum size of POST data that PHP will accept.

Its value may be 0 to disable the limit.
It is ignored if POST data reading is disabled through enable_post_data_reading.

Maximum allowed size for uploaded files.

You can update your PHP configuration file for these two directives to the values that fit your requirement and then restart your web server.

The following example allows for file upload of not more than 200MB.

post_max_size = 200M
upload_max_filesize = 250M

Alternatively, you can add the following lines in your .htaccess and the setting will apply to scripts from within the .htaccess‘ directory.

php_value upload_max_filesize 200M
php_value post_max_size 250M

Restart Apache for the changes to take effect.

How to create MySQL user

User account can be created by using MySQL’s GRANT statement. For this, you’ll need to login to MySQL using the root account, which has full privilege on the mysql.user table.

The following statement will create a user account named myusername which will have full access to the mydatabase database from localhost and set the password to mypassword

 GRANT ALL ON mydatabase.* TO 'myusername'@'localhost' IDENTIFIED BY 'mypassword';

How to install kibana in centos / redhat

  1. Add elasticsearch repo to yum
    1. Download and install the public signing key

       rpm --import
    2. /etc/yum.repos.d/elasticsearch.repo

      name=Elasticsearch repository for 6.x packages
  2. yum install -y kibana
  3. configure elasticsearch /etc/kibana/kibana.yml “”
  1. enable firewall

    firewall-cmd --add-port=5601/tcp --permanent
    firewall-cmd --reload
  2. systemctl start kibana

– systemctl enable kibana

  1. test

      "name" : "l_cUCzP",
      "cluster_name" : "elasticsearch",
      "cluster_uuid" : "ueCIZ5AqSEWsMRb7VU90cw",
      "version" : {
        "number" : "6.2.1",
        "build_hash" : "7299dc3",
        "build_date" : "2018-02-07T19:34:26.990113Z",
        "build_snapshot" : false,
        "lucene_version" : "7.2.1",
        "minimum_wire_compatibility_version" : "5.6.0",
        "minimum_index_compatibility_version" : "5.0.0"
      "tagline" : "You Know, for Search"

How to configure owncloud client in CentOS / Red Hat

rpm --import

curl -L -o /etc/yum.repos.d/ownCloud.repo

yum clean expire-cache
yum install -y epel-release
yum update -y
yum install -y owncloud-client

mkdir owncloud

owncloudcmd -u jm2_site01 -p jm2_site01 owncloud/

How to make money online with Google AdSense

There are many Google AdSense success stories that can be found on the Internet, but for most people joining the program, they are far from being successful. Average Google AdSense publisher’s earning can barely pay for their website hosting, let alone to getting rich by it.

Many sites and tutorial make it sound too easy to earn big from Google AdSense. While it is true that it’s easy to sign up for the program and to earn from it, earning enough to actually make a living out of it sounds like just a dream.

This article tries to be realistic about making money online, particularly with Google AdSense. The following are some tips on how to be successful with the program.

How to crack Windows password using ophcrack

By  •  Linux

Ophcrack is a Microsoft Windows password cracker. It’s uses Rainbow table to crack the passwords, while still be able to use brute-force to do the job. Ophcrack can recover password from all version of Windows.

For this example, we’ll be using Ophcrack Live CD which already has all the software and required packages installed and can do the password cracking automatically.

To recover your Windows passwords, follow the following steps.

How to increase backlinks to your website

Link building or the process of getting backlinks to your website is very important because other than to increase referral traffic to your site, it’ll also increase search engine traffic by increasing your site’s PageRank. Link building is therefore the most important step in increasing your website’s traffic.

How to disable password authentication in SSH

SSH is by default configured to allow password login. You can disable password authentication if you’re in favour of public key authentication by following these steps;

  1. Set PasswordAuthentication to no in /etc/ssh/sshd_config

    PasswordAuthentication no
  2. Reload or restart SSH

How to run Microsoft DOS program in Linux

By  •  Linux

While Wine can run Windows program, DOSBox is for running DOS program in Linux..