mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 21:33:06 +07:00
Set memory_limit=-1 on Windows and macOS
This commit is contained in:
parent
9845a63f5c
commit
a965723128
1
.github/workflows/workflow.yml
vendored
1
.github/workflows/workflow.yml
vendored
@ -72,6 +72,7 @@ jobs:
|
|||||||
php -r "if(phpversion()>=7.1 && ! extension_loaded('pcov')) {throw new Exception('PCOV not found');}"
|
php -r "if(phpversion()>=7.1 && ! extension_loaded('pcov')) {throw new Exception('PCOV not found');}"
|
||||||
- name: Testing ini values
|
- name: Testing ini values
|
||||||
run: |
|
run: |
|
||||||
|
php -r "if(ini_get('memory_limit')!='-1') {throw new Exception('memory_limit not disabled');}"
|
||||||
php -r "if(ini_get('post_max_size')!='256M') {throw new Exception('post_max_size not added');}"
|
php -r "if(ini_get('post_max_size')!='256M') {throw new Exception('post_max_size not added');}"
|
||||||
php -r "if(ini_get('short_open_tag')!=1) {throw new Exception('short_open_tag not added');}"
|
php -r "if(ini_get('short_open_tag')!=1) {throw new Exception('short_open_tag not added');}"
|
||||||
php -r "if(ini_get('date.timezone')!='Asia/Kolkata') {throw new Exception('date.timezone not added');}"
|
php -r "if(ini_get('date.timezone')!='Asia/Kolkata') {throw new Exception('date.timezone not added');}"
|
@ -271,7 +271,7 @@ else
|
|||||||
fi
|
fi
|
||||||
ini_file=$(php -d "date.timezone=UTC" --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g")
|
ini_file=$(php -d "date.timezone=UTC" --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g")
|
||||||
sudo chmod 777 "$ini_file" "$tool_path_dir"
|
sudo chmod 777 "$ini_file" "$tool_path_dir"
|
||||||
echo "date.timezone=UTC" >>"$ini_file"
|
echo -e "date.timezone=UTC\nmemory_limit=-1" >>"$ini_file"
|
||||||
ext_dir=$(php -i | grep -Ei "extension_dir => /" | sed -e "s|.*=> s*||")
|
ext_dir=$(php -i | grep -Ei "extension_dir => /" | sed -e "s|.*=> s*||")
|
||||||
scan_dir=$(php --ini | grep additional | sed -e "s|.*: s*||")
|
scan_dir=$(php --ini | grep additional | sed -e "s|.*: s*||")
|
||||||
sudo mkdir -p "$ext_dir"
|
sudo mkdir -p "$ext_dir"
|
||||||
|
@ -372,6 +372,7 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version
|
|||||||
|
|
||||||
$installed = Get-Php -Path $php_dir
|
$installed = Get-Php -Path $php_dir
|
||||||
Set-PhpIniKey -Key 'date.timezone' -Value 'UTC' -Path $php_dir
|
Set-PhpIniKey -Key 'date.timezone' -Value 'UTC' -Path $php_dir
|
||||||
|
Set-PhpIniKey -Key 'memory_limit' -Value '-1' -Path $php_dir
|
||||||
if($version -lt "5.5") {
|
if($version -lt "5.5") {
|
||||||
ForEach($lib in "libeay32.dll", "ssleay32.dll") {
|
ForEach($lib in "libeay32.dll", "ssleay32.dll") {
|
||||||
Invoke-WebRequest -UseBasicParsing -Uri https://dl.bintray.com/shivammathur/php/$lib -OutFile $php_dir\$lib >$null 2>&1
|
Invoke-WebRequest -UseBasicParsing -Uri https://dl.bintray.com/shivammathur/php/$lib -OutFile $php_dir\$lib >$null 2>&1
|
||||||
|
Loading…
Reference in New Issue
Block a user