1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-04 15:47:32 +02:00

Add new page

LogMANOriginal
2017-01-12 21:37:51 +01:00
parent 1a180b2731
commit 37f25808ff

41
RSS-Bridge-on-PHP-5.4.md Normal file

@@ -0,0 +1,41 @@
RSS-Bridge does no longer support PHP 5.4 (see [Requirements](Requirements)), but can be made compatible to run on PHP 5.4 installations. The following script provides an automated way to downgrade the sources.
Be aware that this script may stop working on any release without notice. This script may or may not be updated in the future. It is known to work on commit [2fd60c68b083f43068703cab87c5e72a8eacc1c4](https://github.com/RSS-Bridge/rss-bridge/commit/2fd60c68b083f43068703cab87c5e72a8eacc1c4).
Place the following content in a file called **downgrade.sh** in the **root folder of your RSS-Bridge installation**:
```
#!/bin/bash
# downgrade.sh
echo "Downgrade RSS-Bridge to PHP 5.4.0"
# index.php
sed -i 's/5.6.0/5.4.0/g' ./index.php
# html.php
sed -i 's/$bridgeClass::PARAMETERS/$bridgeClass::$PARAMETERS/g' ./lib/html.php
# BridgeAbstract.php
sed -i 's/const PARAMETERS/public static $PARAMETERS/g' ./lib/BridgeAbstract.php
sed -i 's/static::PARAMETERS/static::$PARAMETERS/g' ./lib/BridgeAbstract.php
sed -i 's/self::PARAMETERS/self::$PARAMETERS/g' ./lib/BridgeAbstract.php
# Bridges
for f in ./bridges/*.php
do
sed -i 's/const PARAMETERS/public static $PARAMETERS/g' "$f"
sed -i 's/static::PARAMETERS/static::$PARAMETERS/g' "$f"
sed -i 's/self::PARAMETERS/self::$PARAMETERS/g' "$f"
sed -i 's/(empty($this/(!($this/g' "$f"
sed -i 's/(!empty($this/(($this/g' "$f"
done
```
run the following commands in your SSH terminal:
```
# chmod +x ./downgrade.sh
# ./downgrade.sh
```
Now RSS-Bridge will work on PHP 5.4