Yet stil cannot compile with php_pdo_driver.h

cevo

Active Member
#1
Since my PHP script require PDO extension so, I need to include PDO support in my PHP compilation. But I endup got the same error Full log: http://pastebin.com/h94AZMEC

Even I have prepared my machine by running these commands
Anyone got any idea how to make it compile?

apt-get install build-essential
# apt-get install gcc
apt-get install libz-dev
apt-get install libxml2-dev

apt-get install libpng-dev
apt-get install libjpeg-dev

apt-get install libmysqlclient15-dev
apt-get install zlib1g-dev

apt-get install autoconf
apt-get install patch binutils libtool

apt-get install libxml++2.6-dev
apt-get install libpng12-dev



apt-get install libxml2-dev libssl-dev libbz2-dev libcurl3-dev libdb5.1-dev libjpeg-dev libpng-dev libXpm-dev libfreetype6-dev libt1-dev libgmp3-dev libc-client-dev libldap2-dev libmcrypt-dev libmhash-dev freetds-dev libz-dev libmysqlclient15-dev ncurses-dev libpcre3-dev unixODBC-dev postgresql-server-dev-9.1 libsqlite-dev libaspell-dev libreadline6-dev librecode-dev libsnmp-dev libtidy-dev libxslt-dev libt1-dev

apt-get install php-db

Code:
checking for sysvipc shared memory support... yes
checking for mmap() using MAP_ANON shared memory support... yes
checking for mmap() using /dev/zero shared memory support... yes
checking for mmap() using shm_open() shared memory support... yes
checking for mmap() using regular file shared memory support... yes
checking for known struct flock definition... done
./configure: line 65367: ./build/shtool: No such file or directory
checking whether to enable pcntl support... no
checking whether to enable PDO support... yes
checking for PDO_DBLIB support via FreeTDS... no
checking for Firebird support for PDO... no
checking for MySQL support for PDO... no
checking Oracle OCI support for PDO... no
checking for ODBC v3 support for PDO... no
checking for PostgreSQL support for PDO... no
checking for sqlite 3 support for PDO... yes
checking for PDO includes... checking for PDO includes... 
configure: error: Cannot find php_pdo_driver.h.
**ERROR** Could not configure PHP build
 
Last edited:

cevo

Active Member
#3
how about add --with-pdo-mysql option to build php:
http://www.php.net/manual/en/ref.pdo-mysql.php
It did pass through that error and continue until almost end of the process.
However got this error.

Code:
/usr/local/lsws/phpbuild/php-5.5.3/build/shtool: 807: /usr/local/lsws/phpbuild/php-5.5.3/build/shtool: Syntax error: end of file unexpected (expecting "done")
/bin/bash: -d: command not found
make: *** [ext/phar/phar.php] Error 127
**ERROR** Could not compile PHP

Full log: http://pastebin.com/330nYbz4
 

NiteWave

Administrator
#4
what's your current build option ?

can you try to build php-5.4.x or 5.3.x if have same issue?

what's line 807 of /usr/local/lsws/phpbuild/php-5.5.3/build/shtool ?
 

cevo

Active Member
#5
what's your current build option ?

can you try to build php-5.4.x or 5.3.x if have same issue?

what's line 807 of /usr/local/lsws/phpbuild/php-5.5.3/build/shtool ?
My Build Option is

./configure '--prefix=/usr/local/lsws/lsphp5' '--with-mysqli' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--with-pdo-mysql' '--with-litespeed'
configure: WARNING: unrecognized options: --enable-track-vars, --enable-magic-quotes


Line 807 seems to be empty line

Code:
LINE 804:   fi
LINE 805:        for dir in "$@"; do
LINE 806:            eval "$cmd $dir" || shtool_exit $?
LINE 807:
 

cevo

Active Member
#6
Here is the error once trying to build 5.3.27

Code:
10 14.3M   10 1491k    0     0  14849      0  0:16:50  0:01:42  0:15:08 25257
 10 14.3M   10 1532k    0     0  15137      0  0:16:31  0:01:43  0:14:48 31705
 10 14.3M   10 1535k    0     0  14981      0  0:16:41  0:01:44  0:14:57 27069
 10 14.3M   10 1570k    0     0  15178      0  0:16:28  0:01:45  0:14:43 26965
 10 14.3M   10 1583k    0     0  15193      0  0:16:27  0:01:46  0:14:41 26337
 11 14.3M   11 1620k    0     0  15406      0  0:16:14  0:01:47  0:14:27 27042
 11 14.3M   11 1639k    0     0  15528      0  0:16:06  0:01:48  0:14:18 24678
curl: (18) transfer closed with 13329888 bytes remaining to read
Extracting PHP source archive: tar -zxf php-5.3.27.tar.gz

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
Could not extract PHP source archive
Try again, retrieving PHP source archive from http://museum.php.net/php5/php-5.3.27.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1457  100  1457    0     0   1741      0 --:--:-- --:--:-- --:--:--  3927
Extracting PHP source archive: tar -zxf php-5.3.27.tar.gz

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Could not extract PHP source archive

Retrieving LSAPI from http://www.litespeedtech.com/packages/lsapi/php-litespeed-6.3.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:--  0:00:06 --:--:--     0
  7 35728    7  2600    0     0    393      0  0:01:30  0:00:06  0:01:24  8360
100 35728  100 35728    0     0   4926      0  0:00:07  0:00:07 --:--:-- 37529
/usr/local/lsws/phpbuild/buildphp_1378294470.8.prep.sh: 182: cd: can't cd to php-5.3.27/sapi
**ERROR** Could not get into php/sapi directory
 

NiteWave

Administrator
#7
the above error shows you failed to download php-5.3.27 from php.net

your internet connection bad ?

you can manually download php-5.3.27 so that the auto build script can skip this step.

#cd /usr/local/lsws/phpbuild
#wget http://php.net/php5/php-5.3.27.tar.gz

after ensure downloading finishes, go to admin console, build php again.
 
Top