Server requirements for php

Server requirements for all PHP frameworks

PHP version 7.4 or newer is required, with the *intl* extension and *mbstring* extension installed.

The following PHP extensions should be enabled on your server:

php-json, php-mysqlnd, php-xml

In order to use the CURLRequest, you will need libcurl installed.

A database is required for most web application programming.

Currently supported databases are: MySQL (5.1+) via the MySQLi driver PostgreSQL via the Postgre driver SQLite3 via the SQLite3 driver MSSQL via the SQLSRV driver (version 2005 and above only) Not all of the drivers have been converted/rewritten for CodeIgniter4.

The list below shows the outstanding ones.

MySQL (5.1+) via the pdo driver Oracle via the oci8 and pdo drivers PostgreSQL via the pdo driver MSSQL via the pdo driver SQLite via the sqlite (version 2) and pdo drivers CUBRID via the cubrid and pdo drivers Interbase/Firebird via the ibase and pdo drivers ODBC via the odbc and pdo drivers (you should know that ODBC is actually an abstraction layer)

Читайте также:  Расчет среднего значения python

Server Requirements For Laravel

The Laravel framework has a few system requirements. You should ensure that your web server has the following minimum PHP version and extensions:

  • PHP >= 7.3
  • BCMath PHP Extension
  • Ctype PHP Extension
  • Fileinfo PHP Extension
  • JSON PHP Extension
  • Mbstring PHP Extension
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension

Server Requirements For CakePHP

  • HTTP Server. For example: Apache. Having mod_rewrite is preferred, but by no means required. You can also use nginx, or Microsoft IIS if you prefer.
  • Minimum PHP 5.6 (7.4 supported).
  • mbstring PHP extension
  • intl PHP extension
  • simplexml PHP extension
  • PDO PHP extension

