晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /usr/local/lsws-old/admin/html.6.3.1/utility/build_php/ |
Upload File : |
###########################################
# passed params
DL_METHOD="__dl_method__"
ENABLE_MAILHEADER=__enable_mailheader__
LSAPI_VERSION=__lsapi_version__
###########################################
echo "============================================================="
main_msg "Preparing all source code for building PHP ${PHP_VERSION} with LSAPI ${LSAPI_VERSION}"
echo "============================================================="
echo `date`
echo ""
echo "Changing to build directory ${PHP_BUILD_DIR}"
cd ${PHP_BUILD_DIR}
check_errs $? "Could not get into build directory"
if [ -e "php-${PHP_VERSION}" ] ; then
rm -rf php-${PHP_VERSION}
check_errs $? "Could not delete old php directory ${PHP_BUILD_DIR}/php-${PHP_VERSION}"
fi
test_phpsrc_ok()
{
main_msg "Extracting PHP source archive: tar -zxf ${1}"
tar -zxf ${1}
if [ "$?" -ne "0" ] ; then
## remove bad copy
rm -f ${1}
main_msg "Could not extract PHP source archive"
return 1
fi
return 0
}
PHP_SRC=php-${PHP_VERSION}.tar.gz
PHP_SRC_READY=N
if [ -e "${PHP_SRC}" ] ; then
main_msg "${PHP_SRC} already downloaded, use the saved copy."
test_phpsrc_ok ${PHP_SRC}
if [ "$?" -eq "0" ] ; then
PHP_SRC_READY=Y
fi
fi
if [ "${PHP_SRC_READY}" = "N" ] && [ `expr ${PHP_VERSION} : ".*alpha\|.*beta\|.*RC"` -gt 0 ] ; then
DOWNLOAD_URL="https://downloads.php.net/~ab/${PHP_SRC}"
main_msg "Retrieving PHP source archive from ${DOWNLOAD_URL}"
${DL_METHOD} ${PHP_SRC} ${DOWNLOAD_URL}
test_phpsrc_ok ${PHP_SRC}
if [ "$?" -eq "0" ] ; then
PHP_SRC_READY=Y
fi
fi
if [ "${PHP_SRC_READY}" = "N" ] ; then
DOWNLOAD_URL="http://php.net/distributions/${PHP_SRC}"
main_msg "Retrieving PHP source archive from ${DOWNLOAD_URL}"
${DL_METHOD} ${PHP_SRC} ${DOWNLOAD_URL}
test_phpsrc_ok ${PHP_SRC}
if [ "$?" -eq "0" ] ; then
PHP_SRC_READY=Y
fi
fi
if [ "${PHP_SRC_READY}" = "N" ] ; then
DOWNLOAD_URL="http://us1.php.net/distributions/${PHP_SRC}"
main_msg "Retrieving PHP source archive from ${DOWNLOAD_URL}"
${DL_METHOD} ${PHP_SRC} ${DOWNLOAD_URL}
test_phpsrc_ok ${PHP_SRC}
if [ "$?" -eq "0" ] ; then
PHP_SRC_READY=Y
fi
fi
if [ "${PHP_SRC_READY}" = "N" ] ; then
DOWNLOAD_URL="http://us2.php.net/distributions/${PHP_SRC}"
main_msg "Retrieving PHP source archive from ${DOWNLOAD_URL}"
${DL_METHOD} ${PHP_SRC} ${DOWNLOAD_URL}
test_phpsrc_ok ${PHP_SRC}
if [ "$?" -eq "0" ] ; then
PHP_SRC_READY=Y
fi
fi
if [ "${PHP_SRC_READY}" = "N" ] ; then
DOWNLOAD_URL="http://us3.php.net/distributions/${PHP_SRC}"
main_msg "Retrieving PHP source archive from ${DOWNLOAD_URL}"
${DL_METHOD} ${PHP_SRC} ${DOWNLOAD_URL}
test_phpsrc_ok ${PHP_SRC}
if [ "$?" -eq "0" ] ; then
PHP_SRC_READY=Y
fi
fi
if [ "${PHP_SRC_READY}" = "N" ] ; then
MAIN_VER=`expr "${PHP_VERSION}" : "\(.\)"`
DOWNLOAD_URL="http://museum.php.net/php${MAIN_VER}/${PHP_SRC}"
main_msg "Try again, retrieving PHP source archive from ${DOWNLOAD_URL}"
${DL_METHOD} ${PHP_SRC} ${DOWNLOAD_URL}
test_phpsrc_ok ${PHP_SRC}
if [ "$?" -eq "0" ] ; then
PHP_SRC_READY=Y
fi
fi
if [ "${PHP_SRC_READY}" = "N" ] ; then
check_errs $? "Fail to retrieve PHP source archive. Please try manually download."
fi
echo ""
if [ "${ENABLE_MAILHEADER}" -eq 1 ] ; then
MAILHEADER_VER=`expr ${PHP_VERSION} : "\(.\..\)"`
if [ "${MAILHEADER_VER}" = "5.2" ] ; then
MAILHEADER_VER=5.2.x
elif [ "${MAILHEADER_VER}" = "5.3" ] ; then
MAILHEADER_VER=5.3.x
elif [ "${MAILHEADER_VER}" = "5.4" ] ; then
MAILHEADER_VER=5.4.x
elif [ "${MAILHEADER_VER}" = "5.5" ] ; then
MAILHEADER_VER=5.5.x
elif [ "${MAILHEADER_VER}" = "5.6" ] ; then
MAILHEADER_VER=5.6.x
else
MAILHEADER_VER=${PHP_VERSION}
fi
MHPATCH="php-${MAILHEADER_VER}-mail-header.patch"
if [ -e ${MHPATCH} ] ; then
rm -f ${MHPATCH}
check_errs $? "Could not delete old copy ${MHPATCH}"
fi
DOWNLOAD_URL="http://choon.net/opensource/php/${MHPATCH}"
main_msg "Retrieving mail header patch from ${DOWNLOAD_URL}"
${DL_METHOD} ${MHPATCH} ${DOWNLOAD_URL}
check_errs $? "Could not retrieve mail header patch"
echo ""
main_msg "Patching source with mail header patch"
cd php-${PHP_VERSION}
patch -p1 < ../${MHPATCH}
check_errs $? "Could not patch source with mail header patch"
cd ..
echo ""
fi
# get LSAPI
if [ -e php-litespeed-${LSAPI_VERSION}.tgz ] ; then
rm -f php-litespeed-${LSAPI_VERSION}.tgz
check_errs $? "Could not delete old lsapi copy php-litespeed-${LSAPI_VERSION}.tgz"
fi
DOWNLOAD_URL="http://www.litespeedtech.com/packages/lsapi/php-litespeed-${LSAPI_VERSION}.tgz"
main_msg "Retrieving LSAPI from ${DOWNLOAD_URL}"
${DL_METHOD} "php-litespeed-${LSAPI_VERSION}.tgz" ${DOWNLOAD_URL}
check_errs $? "Could not retrieve LSAPI archive"
cd php-${PHP_VERSION}/sapi
check_errs $? "Could not get into php/sapi directory"
if [ -e litespeed/Makefile.frag ] ; then
mv -f litespeed/Makefile.frag litespeed/Makefile.frag.package
fi
main_msg "Extracting LSAPI archive: tar -xzf php-litespeed-${LSAPI_VERSION}.tgz"
tar -xzf "../../php-litespeed-${LSAPI_VERSION}.tgz"
check_errs $? "Could not extract LSAPI archive"
if [ -e litespeed/Makefile.frag.package ] ; then
mv -f litespeed/Makefile.frag.package litespeed/Makefile.frag
fi
echo ""
echo "============================================================="
main_msg "Finished gathering all source code for building PHP ${PHP_VERSION}"
echo "============================================================="
echo `date`
echo ""