Skip to content

Commit

Permalink
Use self compiled PHP 5.3.29 to fix OpenSSL
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Feb 12, 2020
1 parent ce9ff49 commit d22b11b
Show file tree
Hide file tree
Showing 18 changed files with 11 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
- name: Test versions and extensions
run: |
php$ver -v | head -n 1
php-cgi$ver -v | head -n 1
php-config$ver --version
phpize$ver -v
php$ver -m
pecl -V
curl -V
php$ver -r "echo file_get_contents('https://repo.packagist.org/packages.json');"
env:
ver: ${{ matrix.php-versions }}
release:
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Package and ship
run: |
for v in 5.3 5.4 5.5; do
sudo XZ_OPT=-9 tar cfJ php-$v.tar.xz php-$v
sudo XZ_OPT=-e9 tar cfJ php-$v.tar.xz php-$v
shopt -s nullglob
for f in php-$v.tar.xz; do
sha256sum "$f" >"${f}".sha256sum.txt
Expand Down
Binary file removed php-5.3/deps/curl.so
Binary file not shown.
Binary file removed php-5.3/deps/libcurl.so.3
Binary file not shown.
Binary file removed php-5.3/deps/libicu44_4.4.2-2_amd64.deb
Binary file not shown.
Binary file added php-5.3/deps/libicu52_52.1-3_amd64.deb
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 3 additions & 9 deletions php-5.3/install.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
dpkg_install="sudo DEBIAN_FRONTEND=noninteractive dpkg -i --force-conflicts"
sudo mkdir -p /var/run /run/php
sudo mkdir -p /var/run /run/php ~/php
$dpkg_install ./deps/*.deb
$dpkg_install ./*.deb
for tool in php5 php5-cgi php-config5 phpize5; do
if [ -f /usr/bin/"$tool" ]; then
tool_name=${tool/5/}
sudo cp /usr/bin/"$tool" /usr/bin/"$tool_name"5.3
sudo update-alternatives --install /usr/bin/"$tool_name" "$tool_name" /usr/bin/"$tool_name"5.3 50
fi
done
sudo tar xJf ./php-5.3.29.tar.xz -C ~/php
sudo ln -sf ~/php/5.3.29/etc/php.ini /etc/php.ini
Binary file added php-5.3/php-5.3.29.tar.xz
Binary file not shown.
Binary file removed php-5.3/php-pear_5.3.29-1~dotdeb.0_all.deb
Binary file not shown.
Binary file removed php-5.3/php5-cgi_5.3.29-1~dotdeb.0_amd64.deb
Binary file not shown.
Binary file removed php-5.3/php5-cli_5.3.29-1~dotdeb.0_amd64.deb
Binary file not shown.
Binary file removed php-5.3/php5-dev_5.3.29-1~dotdeb.0_amd64.deb
Binary file not shown.
Binary file removed php-5.3/php5-gd_5.3.29-1~dotdeb.0_amd64.deb
Binary file not shown.
Binary file removed php-5.3/php5-intl_5.3.29-1~dotdeb.0_amd64.deb
Binary file not shown.
Binary file removed php-5.3/php5-redis_5.3.29-1~dotdeb.0_amd64.deb
Binary file not shown.
Binary file removed php-5.3/php5-xdebug_5.3.29-1~dotdeb.0_amd64.deb
Binary file not shown.
18 changes: 6 additions & 12 deletions php-5.3/post-install.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
v=5.3
dotdeb=http://packages.dotdeb.org
for tool in php$v php-cgi$v php-config$v phpize$v; do
if [ -f /usr/bin/"$tool" ]; then
tool_name=${tool/[0-9]*/}
sudo update-alternatives --set $tool_name /usr/bin/"$tool_name$v"
for tool in pear peardev pecl php phar phar.phar php-cgi php-config phpize; do
if [ -e ~/php/5.3.29/bin/"$tool" ]; then
sudo cp ~/php/5.3.29/bin/"$tool" /usr/bin/"$tool$v"
sudo update-alternatives --install /usr/bin/"$tool" "$tool" /usr/bin/"$tool$v" 50
sudo update-alternatives --set $tool /usr/bin/"$tool$v"
fi
done
ini_file=$(php -d "date.timezone=UTC" --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g")
sudo chmod 777 "$ini_file"
echo "date.timezone=UTC" >>"$ini_file"
sudo mv ./deps/libcurl.so.3 /usr/lib/libcurl.so.3
sudo mv ./deps/curl.so "$(php -i | grep "extension_dir => /usr" | sed -e "s|.*=> s*||")"/curl.so
echo "extension=curl.so" >>"$ini_file"
echo "deb $dotdeb squeeze all" | sudo tee /etc/apt/sources.list.d/dotdeb-ubuntu-php-"$(lsb_release -s -c)".list
curl -sSLO https://www.dotdeb.org/dotdeb.gpg
sudo apt-key add dotdeb.gpg
echo "date.timezone=UTC" >>"$ini_file"

0 comments on commit d22b11b

Please sign in to comment.