Server Requirements For Symfony

  • PHP version: 7.1.3 or higher
  • PHP extensions:
    • Ctypeiconv
    • JSON
    • PCRE
    • Session
    • SimpleXML
    • Tokenizer

    Server Requirements For Slim

    Server Requirements For FuelPHP

    These are the most popular framework of PHP, All details are shared, if you know more please comment below.

    Источник

    Server Requirements

    PHP version 7.4 or newer is required, with the following PHP extensions are enabled:

    Optional PHP Extensions

    The following PHP extensions should be enabled on your server:

    • mysqlnd (if you use MySQL)
    • curl (if you use CURLRequest )
    • imagick (if you use Image class ImageMagickHandler)
    • gd (if you use Image class GDHandler)
    • simplexml (if you format XML)

    The following PHP extensions are required when you use a Cache server:

    • memcache (if you use Cache class MemcachedHandler with Memcache)
    • memcached (if you use Cache class MemcachedHandler with Memcached)
    • redis (if you use Cache class RedisHandler)

    The following PHP extensions are required when you use PHPUnit:

    • dom (if you use TestResponse class)
    • libxml (if you use TestResponse class)
    • xdebug (if you use CIUnitTestCase::assertHeaderEmitted() )

    Supported Databases

    A database is required for most web application programming. Currently supported databases are:

    • MySQL via the MySQLi driver (version 5.1 and above only)
    • PostgreSQL via the Postgre driver (version 7.4 and above only)
    • SQLite3 via the SQLite3 driver
    • Microsoft SQL Server via the SQLSRV driver (version 2005 and above only)
    • Oracle Database via the OCI8 driver (version 12.1 and above only)

    Not all of the drivers have been converted/rewritten for CodeIgniter4. The list below shows the outstanding ones.

    • MySQL (5.1+) via the pdo driver
    • Oracle via the pdo drivers
    • PostgreSQL via the pdo driver
    • MSSQL via the pdo driver
    • SQLite via the sqlite (version 2) and pdo drivers
    • CUBRID via the cubrid and pdo drivers
    • Interbase/Firebird via the ibase and pdo drivers
    • ODBC via the odbc and pdo drivers (you should know that ODBC is actually an abstraction layer)

    © Copyright 2019-2023 CodeIgniter Foundation. Last updated on Jun 17, 2023.

    Источник

    Determine server requirements for a PHP, MySQL application

    Determine your peak load number of concurrent users.

    The first thing you’ll need to do is figure out what the peak load of your application is. Your application’s peak load is the most amount of people you expect to be using your application at any given time. For example, if you’re making a large social network and you think that at some point all 3 billion users will go online at once, then your peak load number would be 3 billion.

    To determine your peak load number:

    • First you’ll want to take a look at how many total users you think will use your product in a day (for example 10,000).
    • Now figure out how many times those users are going to hit the server for content in a day (for example 1,000 times per user per day), and multiply that by the number of days in that month (for example 30) = 30,000 server hits per day.
    • Next take that daily hit number (30,000) and divide it by 24 hours = 1250 hits per hour.
    • Then divide that hourly hit number by 60 minutes = 20.8 hits per minute.
    • Finally divide that minute hit number by 60 seconds = 0.35 hits every second or a little less than one hit per second during peak time each day. A good rule of thumb here is to upsize this amount 50% so we’ll just say one server request every second during peak time each day will be enough for this hypothetical example app

    Determine the load time for a user request to be served.

    Take the time to create a profile of your application. This includes determining factors such as:

    • How long does it take for a single query to run?
    • How long does it take for the server to generate the response?
    • How long does it take for your page/site to load on average? (This can be done fairly easily with an online tool like [WebPageTest](https://www.webpagetest.org).)
    • How many queries are run per page request, and how often do they happen? (Queries that happen rarely should be less of a concern than ones that are a part of every single request.)
    • If you have users who can log in, how many pages do they visit per hour, per day? What about casual visitors who don’t log in, but simply browse your site or app?

    If you have any analytics from existing projects or sites you’ve worked on, this is the perfect time to bring them out and use them as part of your calculations. Start by making some very basic estimates based on what you know about your application’s code, then gather some more defined numbers using comprehensive testing tools like JMeter or LoadStorm.

    Calculate the CPU usage on the server required to fulfill the user requests.

    Once you’ve used a load testing tool to measure the load time of a user request, calculate the CPU usage on the server required to fulfill all user requests by multiplying the peak number of concurrent users by the load time for each user request. In this example, we have a peak number of concurrent users of 500 and a load time per user request of .07 seconds.

    By multiplying these values we can easily determine that 35 CPU seconds are required to serve each peak second.

    Calculate the RAM usage on the server required to fulfill the user requests.

    You need to determine the amount of RAM required on the server to fulfill all the user requests. To do this, you’ll need to first determine the number of requests per second (RPS) and then calculate the amount of memory required for each request.

    From this, you can multiply out the memory used by a single request to find the total amount required by your application.

    To calculate RPS, use one of these two methods:

    • Determine RPS using ApacheBenchmark: apachebench is a benchmarking tool designed specifically for web servers and it allows you to test how many requests a web server can handle in a set period of time. This is a good option if you don’t have historical data about your application’s usage patterns or want to see how well your new machine performs compared against previous ones. To set up apachebench (ab), follow these steps:
    • Install ab on your machine using apt-get or yum
    • Use ab -k -c 100 -n 10000 http://www.yourwebsite.com to load test your app with 100 concurrent users over 10 seconds
    • RPS = Total Requests / Test Time = Total Requests / 10 seconds (in this case)
    • Calculate RPS based on historical data about number of daily visitors and average time spent on website: Take an average day in which you had x daily visitors and where each visitor was on average there for y minutes . If each minute has 60 seconds, then we have x*y*60 = z total seconds that our site was accessed per day . So z/24 hours = rps since there are 24 hours in a day

    Calculate the total storage capacity (CPU and RAM) on the server required to handle your peak number of users.

    In order to do this, you will need to know:

    • The total storage capacity (CPU and RAM) required for the application on a per-user basis.
    • The maximum number of concurrent users that will access your application at any given time.

    The sum of all these calculations is the total storage capacity that is required on your server to handle all of your user requests simultaneously.

    It is important to know how much hardware you will need to support your application so there aren’t any surprises when your application is live.

    By following above steps, you should be able to determine hardware requirements for your PHP Application. If you are using a Cloud platform, you can buy a server instance with required RAM, CPU and Bandwidth

    Источник

Оцените статью