Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added PHP 8.1.30 and 8.3.12 configurations, extensions, and dependencies; updated release URLs and bundle release date in properties files. #43

Merged
merged 3 commits into from
Oct 15, 2024

Conversation

N6REJ
Copy link
Collaborator

@N6REJ N6REJ commented Oct 2, 2024

PR Type

enhancement, documentation


Description

  • Added configurations, extensions, and dependencies for PHP versions 8.1.30, 8.2.24, and 8.3.12.
  • Updated release URLs and bundle release date in properties files.
  • Added batch script to display PHP version and Imagick extension information.
  • Included README files for dependencies directories for PHP versions 8.1.30, 8.2.24, and 8.3.12.

Changes walkthrough 📝

Relevant files
Enhancement
1 files
test.bat
Add batch script for PHP version and Imagick info               

test.bat

  • Added a batch script to display PHP version and Imagick extension
    information.
  • +4/-0     
    Configuration changes
    8 files
    php.ini.ber
    Add PHP 8.2.24 configuration file                                               

    bin/php8.2.24/php.ini.ber

    • Added a comprehensive PHP configuration file for version 8.2.24.
    +1979/-0
    releases.properties
    Update release URLs for new PHP versions                                 

    releases.properties

    • Added release URLs for PHP versions 8.1.30, 8.2.24, and 8.3.12.
    +3/-0     
    bearsampp.conf
    Add configuration for PHP 8.1.30                                                 

    bin/php8.1.30/bearsampp.conf

    • Added configuration file for PHP 8.1.30.
    +9/-0     
    bearsampp.conf
    Add configuration for PHP 8.2.24                                                 

    bin/php8.2.24/bearsampp.conf

    • Added configuration file for PHP 8.2.24.
    +9/-0     
    bearsampp.conf
    Add configuration for PHP 8.3.12                                                 

    bin/php8.3.12/bearsampp.conf

    • Added configuration file for PHP 8.3.12.
    +9/-0     
    build.properties
    Update bundle release date                                                             

    build.properties

    • Updated bundle release date to 2024.10.2.
    +1/-1     
    php.ini.ber
    Addition of PHP 8.1.30 configuration file with settings   

    bin/php8.1.30/php.ini.ber

  • Added a new php.ini configuration file for PHP version 8.1.30.
  • Configured various PHP settings including error handling, resource
    limits, and session management.
  • Enabled and configured multiple PHP extensions such as curl, gd, intl,
    mysqli, openssl, and pdo.
  • Set default values for directives related to file uploads, output
    buffering, and dynamic extensions.
  • +1960/-0
    php.ini.ber
    Added PHP 8.3.12 `php.ini` configuration file with settings

    bin/php8.3.12/php.ini.ber

  • Added a comprehensive php.ini configuration file for PHP 8.3.12.
  • Included settings for error handling, resource limits, and session
    management.
  • Configured extensions such as curl, gd, intl, mysqli, openssl, and
    xdebug.
  • Set default values for various PHP directives for development and
    production environments.
  • +1959/-0
    Dependencies
    9 files
    exts.properties
    Add extensions for PHP 8.1.30                                                       

    bin/php8.1.30/exts.properties

  • Added extension URLs for Imagick, Memcache, and Xdebug for PHP 8.1.30.

  • +3/-0     
    exts.properties
    Add extensions for PHP 8.2.24                                                       

    bin/php8.2.24/exts.properties

  • Added extension URLs for Imagick, Memcache, and Xdebug for PHP 8.2.24.

  • +3/-0     
    exts.properties
    Add extensions for PHP 8.3.12                                                       

    bin/php8.3.12/exts.properties

  • Added extension URLs for Imagick, Memcache, and Xdebug for PHP 8.3.12.

  • +3/-0     
    deps.properties
    Add ImageMagick dependency for PHP 8.1.30                               

    bin/php8.1.30/deps.properties

    • Added dependency URL for ImageMagick for PHP 8.1.30.
    +1/-0     
    deps.properties
    Add ImageMagick dependency for PHP 8.2.24                               

    bin/php8.2.24/deps.properties

    • Added dependency URL for ImageMagick for PHP 8.2.24.
    +1/-0     
    deps.properties
    Add ImageMagick dependency for PHP 8.3.12                               

    bin/php8.3.12/deps.properties

    • Added dependency URL for ImageMagick for PHP 8.3.12.
    +1/-0     
    pear.properties
    Add PEAR installation for PHP 8.1.30                                         

    bin/php8.1.30/pear.properties

    • Added PEAR installation URL for PHP 8.1.30.
    +1/-0     
    pear.properties
    Add PEAR installation for PHP 8.2.24                                         

    bin/php8.2.24/pear.properties

    • Added PEAR installation URL for PHP 8.2.24.
    +1/-0     
    pear.properties
    Add PEAR installation for PHP 8.3.12                                         

    bin/php8.3.12/pear.properties

    • Added PEAR installation URL for PHP 8.3.12.
    +1/-0     
    Documentation
    3 files
    README.txt
    Add README for PHP 8.1.30 dependencies                                     

    bin/php8.1.30/deps/README.txt

    • Added README for PHP 8.1.30 dependencies directory.
    +2/-0     
    README.txt
    Add README for PHP 8.2.24 dependencies                                     

    bin/php8.2.24/deps/README.txt

    • Added README for PHP 8.2.24 dependencies directory.
    +2/-0     
    README.txt
    Add README for PHP 8.3.12 dependencies                                     

    bin/php8.3.12/deps/README.txt

    • Added README for PHP 8.3.12 dependencies directory.
    +2/-0     
    Additional files (token-limit)
    3 files
    php.ini
    ...                                                                                                           

    bin/php8.1.30/php.ini

    ...

    +1959/-0
    php.ini
    ...                                                                                                           

    bin/php8.2.24/php.ini

    ...

    +1959/-0
    php.ini
    ...                                                                                                           

    bin/php8.3.12/php.ini

    ...

    +1959/-0

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    …dependencies; updated release URLs and bundle release date in properties files.
    Copy link

    qodo-merge-pro bot commented Oct 2, 2024

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Configuration Change
    The new PHP configuration file contains many commented out settings. Review if any important settings should be uncommented or adjusted for optimal performance and security.

    Version Updates
    New PHP versions 8.1.30, 8.2.24, and 8.3.12 have been added. Ensure these versions are properly tested and compatible with existing applications.

    Configuration Consistency
    Verify that the configuration settings in this new file are consistent with other PHP versions and meet the project's requirements.

    Copy link

    qodo-merge-pro bot commented Oct 2, 2024

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Add error handling to check for PHP installation and extension availability

    Add error handling to check if PHP is installed and accessible. This will help users
    identify issues if the script fails to run.

    test.bat [1-4]

     @echo off
    +where php >nul 2>&1
    +if %errorlevel% neq 0 (
    +    echo PHP is not installed or not in the system PATH.
    +    pause
    +    exit /b 1
    +)
     php -v
    +if %errorlevel% neq 0 (
    +    echo Failed to get PHP version.
    +    pause
    +    exit /b 1
    +)
     pause
     php -ri imagick
    +if %errorlevel% neq 0 (
    +    echo Imagick extension is not installed or not enabled.
    +    pause
    +    exit /b 1
    +)
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: This suggestion adds robust error handling to the batch script, which is crucial for identifying issues if PHP is not installed or if the Imagick extension is unavailable. This significantly enhances the script's usability and reliability.

    9
    Add descriptive echo statements to provide context for each command's output

    Add a descriptive echo statement before each command to provide context for the
    output.

    test.bat [1-4]

     @echo off
    +echo Checking PHP version:
     php -v
     pause
    +echo Checking Imagick extension information:
     php -ri imagick
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: Adding descriptive echo statements improves the script's readability and user experience by providing context for each command's output. This is a helpful enhancement, especially for users unfamiliar with the script's purpose.

    7
    Security
    Disable PHP version exposure in HTTP headers for improved security

    Consider setting expose_php to Off for improved security. This prevents PHP from
    revealing its version in HTTP headers, which can be useful information for potential
    attackers.

    bin/php8.1.30/php.ini.ber [397]

     ; http://php.net/expose-php
    -expose_php = On
    +expose_php = Off
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: Disabling PHP version exposure in HTTP headers is a widely recommended security practice to prevent potential attackers from gaining information about the server's PHP version. This suggestion is highly relevant and accurate.

    9
    Disable PHP version exposure in HTTP headers for improved security

    Consider setting expose_php to Off for improved security. Exposing PHP version
    information can potentially be used by attackers to target known vulnerabilities in
    specific PHP versions.

    bin/php8.3.12/php.ini.ber [397]

     ; http://php.net/expose-php
    -expose_php = On
    +expose_php = Off
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: Disabling PHP version exposure is a widely recommended security practice to prevent attackers from targeting known vulnerabilities in specific PHP versions. This suggestion directly enhances the security of the application.

    9
    Best practice
    Set a specific error log file path for easier debugging and log management

    Consider setting a specific error_log file path instead of leaving it empty. This
    will help in easier debugging and log management.

    bin/php8.2.24/php.ini.ber [593-596]

    -;error_log = php_errors.log
    +error_log = "~BEARSAMPP_LIN_PATH~/logs/php_error.log"
     ; Log errors to syslog (Event Log on Windows).
     ;error_log = syslog
    -;error_log = "~BEARSAMPP_LIN_PATH~/logs/php_error.log"
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Specifying an error log file path is a best practice that facilitates easier debugging and log management. This change is important for maintaining a clear and organized logging system.

    8
    Specify an error log file path for better error tracking and debugging

    Consider setting a specific error_log file path instead of leaving it commented out.
    This will help in tracking and debugging issues in a production environment.

    bin/php8.1.30/php.ini.ber [592-595]

    -;error_log = php_errors.log
    -; Log errors to syslog (Event Log on Windows).
    -;error_log = syslog
    -;error_log = "~BEARSAMPP_LIN_PATH~/logs/php_error.log"
    +error_log = "~BEARSAMPP_LIN_PATH~/logs/php_error.log"
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Specifying an error log file path is a best practice for tracking and debugging issues, especially in production environments. This suggestion is accurate and enhances the maintainability of the application.

    8
    Specify an error log file path for easier error tracking and debugging

    Consider setting a specific error_log file path for easier troubleshooting.
    Currently, the error log path is commented out, which may make it difficult to
    locate and analyze PHP errors.

    bin/php8.3.12/php.ini.ber [595]

    -;error_log = "~BEARSAMPP_LIN_PATH~/logs/php_error.log"
    +error_log = "~BEARSAMPP_LIN_PATH~/logs/php_error.log"
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Setting a specific error log file path is a best practice that facilitates easier error tracking and debugging. This suggestion improves maintainability and operational efficiency.

    8
    Performance
    Enable OPcache for improved performance in production environments

    Consider enabling opcache.enable for better performance in production environments.
    OPcache can significantly improve PHP's performance by storing precompiled script
    bytecode in shared memory.

    bin/php8.2.24/php.ini.ber [1978-1979]

     ; Determines if Zend OPCache is enabled
    -;opcache.enable=1
    +opcache.enable=1
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Enabling OPcache can significantly enhance PHP performance by caching precompiled script bytecode. This is a valuable suggestion for production environments where performance is critical.

    8
    Enable output buffering to potentially improve performance

    Consider enabling output buffering by setting output_buffering to a non-zero value.
    This can improve performance by reducing the number of write operations.

    bin/php8.1.30/php.ini.ber [225]

    -output_buffering = off
    +output_buffering = 4096
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: Enabling output buffering can improve performance by reducing the number of write operations. This suggestion is relevant and can be beneficial for many applications, though it should be tested for specific use cases.

    7
    Enable OpCache to improve PHP performance

    Consider enabling opcache.enable for improved performance. OpCache can significantly
    speed up PHP execution by storing precompiled script bytecode in shared memory.

    bin/php8.3.12/php.ini.ber [773]

     extension_dir = "~BEARSAMPP_LIN_PATH~/bin/php/php8.3.12/ext"
    +opcache.enable=1
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: Enabling OpCache can significantly enhance PHP performance by caching precompiled script bytecode, reducing execution time. This is a beneficial suggestion for performance optimization.

    7
    Increase the maximum allowed size for POST data to accommodate larger file uploads

    Consider increasing the post_max_size value to accommodate larger file uploads if
    needed by your application. The current value of 32M might be limiting for some use
    cases.

    bin/php8.1.30/php.ini.ber [701]

    -post_max_size = 32M
    +post_max_size = 64M
    • Apply this suggestion
    Suggestion importance[1-10]: 5

    Why: While increasing the post_max_size can be beneficial for applications requiring larger file uploads, it is highly dependent on the specific needs of the application. The suggestion is valid but may not be universally applicable.

    5
    Increase the maximum allowed size for POST data to handle larger file uploads

    Consider increasing the post_max_size value to accommodate larger file uploads if
    required by your application. The current value of 32M might be insufficient for
    some use cases.

    bin/php8.3.12/php.ini.ber [701]

    -post_max_size = 32M
    +post_max_size = 64M
    • Apply this suggestion
    Suggestion importance[1-10]: 5

    Why: While increasing post_max_size can be beneficial for applications requiring larger file uploads, it is context-dependent and may not be necessary for all use cases. The suggestion is valid but should be considered based on specific application needs.

    5

    💡 Need additional feedback ? start a PR chat

    @jwaisner
    Copy link
    Contributor

    jwaisner commented Oct 8, 2024

    @N6REJ , PHP 8.2.24 is causing memcached to show up as "Stopped" on localhost but the service is definitely still running. No errors in the bearsampp-error.log or memcached.err.log files.

    image

    @N6REJ
    Copy link
    Collaborator Author

    N6REJ commented Oct 8, 2024

    i'm aware and have a ticket in for this. any 8.2.x newer then 8.2.19 is causing this.

    @N6REJ N6REJ changed the title Added PHP 8.1.30, 8.2.24, and 8.3.12 configurations, extensions, and dependencies; updated release URLs and bundle release date in properties files. Added PHP 8.1.30 and 8.3.12 configurations, extensions, and dependencies; updated release URLs and bundle release date in properties files. Oct 15, 2024
    @jwaisner jwaisner added the Hacktoberfest-Accepted ❤️‍🩹 Accepted for Hacktoberfest label Oct 15, 2024
    @jwaisner jwaisner merged commit 26fcf21 into main Oct 15, 2024
    @jwaisner jwaisner deleted the 8.3.12 branch October 15, 2024 02:00
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants