pull/504/head
Mr Chen 2 years ago
parent b356ad5a43
commit 664852c26f
  1. 4
      plugins/php/install.sh
  2. 12
      plugins/php/lib/icu.sh
  3. 29
      plugins/php/lib/libiconv.sh
  4. 15
      plugins/php/lib/libzip.sh
  5. 18
      plugins/php/lib/openssl_10.sh
  6. 16
      plugins/php/lib/zlib.sh
  7. 2
      plugins/php/versions/52/install.sh
  8. 3
      plugins/php/versions/53/install.sh
  9. 2
      plugins/php/versions/54/install.sh
  10. 3
      plugins/php/versions/55/install.sh
  11. 10
      plugins/php/versions/56/install.sh
  12. 11
      plugins/php/versions/70/install.sh
  13. 6
      plugins/php/versions/71/install.sh
  14. 18
      plugins/php/versions/72/install.sh
  15. 450
      plugins/php/versions/72/src/reentrancy.c
  16. 16
      plugins/php/versions/73/install.sh
  17. 27
      plugins/php/versions/74/install.sh
  18. 22
      plugins/php/versions/80/install.sh
  19. 12
      plugins/php/versions/81/install.sh
  20. 8
      plugins/php/versions/82/install.sh
  21. 8
      plugins/php/versions/83/install.sh
  22. 70
      plugins/php/versions/all_mac.sh
  23. 4
      plugins/php/versions/all_test.sh
  24. 2
      plugins/php/versions/common.sh
  25. 2
      plugins/php/versions/common/bcmath.sh
  26. 2
      plugins/php/versions/common/exif.sh
  27. 2
      plugins/php/versions/common/fileinfo.sh
  28. 2
      plugins/php/versions/common/gd.sh
  29. 2
      plugins/php/versions/common/gd_old.sh
  30. 2
      plugins/php/versions/common/gettext.sh
  31. 2
      plugins/php/versions/common/gmp.sh
  32. 2
      plugins/php/versions/common/iconv.sh
  33. 2
      plugins/php/versions/common/igbinary.sh
  34. 2
      plugins/php/versions/common/imagemagick.sh
  35. 2
      plugins/php/versions/common/intl.sh
  36. 2
      plugins/php/versions/common/ioncube.sh
  37. 8
      plugins/php/versions/common/mcrypt.sh
  38. 2
      plugins/php/versions/common/memcache.sh
  39. 16
      plugins/php/versions/common/memcached.sh
  40. 2
      plugins/php/versions/common/mongo.sh
  41. 2
      plugins/php/versions/common/mongodb.sh
  42. 2
      plugins/php/versions/common/opcache.sh
  43. 9
      plugins/php/versions/common/openssl.sh
  44. 2
      plugins/php/versions/common/pcntl.sh
  45. 2
      plugins/php/versions/common/phalcon.sh
  46. 2
      plugins/php/versions/common/redis.sh
  47. 2
      plugins/php/versions/common/seaslog.sh
  48. 4
      plugins/php/versions/common/sg11.sh
  49. 2
      plugins/php/versions/common/sodium.sh
  50. 2
      plugins/php/versions/common/solr.sh
  51. 2
      plugins/php/versions/common/swoole.sh
  52. 2
      plugins/php/versions/common/xdebug.sh
  53. 2
      plugins/php/versions/common/xhprof.sh
  54. 2
      plugins/php/versions/common/yac.sh
  55. 2
      plugins/php/versions/common/yaf.sh
  56. 2
      plugins/php/versions/common/yaml.sh
  57. 2
      plugins/php/versions/common/yar.sh
  58. 2
      plugins/php/versions/common/zip.sh
  59. 2
      plugins/php/versions/common/zlib.sh
  60. 2
      plugins/php/versions/lib.sh
  61. 4
      plugins/sphinx/install.sh
  62. 1
      scripts/install/macos.sh

@ -6,7 +6,7 @@ curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
sysName=`uname`
install_tmp=${rootPath}/tmp/mw_install.pl
if id www &> /dev/null ;then
@ -81,7 +81,7 @@ if [ "${action}" == "install" ] && [ -d ${serverPath}/php/${type} ];then
echo "install PHP${type} extend end"
if [ ! -f /usr/local/bin/composer ];then
if [ ! -f /usr/local/bin/composer ] && [ "$sysName" != "Darwin" ] ;then
cd /tmp
curl -sS https://getcomposer.org/installer | /www/server/php/${type}/bin/php
mv composer.phar /usr/local/bin/composer

