juhyunkwon / php-handlersocket

Automatically exported from code.google.com/p/php-handlersocket
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

error. need at least PHP 5 or newer. I have PHP 5.2.6 #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
dev:/usr/local/php-handlersocket# ./configure
checking for grep that handles long lines and -e... /bin/grep
...
checking PHP version... configure: error: need at least PHP 5 or newer

----
dev:/usr/local/php-handlersocket# php -v
PHP 5.2.6-1+lenny9 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug  4 2010 
03:25:57)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

Original issue reported on code.google.com by AlekZon...@gmail.com on 19 Nov 2010 at 11:35

GoogleCodeExporter commented 9 years ago
configure find php version through macro in php source file: main/php_version.h

add a symoblink to your php-handlersocke dir like:

ln -s [php_source_dir] php

Original comment by bupt....@gmail.com on 22 Nov 2010 at 4:23

GoogleCodeExporter commented 9 years ago
use this instead:

 dnl Check PHP version:
  AC_MSG_CHECKING([PHP version])

  tmp_version=$PHP_VERSION
  if test -z "$tmp_version"; then
    if test -z "$PHP_CONFIG"; then
      AC_MSG_ERROR([php-config not found])
    fi
    php_version=`$PHP_CONFIG --version 2>/dev/null|head -n 1|sed -e 's#\([0-9]\.[0-9]*\.[0-9]*\)\(.*\)#\1#'`
  else
    php_version=`echo "$tmp_version"|sed -e 's#\([0-9]\.[0-9]*\.[0-9]*\)\(.*\)#\1#'`
  fi

  if test -z "$php_version"; then
    AC_MSG_ERROR([failed to detect PHP version, please report])
  fi

  ac_IFS=$IFS
  IFS="."
  set $php_version
  IFS=$ac_IFS
  hs_php_version=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`

  if test "$hs_php_version" -le "5000000"; then
    AC_MSG_ERROR([You need at least PHP 5.0.0 to be able to use this version of HS. PHP $php_version found])
  else
    AC_MSG_RESULT([$php_version, ok])
  fi

Original comment by larue...@gmail.com on 22 Nov 2010 at 4:55

GoogleCodeExporter commented 9 years ago
fixed config.m4. (version: 0.0.5)

Original comment by avue...@gmail.com on 24 Nov 2010 at 1:44