Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions build.default.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ release.stability = beta
api.version = 0.1.5
api.stability = beta

php.version = 5.5.8
php.version = 5.5.10
php.configure = --prefix=/opt/appserver \
--enable-debug \
--enable-sockets \
--enable-fpm \
--enable-maintainer-zts \
Expand All @@ -39,7 +40,7 @@ php.configure = --prefix=/opt/appserver \
--with-zlib \

zmq.version = dev-master
pthreads.version = dev-master
pthreads.version = 1.0.1
memcached.version = 2.1.0
redis.version = 2.2.3
apcu.version = 4.0.2
Expand Down
40 changes: 23 additions & 17 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,52 +161,58 @@
<!-- Prepares the PHP sources for the runtime -->
<!-- ==================================================================== -->
<target name="prepare-source" depends="prepare" description="Prepares the PHP sources for the runtime.">
<!-- prepare PHP sources -->
<!-- prepare PHP sources -->
<antcall target="get-php-src"/>
<untar src="/tmp/php-${php.version}.tar.gz" dest="${c-build.dir}" compression="gzip"/>
<chmod perm="755">
<fileset dir="${c-build.dir}/php-${php.version}/build">
<include name="**/*"/>
</fileset>
</chmod>

<!-- recreate symlink -->
<delete file="${c-build.dir}/php" followsymlinks="false" removenotfollowedsymlinks="true" />
<symlink link="${c-build.dir}/php" resource="${c-build.dir}/php-${php.version}"/>

<!--
<antcall target="get-pthreads-src"/>
<untar src="/tmp/pthreads-${pthreads.version}.tgz" dest="/tmp" compression="gzip"/>
<move todir="${c-build.dir}/php-${php.version}/ext/pthreads">
<move todir="${c-build.dir}/php/ext/pthreads">
<fileset dir="/tmp/pthreads-${pthreads.version}"/>
</move>
-->

<exec executable="git" dir="${c-build.dir}/php-${php.version}/ext">
<!-- pthreads head
<exec executable="git" dir="${c-build.dir}/php/ext">
<arg line="clone https://github.com/krakjoe/pthreads.git"/>
</exec>
-->

<exec executable="git" dir="${c-build.dir}/php-${php.version}/ext">
<!-- zmq head
<exec executable="git" dir="${c-build.dir}/php/ext">
<arg line="clone https://github.com/mkoppanen/php-zmq.git zmq"/>
</exec>
-->

<antcall target="get-memcached-src"/>
<untar src="/tmp/memcached-${memcached.version}.tgz" dest="/tmp" compression="gzip"/>
<move todir="${c-build.dir}/php-${php.version}/ext/memcached">
<move todir="${c-build.dir}/php/ext/memcached">
<fileset dir="/tmp/memcached-${memcached.version}"/>
</move>

<antcall target="get-redis-src"/>
<untar src="/tmp/redis-${redis.version}.tgz" dest="/tmp" compression="gzip"/>
<move todir="${c-build.dir}/php-${php.version}/ext/redis">
<move todir="${c-build.dir}/php/ext/redis">
<fileset dir="/tmp/redis-${redis.version}"/>
</move>

<antcall target="get-apcu-src"/>
<untar src="/tmp/apcu-${apcu.version}.tgz" dest="/tmp" compression="gzip"/>
<move todir="${c-build.dir}/php-${php.version}/ext/apcu">
<move todir="${c-build.dir}/php/ext/apcu">
<fileset dir="/tmp/apcu-${apcu.version}"/>
</move>