@ -14,15 +14,25 @@ SERVER_ROOT=$rootPath/lib
SOURCE_ROOT=$rootPath/source/lib
HTTP_PREFIX="https://"
LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/"
fi
if [ ! -d ${SERVER_ROOT}/icu ];then
cd ${SOURCE_ROOT}
if [ "$LOCAL_ADDR" == 'cn' ];then
if [ ! -f ${SOURCE_ROOT}/icu4c-52_2-src.tgz ];then
wget --no-check-certificate -O ${SOURCE_ROOT}/icu4c-52_2-src.tgz https://dl.midoks.me/lib/icu4c-52_2-src.tgz -T 20
fi
fi
if [ ! -f ${SOURCE_ROOT}/icu4c-52_2-src.tgz ];then
wget --no-check-certificate -O ${SOURCE_ROOT}/icu4c-52_2-src.tgz ${HTTP_PREFIX}github.com/unicode-org/icu/releases/download/release-52-2/icu4c-52_2-src.tgz
wget --no-check-certificate -O ${SOURCE_ROOT}/icu4c-52_2-src.tgz https://github.com/unicode-org/icu/releases/download/release-52-2/icu4c-52_2-src.tgz
fi
if [ ! -d ${SERVER_ROOT}/lib/icu/lib ];then

@ -14,18 +14,35 @@ SERVER_ROOT=$rootPath/lib
SOURCE_ROOT=$rootPath/source/lib
HTTP_PREFIX="https://"
LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/"
fi
if [ ! -d ${SERVER_ROOT}/libiconv ];then
cd $SOURCE_ROOT
wget --no-check-certificate -O libiconv-1.15.tar.gz ${HTTP_PREFIX}github.com/midoks/mdserver-web/releases/download/init/libiconv-1.15.tar.gz -T 5
tar zxvf libiconv-1.15.tar.gz
cd libiconv-1.15
if [ "$LOCAL_ADDR" == 'cn' ];then
if [ ! -f ${SOURCE_ROOT}/libiconv-1.15.tar.gz ];then
wget --no-check-certificate -O libiconv-1.15.tar.gz https://dl.midoks.me/lib/libiconv-1.15.tar.gz -T 20
fi
fi
if [ ! -f ${SOURCE_ROOT}/libiconv-1.15.tar.gz ];then
wget --no-check-certificate -O libiconv-1.15.tar.gz https:/github.com/midoks/mdserver-web/releases/download/init/libiconv-1.15.tar.gz -T 5
fi
if [ ! -d ${SOURCE_ROOT}/libiconv-1.15 ];then
cd $SOURCE_ROOT && tar -zxvf libiconv-1.15.tar.gz
fi
cd ${SOURCE_ROOT}/libiconv-1.15
./configure --prefix=${SERVER_ROOT}/libiconv --enable-static && make && make install
cd $SOURCE_ROOT && rm -rf $SOURCE_ROOT/libiconv-1.15
#rm -rf libiconv-1.15
#rm -rf libiconv-1.15.tar.gz
if [ -d $SOURCE_ROOT/libiconv-1.15 ];then
cd $SOURCE_ROOT && rm -rf $SOURCE_ROOT/libiconv-1.15
fi
fi

@ -16,8 +16,10 @@ SOURCE_ROOT=$rootPath/source/lib
mkdir -p $SOURCE_ROOT
HTTP_PREFIX="https://"
LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/"
fi
# HTTP_PREFIX="https://"
@ -25,8 +27,19 @@ fi
if [ ! -d ${SERVER_ROOT}/libzip ];then
cd $SOURCE_ROOT
if [ "$LOCAL_ADDR" == 'cn' ];then
if [ ! -f ${SOURCE_ROOT}/libzip-1.3.2.tar.gz ];then
wget --no-check-certificate -O libzip-1.3.2.tar.gz https://dl.midoks.me/lib/libzip-1.3.2.tar.gz -T 20
fi
fi
# if [ ! -f ${SOURCE_ROOT}/libzip-1.3.2.tar.gz ];then
# wget --no-check-certificate -O libzip-1.3.2.tar.gz ${HTTP_PREFIX}github.com/midoks/mdserver-web/releases/download/init/libzip-1.3.2.tar.gz -T 20
# fi
if [ ! -f ${SOURCE_ROOT}/libzip-1.3.2.tar.gz ];then
wget --no-check-certificate -O libzip-1.3.2.tar.gz ${HTTP_PREFIX}github.com/midoks/mdserver-web/releases/download/init/libzip-1.3.2.tar.gz -T 20
wget --no-check-certificate -O libzip-1.3.2.tar.gz https://github.com/midoks/mdserver-web/releases/download/init/libzip-1.3.2.tar.gz -T 20
fi
if [ ! -d ${SOURCE_ROOT}/libzip-1.3.2 ];then

