GithubHelp home page GithubHelp logo

tsdc-team / php-src-kos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from php/php-src

4.0 1.0 2.0 497.61 MB

The PHP Interpreter

Home Page: https://www.php.net

License: Other

Shell 0.28% JavaScript 0.18% C++ 0.51% C 72.40% PHP 25.62% Lua 0.25% Awk 0.01% XSLT 0.01% GAP 0.02% Makefile 0.03% HTML 0.01% DTrace 0.01% Batchfile 0.01% Yacc 0.08% Lex 0.09% M4 0.39% GDB 0.01% Roff 0.03% CMake 0.07% Python 0.01%

php-src-kos's Introduction

KasperskyOS modification of PHP Interpreter

This version of PHP Interpreter (Zend) is adapted for KasperskyOS. The PHP Interpreter operates in FastCGI mode.

What is a PHP Interpreter for KasperskyOS?

The PHP Interpreter for KasperskyOS is based on the PHP-8.2. Please refer to README.md for more information about the original PHP Interpreter not related to this project.

The PHP Interpreter for KasperskyOS has the following limitations:

  • Currently, subprocess creation isn't available in KasperskyOS Community Edition. All client requests to the PHP Interpreter are processed sequentially: a new request is executed only when a previous request has finished processing.

For additional details on KasperskyOS, including its limitations and known issues, please refer to the KasperskyOS Community Edition Online Help.

Table of contents

Getting started

Prerequisites

  1. Install KasperskyOS Community Edition SDK. You can download the latest version of the KasperskyOS Community Edition for free from os.kaspersky.com. The minimum required version of KasperskyOS Community Edition SDK is 1.2. For more information, see System requirements.
  2. Copy project sources files to your home directory. All files that are required to build the PHP Interpreter for KasperskyOS and examples of KasperskyOS-based solutions are located in the following directory:
    ./kos
    
  3. Set the environment variable SDK_PREFIX to /opt/KasperskyOS-Community-Edition-<version>, where version is the version of the KasperskyOS Community Edition SDK that you installed. To do this, run the following command:
    $ export SDK_PREFIX=/opt/KasperskyOS-Community-Edition-<version>
    

Building the PHP Interpreter

Run the following script to build the PHP Interpreter for KasperskyOS:

./kos/php/cross-build.sh

The PHP Interpreter for KasperskyOS is built using the CMake build system, which is provided in the KasperskyOS Community Edition SDK.

Installing and removing the PHP Interpreter

To install the PHP Interpreter for KasperskyOS to the KasperskyOS Community Edition SDK, run the following script with root privileges:

./kos/php/install.sh

To remove the PHP Interpreter for KasperskyOS from the KasperskyOS Community Edition SDK, run the following script with root privileges:

./kos/php/uninstall.sh

⬆ Back to Top

Usage

When you develop a KasperskyOS-based solution, use the recommended structure of project directories to simplify usage of CMake scripts.

To include the PHP Interpreter in your KasperskyOS-based solution, follow these steps:

  1. Add the find_package() command to the ./CMakeLists.txt root file to find and load the php package.
    find_package (php REQUIRED)
    
    For more information about the ./CMakeLists.txt root file, see the KasperskyOS Community Edition Online Help.
  2. Add the Fpm program to a list of program executable files defined in the ./einit/CMakeLists.txt file as follows:
    set (ENTITIES
         Fpm
         ...)
    
    For more information about the ./einit/CMakeLists.txt file for building the Einit initializing program, see KasperskyOS Community Edition Online Help.
  3. Specify a list of IPC channels that connect the Fpm program to VfsNet and VfsRamFs programs in the ./einit/src/init.yaml.in template file. For more information about the init.yaml.in template file, see KasperskyOS Community Edition Online Help.
  4. Create a solution security policy description in the ./einit/src/security.psl.in template file. For more information about the security.psl.in template file, see KasperskyOS Community Edition Online Help.
  5. Add PHP and nginx configuration files to the directory ./resources.

Examples

⬆ Back to Top

Testing the PHP Interpreter

The test suite for the original PHP Interpreter is used to test the PHP Interpreter for KasperskyOS, but testing systems are different. The testing system for KasperskyOS consists of two programs: php.Server and php.Client. The php.Client program parses PHPT files and sends a request, which contains a PHP script, to the php.Server program. The php.Server program executes the request and returns а result to the php.Client using аn HTTP response. The php.Client compares the received response with the expected result.

To run the tests, execute the following script:

./kos/tests/cross-build.sh

If you want to save test results to a file, go to the directory ./kos/tests and run the following command:

./cross-build.sh > log.txt

⬆ Back to Top

Acknowledgment

This product includes PHP software, freely available from http://www.php.net/software/.

Contributing

Only KasperskyOS-specific changes can be approved. See CONTRIBUTING.md for detailed instructions on code contribution.

License

This project is licensed under the terms of the PHP License. See LICENSE for more information.

⬆ Back to Top

php-src-kos's People

Contributors

dstogov avatar nikic avatar weltling avatar laruence avatar cmb69 avatar helly25 avatar tony2001 avatar smalyshev avatar pierrejoye avatar felipensp avatar zsuraski avatar faizshukri avatar krakjoe avatar remicollet avatar wez avatar cjbj avatar rlerdorf avatar bwoebi avatar derickr avatar petk avatar johannes avatar sgolemon avatar stigsb avatar kallez avatar bjori avatar bukka avatar tyrael avatar kocsismate avatar girgias avatar m6w6 avatar

Stargazers

Maxim Smirnov avatar Egor Chernyshov avatar Alexander Lifanov avatar kotborealis avatar

Watchers

Olga Sholokhova avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.