<antcall target="get-xdebug-src"/>
<untar src="/tmp/xdebug-${xdebug.version}.tgz" dest="/tmp" compression="gzip"/>
<move todir="${c-build.dir}/php-${php.version}/ext/xdebug">
<move todir="${c-build.dir}/php/ext/xdebug">
<fileset dir="/tmp/xdebug-${xdebug.version}"/>
</move>
</target>
Expand All @@ -215,14 +221,14 @@
<!-- Init the PHP source for the build environment -->
<!-- ==================================================================== -->
<target name="configure" description="Configures the php runtime environment.">
<delete file="${c-build.dir}/php-${php.version}/aclocal.m4"/>
<delete file="${c-build.dir}/php-${php.version}/configure"/>
<exec dir="${c-build.dir}/php-${php.version}" executable="sh">
<delete file="${c-build.dir}/php/aclocal.m4"/>
<delete file="${c-build.dir}/php/configure"/>
<exec dir="${c-build.dir}/php" executable="sh">
<arg value="buildconf"/>
<arg line="--force"/>
</exec>
<!-- configure, compile and install PHP binary -->
<exec dir="${c-build.dir}/php-${php.version}" executable="sh">
<exec dir="${c-build.dir}/php" executable="sh">
<!-- <env key="CC" value="${php.cc}"/> -->
<arg line="configure ${php.configure}"/>
</exec>
Expand All @@ -232,7 +238,7 @@
<!-- Makes the PHP source for the PHP build runtime -->
<!-- ==================================================================== -->
<target name="make" description="Compiles the php runtime environment.">
<exec dir="${c-build.dir}/php-${php.version}" executable="make"/>
<exec dir="${c-build.dir}/php" executable="make"/>
</target>

<!-- ==================================================================== -->
Expand All @@ -259,8 +265,8 @@
<!-- Runs php tests -->
<!-- ==================================================================== -->
<target name="run-tests" description="Runs the php tests">
<exec dir="${c-build.dir}/php-${php.version}" executable="php">
<env key="TEST_PHP_EXECUTABLE" value="${c-build.dir}/php-${php.version}/sapi/cli/php"/>
<exec dir="${c-build.dir}/php" executable="php">
<env key="TEST_PHP_EXECUTABLE" value="${c-build.dir}/php/sapi/cli/php"/>
<arg line="./run-tests.php ${c-php-tests.dir}"/>
</exec>
</target>
Expand Down
4 changes: 2 additions & 2 deletions appserver.launch → launch/appserver.launch
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-d date.timezone=Europe/Berlin -d zend_extension=${project_loc}/build/php-5.5.9/modules/xdebug.so /opt/appserver/server.php"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/php-5.5.9/sapi/cli/php"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-d date.timezone=Europe/Berlin -d zend_extension=${project_loc}/build/php/modules/xdebug.so /opt/appserver/server.php"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/php/sapi/cli/php"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="php-ext-appserver"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.macosx.base.1221491367"/>
Expand Down
4 changes: 2 additions & 2 deletions php-ext-appserver.launch → launch/php-ext-appserver.launch
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="build/php-5.5.9/ext/appserver/appserver.php"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/php-5.5.9/sapi/cli/php"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-dappserver.remove_constants=PHP_SAPI, build/php/ext/appserver/appserver.php"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/php/sapi/cli/php"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="php-ext-appserver"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.macosx.base.1221491367"/>
Expand Down
4 changes: 2 additions & 2 deletions webserver.launch → launch/webserver.launch
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-d date.timezone=Europe/Berlin -d zend_extension=${project_loc}/build/php-5.5.8/modules/xdebug.so /home/zelgerj/Repositories/TechDivision_WebServer/src/bin/webserver"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/php-5.5.8/sapi/cli/php"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-d date.timezone=Europe/Berlin -d zend_extension=${project_loc}/build/php/modules/xdebug.so /home/zelgerj/Repositories/TechDivision_WebServer/src/bin/webserver"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/php/sapi/cli/php"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="php-ext-appserver"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.macosx.base.1221491367"/>
Expand Down
4 changes: 2 additions & 2 deletions src/appserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
* @author Johann Zelger <jz@techdivision.com>
*/

appserver_redefine('PHP_SAPI', 'appserver');
echo "CALL appserver_redefine('PHP_SAPI', 'appserver'): -> SAPI_TYPE: " . PHP_SAPI;
define('PHP_SAPI', 'appserver');
echo "Constant PHP_SAPI: -> SAPI_TYPE: " . PHP_SAPI;
echo PHP_EOL . "==========================================". PHP_EOL;

appserver_set_headers_sent(true);
Expand Down