@ -15,16 +15,30 @@ SERVER_ROOT=$rootPath/lib
SOURCE_ROOT=$rootPath/source/lib
HTTP_PREFIX="https://"
LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/"
fi
if [ ! -d ${SERVER_ROOT}/openssl10 ];then
cd ${SOURCE_ROOT}
if [ "$LOCAL_ADDR" == 'cn' ];then
if [ ! -f ${SOURCE_ROOT}/openssl-${opensslVersion}.tar.gz ];then
wget --no-check-certificate -O openssl-${opensslVersion}.tar.gz https://dl.midoks.me/lib/openssl-${opensslVersion}.tar.gz -T 20
fi
fi
# if [ ! -f ${SOURCE_ROOT}/openssl-${opensslVersion}.tar.gz ];then
# wget --no-check-certificate ${HTTP_PREFIX}/midoks/mdserver-web/releases/download/init/openssl-${opensslVersion}.tar.gz -T 20
# fi
if [ ! -f ${SOURCE_ROOT}/openssl-${opensslVersion}.tar.gz ];then
wget --no-check-certificate ${HTTP_PREFIX}github.com/midoks/mdserver-web/releases/download/init/openssl-${opensslVersion}.tar.gz -T 20
fi
wget --no-check-certificate -O openssl-${opensslVersion}.tar.gz https://github.com/midoks/mdserver-web/releases/download/init/openssl-${opensslVersion}.tar.gz -T 20
fi
tar -zxf openssl-${opensslVersion}.tar.gz
cd openssl-${opensslVersion}
./config --openssldir=${SERVER_ROOT}/openssl10 zlib-dynamic shared

@ -16,8 +16,10 @@ SOURCE_ROOT=$rootPath/source/lib
mkdir -p $SOURCE_ROOT
HTTP_PREFIX="https://"
LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://ghproxy.com/"
fi
# HTTP_PREFIX="https://"
@ -25,9 +27,19 @@ fi
if [ ! -d ${SERVER_ROOT}/zlib ];then
cd $SOURCE_ROOT
if [ "$LOCAL_ADDR" == 'cn' ];then
if [ ! -f ${SOURCE_ROOT}/${SOURCE_ROOT}/zlib-1.2.11.tar.gz ];then
wget --no-check-certificate -O ${SOURCE_ROOT}/zlib-1.2.11.tar.gz https://dl.midoks.me/lib/zlib-1.2.11.tar.gz -T 20
fi
fi
# if [ ! -f ${SOURCE_ROOT}/zlib-1.2.11.tar.gz ];then
# wget --no-check-certificate -O ${SOURCE_ROOT}/zlib-1.2.11.tar.gz ${HTTP_PREFIX}github.com/madler/zlib/archive/v1.2.11.tar.gz -T 20
# fi
if [ ! -f ${SOURCE_ROOT}/zlib-1.2.11.tar.gz ];then
echo "wget --no-check-certificate -O ${SOURCE_ROOT}/zlib-1.2.11.tar.gz ${HTTP_PREFIX}github.com/madler/zlib/archive/v1.2.11.tar.gz -T 20"
wget --no-check-certificate -O ${SOURCE_ROOT}/zlib-1.2.11.tar.gz ${HTTP_PREFIX}github.com/madler/zlib/archive/v1.2.11.tar.gz -T 20
wget --no-check-certificate -O ${SOURCE_ROOT}/zlib-1.2.11.tar.gz https://github.com/madler/zlib/archive/v1.2.11.tar.gz -T 20
fi
if [ ! -d ${SOURCE_ROOT}/zlib-1.2.11 ];then

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")
@ -142,6 +142,7 @@ if [ ! -d $serverPath/php/53/bin ];then
make clean && make -j${cpuCore} && make install && make clean
# rm -rf $sourcePath/php/php${PHP_VER}
echo "安装php-${version}成功"
fi

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")
@ -131,6 +131,7 @@ if [ ! -d $serverPath/php/55 ];then
make clean && make -j${cpuCore} && make install && make clean
# rm -rf $sourcePath/php/php${PHP_VER}
echo "安装php-${version}成功"
fi
#------------------------ install end ------------------------------------#

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
# cd /www/server/mdserver-web/plugins/php && /bin/bash install.sh install 56
@ -59,13 +59,13 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER}
fi
OPTIONS=''
OPTIONS='--without-iconv'
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
OPTIONS="${OPTIONS} --with-curl=$(brew --prefix curl)"
OPTIONS="${OPTIONS} --with-zlib-dir=$(brew --prefix zlib)"
OPTIONS="${OPTIONS} --with-external-pcre=$(brew --prefix pcre2)"
else
OPTIONS='--without-iconv'
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-curl"
fi

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")
@ -57,13 +57,12 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER}
fi
OPTIONS=''
OPTIONS='--without-iconv'
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
OPTIONS="${OPTIONS} --with-curl"
OPTIONS="${OPTIONS} --with-external-pcre=$(brew --prefix pcre2)"
else
OPTIONS='--without-iconv'
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-curl"
fi
@ -135,7 +134,7 @@ Uninstall_php()
{
$serverPath/php/init.d/php70 stop
rm -rf $serverPath/php/70
echo "卸载php-7.0.30 ..." > $install_tmp
echo "卸载php-7.0.30 ..."
}
action=${1}

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")
@ -60,7 +60,9 @@ fi
OPTIONS=''
OPTIONS='--without-iconv'
if [ $sysName == 'Darwin' ]; then
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
OPTIONS="${OPTIONS} --with-curl"
OPTIONS="${OPTIONS} --with-external-pcre=$(brew --prefix pcre2)"
else
OPTIONS="${OPTIONS} --with-curl"
fi

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")
@ -16,7 +16,7 @@ PHP_VER=72
Install_php()
{
#------------------------ install start ------------------------------------#
echo "安装php-${version} ..." > $install_tmp
echo "安装php-${version} ..."
mkdir -p $sourcePath/php
mkdir -p $serverPath/php
@ -58,12 +58,10 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER}
fi
OPTIONS=''
OPTIONS='--without-iconv'
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
OPTIONS="${OPTIONS} --with-curl"
else
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl"
fi
@ -97,6 +95,12 @@ else
fi
# ----- cpu end ------
if [ "${SYS_ARCH}" == "arm64" ];then
# 修复arm64架构下安装
# /www/server/mdserver-web/plugins/php/versions/72/src/reentrancy.c > /www/server/source/php/php72/main/reentrancy.c
cat ${curPath}/versions/${PHP_VER}/src/reentrancy.c > $sourcePath/php/php${PHP_VER}/main/reentrancy.c
fi
if [ ! -d $serverPath/php/72 ];then
cd $sourcePath/php/php${PHP_VER} && ./configure \
--prefix=$serverPath/php/72 \
@ -132,7 +136,7 @@ Uninstall_php()
{
$serverPath/php/init.d/php72 stop
rm -rf $serverPath/php/72
echo "卸载php-${version}..." > $install_tmp
echo "卸载php-${version}..."
}
action=${1}

@ -0,0 +1,450 @@
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2018 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#include <sys/types.h>
#include <string.h>
#include <errno.h>
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#include "php_reentrancy.h"
#include "ext/standard/php_rand.h" /* for PHP_RAND_MAX */
enum {
LOCALTIME_R,
CTIME_R,
ASCTIME_R,
GMTIME_R,
READDIR_R,
NUMBER_OF_LOCKS
};
#if defined(PHP_NEED_REENTRANCY)
#include <TSRM.h>
static MUTEX_T reentrant_locks[NUMBER_OF_LOCKS];
#define local_lock(x) tsrm_mutex_lock(reentrant_locks[x])
#define local_unlock(x) tsrm_mutex_unlock(reentrant_locks[x])
#else
#define local_lock(x)
#define local_unlock(x)
#endif
#if defined(PHP_IRIX_TIME_R)
#define HAVE_CTIME_R 1
#define HAVE_ASCTIME_R 1
PHPAPI char *php_ctime_r(const time_t *clock, char *buf)
{
if (ctime_r(clock, buf) == buf)
return (buf);
return (NULL);
}
PHPAPI char *php_asctime_r(const struct tm *tm, char *buf)
{
if (asctime_r(tm, buf) == buf)
return (buf);
return (NULL);
}
#endif
#if defined(PHP_HPUX_TIME_R)
#define HAVE_LOCALTIME_R 1
#define HAVE_CTIME_R 1
#define HAVE_ASCTIME_R 1
#define HAVE_GMTIME_R 1
PHPAPI struct tm *php_localtime_r(const time_t *const timep, struct tm *p_tm)
{
if (localtime_r(timep, p_tm) == 0)
return (p_tm);
return (NULL);
}
PHPAPI char *php_ctime_r(const time_t *clock, char *buf)
{
if (ctime_r(clock, buf, 26) != -1)
return (buf);
return (NULL);
}
PHPAPI char *php_asctime_r(const struct tm *tm, char *buf)
{
if (asctime_r(tm, buf, 26) != -1)
return (buf);
return (NULL);
}
PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm)
{
if (gmtime_r(timep, p_tm) == 0)
return (p_tm);
return (NULL);
}
#endif
#if defined(__BEOS__)
PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm)
{
/* Modified according to LibC definition */
if (((struct tm*)gmtime_r(timep, p_tm)) == p_tm)
return (p_tm);
return (NULL);
}
#endif /* BEOS */
#if !defined(HAVE_POSIX_READDIR_R)
PHPAPI int php_readdir_r(DIR *dirp, struct dirent *entry,
struct dirent **result)
{
#if defined(HAVE_OLD_READDIR_R)
int ret = 0;
/* We cannot rely on the return value of readdir_r
as it differs between various platforms
(HPUX returns 0 on success whereas Solaris returns non-zero)
*/
entry->d_name[0] = '\0';
readdir_r(dirp, entry, result);
if (entry->d_name[0] == '\0') {
*result = NULL;
ret = errno;
} else {
*result = entry;
}
return ret;
#else
struct dirent *ptr;
int ret = 0;
local_lock(READDIR_R);
errno = 0;
ptr = readdir(dirp);
if (!ptr && errno != 0)
ret = errno;
if (ptr)
memcpy(entry, ptr, sizeof(*ptr));
*result = ptr;
local_unlock(READDIR_R);
return ret;
#endif
}
#endif
#if !defined(HAVE_LOCALTIME_R) && defined(HAVE_LOCALTIME)
PHPAPI struct tm *php_localtime_r(const time_t *const timep, struct tm *p_tm)
{
struct tm *tmp;
local_lock(LOCALTIME_R);
tmp = localtime(timep);
if (tmp) {
memcpy(p_tm, tmp, sizeof(struct tm));
tmp = p_tm;
}
local_unlock(LOCALTIME_R);
return tmp;
}
#endif
#if !defined(HAVE_CTIME_R) && defined(HAVE_CTIME)
PHPAPI char *php_ctime_r(const time_t *clock, char *buf)
{
char *tmp;
local_lock(CTIME_R);
tmp = ctime(clock);
strcpy(buf, tmp);
local_unlock(CTIME_R);
return buf;
}
#endif
#if !defined(HAVE_ASCTIME_R) && defined(HAVE_ASCTIME)
PHPAPI char *php_asctime_r(const struct tm *tm, char *buf)
{
char *tmp;
local_lock(ASCTIME_R);
tmp = asctime(tm);
strcpy(buf, tmp);
local_unlock(ASCTIME_R);
return buf;
}
#endif
#if !defined(HAVE_GMTIME_R) && defined(HAVE_GMTIME)
PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm)
{
struct tm *tmp;
local_lock(GMTIME_R);
tmp = gmtime(timep);
if (tmp) {
memcpy(p_tm, tmp, sizeof(struct tm));
tmp = p_tm;
}
local_unlock(GMTIME_R);
return tmp;
}
#endif
#if defined(PHP_NEED_REENTRANCY)
void reentrancy_startup(void)
{
int i;
for (i = 0; i < NUMBER_OF_LOCKS; i++) {
reentrant_locks[i] = tsrm_mutex_alloc();
}
}
void reentrancy_shutdown(void)
{
int i;
for (i = 0; i < NUMBER_OF_LOCKS; i++) {
tsrm_mutex_free(reentrant_locks[i]);
}
}
#endif
#ifndef HAVE_RAND_R
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* Posix rand_r function added May 1999 by Wes Peters <wes@softweyr.com>.
*/
#include <sys/types.h>
#include <stdlib.h>
static int
do_rand(unsigned long *ctx)
{
return ((*ctx = *ctx * 1103515245 + 12345) % ((u_long)PHP_RAND_MAX + 1));
}
PHPAPI int
php_rand_r(unsigned int *ctx)
{
u_long val = (u_long) *ctx;
*ctx = do_rand(&val);
return (int) *ctx;
}
#endif
#ifndef HAVE_STRTOK_R
/*
* Copyright (c) 1998 Softweyr LLC. All rights reserved.
*
* strtok_r, from Berkeley strtok
* Oct 13, 1998 by Wes Peters <wes@softweyr.com>
*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notices, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notices, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
*
* This product includes software developed by Softweyr LLC, the
* University of California, Berkeley, and its contributors.
*
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SOFTWEYR LLC, THE REGENTS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTWEYR LLC, THE
* REGENTS, OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stddef.h>
PHPAPI char *
php_strtok_r(char *s, const char *delim, char **last)
{
char *spanp;
int c, sc;
char *tok;
if (s == NULL && (s = *last) == NULL)
{
return NULL;
}
/*
* Skip (span) leading delimiters (s += strspn(s, delim), sort of).
*/
cont:
c = *s++;
for (spanp = (char *)delim; (sc = *spanp++) != 0; )
{
if (c == sc)
{
goto cont;
}
}
if (c == 0) /* no non-delimiter characters */
{
*last = NULL;
return NULL;
}
tok = s - 1;
/*
* Scan token (scan for delimiters: s += strcspn(s, delim), sort of).
* Note that delim must have one NUL; we stop if we see that, too.
*/
for (;;)
{
c = *s++;
spanp = (char *)delim;
do
{
if ((sc = *spanp++) == c)
{
if (c == 0)
{
s = NULL;
}
else
{
char *w = s - 1;
*w = '\0';
}
*last = s;
return tok;
}
}
while (sc != 0);
}
/* NOTREACHED */
}
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")
@ -20,7 +20,7 @@ PHP_VER=73
Install_php()
{
#------------------------ install start ------------------------------------#
echo "安装php-${version} ..." > $install_tmp
echo "安装php-${version} ..."
mkdir -p $sourcePath/php
mkdir -p $serverPath/php
@ -65,9 +65,9 @@ fi
OPTIONS=''
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
# OPTIONS="${OPTIONS} --with-libzip=${serverPath}/lib/libzip"
# OPTIONS="${OPTIONS} --enable-zip"
OPTIONS="${OPTIONS} --with-curl"
OPTIONS="${OPTIONS} --with-external-pcre=$(brew --prefix pcre2)"
else
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl"
@ -137,6 +137,8 @@ if [ ! -d $serverPath/php/73 ];then
make clean && make -j${cpuCore} && make install && make clean
# rm -rf $sourcePath/php/php${PHP_VER}
echo "安装php-${version}成功"
fi
#------------------------ install end ------------------------------------#
@ -146,7 +148,7 @@ Uninstall_php()
{
$serverPath/php/init.d/php73 stop
rm -rf $serverPath/php/73
echo "卸载php-${version}..." > $install_tmp
echo "卸载php-${version}..."
}
action=${1}

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")
@ -20,10 +20,12 @@ PHP_VER=74
Install_php()
{
#------------------------ install start ------------------------------------#
echo "安装php-${version} ..." > $install_tmp
echo "安装php-${version} ..."
mkdir -p $sourcePath/php
mkdir -p $serverPath/php
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php/lib && /bin/bash libzip.sh
# cd /www/server/mdserver-web/plugins/php/lib && /bin/bash libzip.sh
cd ${rootPath}/plugins/php/lib && /bin/bash freetype_new.sh
cd ${rootPath}/plugins/php/lib && /bin/bash zlib.sh
cd ${rootPath}/plugins/php/lib && /bin/bash libzip.sh
@ -80,13 +82,15 @@ cd $sourcePath/php/php${PHP_VER}
OPTIONS=''
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
# OPTIONS="${OPTIONS} --enable-zip"
OPTIONS="${OPTIONS} --with-curl"
OPTIONS="${OPTIONS} --with-external-pcre=$(brew --prefix pcre2)"
# BREW_DIR=`which brew`
# BREW_DIR=${BREW_DIR/\/bin\/brew/}
# XML_LIB_DEPEND_DIR=`brew info libxml2 | grep /opt/homebrew/Cellar/libxml2 | cut -d \ -f 1 | awk 'END {print}'`
# XML_LIB_DEPEND_DIR=`brew info libxml2 | grep ${BREW_DIR}/Cellar/libxml2 | cut -d \ -f 1 | awk 'END {print}'`
# OPTIONS="${OPTIONS} --with-libxml=${XML_LIB_DEPEND_DIR}"
export PATH="/usr/local/opt/bison/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/bison/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig"
export LDFLAGS="-L/usr/local/opt/libxml2/lib"
else
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl"
@ -131,7 +135,6 @@ else
cpuCore="1"
fi
# ----- cpu end ------
if [ ! -d $serverPath/php/${PHP_VER} ];then
cd $sourcePath/php/php${PHP_VER} && make clean
# ./buildconf --force
@ -160,6 +163,8 @@ if [ ! -d $serverPath/php/${PHP_VER} ];then
make clean && make -j${cpuCore} && make install && make clean
# rm -rf $sourcePath/php/php${PHP_VER}
echo "安装php-${version}成功"
fi
#------------------------ install end ------------------------------------#
}
@ -168,7 +173,7 @@ Uninstall_php()
{
$serverPath/php/init.d/php${PHP_VER} stop
rm -rf $serverPath/php/${PHP_VER}
echo "卸载php-${version}..." > $install_tmp
echo "卸载php-${version}..."
}
action=${1}

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")
@ -71,17 +71,11 @@ fi
cd $sourcePath/php/php${PHP_VER}
OPTIONS=''
OPTIONS='--without-iconv'
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
export PATH="/usr/local/opt/bison/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/bison/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig"
export LDFLAGS="-L/usr/local/opt/libxml2/lib"
OPTIONS="${OPTIONS} --with-curl"
OPTIONS="${OPTIONS} --with-external-pcre=$(brew --prefix pcre2)"
else
OPTIONS='--without-iconv'
# OPTIONS="--with-iconv=${serverPath}/lib/libiconv"
OPTIONS="${OPTIONS} --with-curl"
fi
@ -92,10 +86,10 @@ if [ "$IS_64BIT" == "64" ];then
fi
argon_version=`pkg-config libargon2 --modversion`
if [ "$?" == "0" ];then
OPTIONS="${OPTIONS} --with-password-argon2"
fi
# argon_version=`pkg-config libargon2 --modversion`
# if [ "$?" == "0" ];then
# OPTIONS="${OPTIONS} --with-password-argon2"
# fi
ZIP_OPTION='--with-zip'

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")
@ -71,16 +71,10 @@ fi
cd $sourcePath/php/php${PHP_VER}
OPTIONS=''
OPTIONS='--without-iconv'
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
export PATH="/usr/local/opt/bison/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/bison/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig"
export LDFLAGS="-L/usr/local/opt/libxml2/lib"
OPTIONS="${OPTIONS} --with-curl"
else
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl"
fi

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")
@ -72,12 +72,10 @@ fi
cd $sourcePath/php/php${PHP_VER}
OPTIONS=''
OPTIONS='--without-iconv'
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
OPTIONS="${OPTIONS} --with-curl"
else
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl"
fi

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")
@ -71,12 +71,10 @@ fi
cd $sourcePath/php/php${PHP_VER}
OPTIONS=''
OPTIONS='--without-iconv'
if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl"
OPTIONS="${OPTIONS} --with-curl"
else
OPTIONS='--without-iconv'
OPTIONS="${OPTIONS} --with-curl"
fi

@ -0,0 +1,70 @@
#! /bin/sh
export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/opt/local/share/man:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/homebrew/bin
DIR=$(cd "$(dirname "$0")"; pwd)
ROOT_DIR=$(cd "$(dirname "$0")"; pwd)
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php && bash install.sh install 72
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php/versions/common && bash mcrypt.sh install 82
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php/lib && bash libmcrypt.sh
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/scripts/quick && bash debug.sh
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php/versions && /bin/bash all_mac.sh
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php && bash install.sh install 55
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php/versions/common && bash gd.sh install 73
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/php/versions/common && bash swoole.sh install 54
# PHP_VER=52
# echo "php${PHP_VER} -- start"
# cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}')
# cd $DIR && /bin/bash install.sh install $PHP_VER
# for ii in $cmd_ext
# do
# if [ "install.sh" == "$ii" ];then
# echo '' > /tmp/t.log
# else
# cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER
# fi
# done
# echo "php${PHP_VER} -- end"
PHP_VER_LIST=(53 54 55 56 70 71 72 73 74 80 81 82)
# PHP_VER_LIST=(81)
for PHP_VER in ${PHP_VER_LIST[@]}; do
echo "php${PHP_VER} -- start"
if [ ! -d /Users/midoks/Desktop/mwdev/server/php/${PHP_VER} ];then
cd /Users/midoks/Desktop/mwdev//server/mdserver-web/plugins/php && bash install.sh install ${PHP_VER}
fi
echo "php${PHP_VER} -- end"
done
cd $DIR
PHP_VER_LIST=(53 54 55 56 70 71 72 73 74 80 81 82)
# yar
PHP_EXT_LIST=(ZendGuardLoader pdo mysqlnd sqlite3 openssl opcache mcrypt fileinfo \
exif gd intl pcntl memcache memcached redis imagemagick xdebug \
swoole yac apc mongo mongodb solr seaslog mbstring iconv)
for PHP_VER in ${PHP_VER_LIST[@]}; do
echo "php${PHP_VER} -- start"
if [ ! -d /www/server/php/${PHP_VER} ];then
echo "php${PHP_VER} is not install!"
continue
fi
NON_ZTS_FILENAME=`ls /Users/midoks/Desktop/mwdev/server/php/${PHP_VER}/lib/php/extensions | grep no-debug-non-zts`
for EXT in ${PHP_EXT_LIST[@]}; do
extFile=/www/server/php/${PHP_VER}/lib/php/extensions/${NON_ZTS_FILENAME}/${EXT}.so
echo "${PHP_VER} ${EXT} start"
if [ ! -f $extFile ];then
bash common.sh $PHP_VER install ${EXT}
fi
echo "${PHP_VER} ${EXT} end"
done
echo "php${PHP_VER} -- end"
done

@ -1,5 +1,7 @@
#! /bin/sh
export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/opt/local/share/man:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/homebrew/bin
export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/opt/local/share/man:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
export PATH=$PATH:/opt/homebrew/bin
DIR=$(cd "$(dirname "$0")"; pwd)
ROOT_DIR=$(cd "$(dirname "$0")"; pwd)

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")
@ -14,7 +14,7 @@ actionType=$1
version=$2
LIBNAME=mcrypt
LIBV=1.0.5
LIBV=1.0.6
if [ "$version" -lt "72" ];then
echo "not need"
@ -64,6 +64,10 @@ Install_lib()
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
fi
if [ "$sysName" == "Darwin" ];then
OPTIONS="$OPTIONS --with-mcrypt=$(brew --prefix mcrypt)"
fi
$serverPath/php/$version/bin/phpize
./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS
make clean && make && make install && make clean

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
@ -62,10 +62,16 @@ Install_lib()
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
fi
pkg-config --exists libmemcached
if [ "$?" != "0" ]; then
cd ${rootPath}/plugins/php/lib && /bin/bash libmemcached.sh
OPTIONS="$OPTIONS --with-libmemcached-dir=${serverPath}/lib/libmemcached"
if [ "$sysName" == "Darwin" ];then
OPTIONS="$OPTIONS --with-zlib-dir=$(brew --prefix zlib)"
OPTIONS="$OPTIONS --with-libmemcached-dir=$(brew --prefix libmemcached)"
else
pkg-config --exists libmemcached
if [ "$?" != "0" ]; then
cd ${rootPath}/plugins/php/lib && /bin/bash libmemcached.sh
OPTIONS="$OPTIONS --with-libmemcached-dir=${serverPath}/lib/libmemcached"
fi
fi
# sed -i '_bak' "3237,3238s#ulong#zend_ulong#g" $php_lib/${LIBNAME}-${LIBV}/php_memcached.c

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
@ -47,7 +47,10 @@ Install_lib()
fi
if [ "$sysName" == "Darwin" ] ;then
LIB_DEPEND_DIR=`brew info openssl@1.1 | grep /usr/local/Cellar/openssl | cut -d \ -f 1 | awk 'END {print}'`
BREW_DIR=`which brew`
BREW_DIR=${BREW_DIR/\/bin\/brew/}
LIB_DEPEND_DIR=`brew info openssl@1.1 | grep ${BREW_DIR}/Cellar/openssl | cut -d \ -f 1 | awk 'END {print}'`
export PKG_CONFIG_PATH=$LIB_DEPEND_DIR/lib/pkgconfig
fi
@ -65,7 +68,7 @@ Install_lib()
# openssl_version=`pkg-config openssl --modversion`
# export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig
if [ "$version" -lt "81" ];then
if [ "$version" -lt "81" ] && [ "$sysName" != "Darwin" ];then
export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig
fi

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,8 +1,8 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
curPath=`pwd`
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
rootPath=$(dirname "$rootPath")

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`

@ -1,6 +1,6 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
export PATH=$PATH:/opt/homebrew/bin
curPath=`pwd`
rootPath=$(dirname "$curPath")

@ -58,6 +58,10 @@ Install_sphinx()
cd ${rootPath} && python3 ${rootPath}/plugins/sphinx/index.py start
cd ${rootPath} && python3 ${rootPath}/plugins/sphinx/index.py initd_install
fi
if [ -d ${SPHINX_DIR}/sphinx-${VERSION} ];then
rm -rf ${SPHINX_DIR}/sphinx-${VERSION}
fi
}
Uninstall_sphinx()

@ -27,6 +27,7 @@ brew install libzip bzip2 gcc openssl re2c cmake
brew install librdkafka
brew install coreutils libxml2 xml2
brew install md5sum libevent pidof bison
brew install pcre2 libxpm libelf
if [ ! -d $DEV/server/mdserver-web ]; then
wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master

Loading…
Cancel
Save