Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Can't install Phalcon on my VPS (phpize not found), willing to pay to someone for it.

Hi, after trying to install Phalcon on my new CentOS 6.4 VPS with no luck, I'm willing to pay someone with the experience to do it.

I think Phalcon is a really good choice for my new project but I'm having problems to get it installed in my server and I do not want to use others like CI or Laravel.

I have the next error when trying to install the extension:

./install: line 64: phpize: command not found

Dunno what to do, so any help is appreciated

Thanks.

I have some experience with this issue, since I am currently hosting a small thing over on OpenShift. Not completely sure why, but things don't always get installed in the same place on different hosts. OpenShift beening one of them. In my case, what I did was ssh into your server and run :

find . -name phpize

Write down the path to phpize that is found, then you will have to open the phalcon installer (install, found in cphalcon/build) with vim or nano and edit the paths to phpize to reflect what you found from the query above.

For example, on OpenShift, I had to change my section of the installer, where it calls 'phpize' to look like the following:

#Check processor architecture
if [ -z $1 ]; then
    DIR="${OPENSHIFT_REPO_DIR}/cphalcon/build/32bits"
    gcc gccarch.c -o gccarch
    if [ -f gccarch ]; then
        P64BITS=`./gccarch`
        if [ "$P64BITS" == "1" ]; then
            DIR="${OPENSHIFT_REPO_DIR}/cphalcon/build/64bits"
        fi
    fi
else
    DIR=$1
fi

#Move to specified architecture
cd $DIR

#Clean current compilation
if [ -f Makefile ]; then
    make clean
    $OPENSHIFT_RUNTIME_DIR/php5/bin/phpize --clean
fi

#Perform the compilation
$OPENSHIFT_RUNTIME_DIR/php5/bin/phpize && ./configure --enable-phalcon --with-php-config=$OPENSHIFT_RUNTIME_DIR/php5/bin/php-config && make && make install && echo -e "\nThanks for compiling Phalcon!\nBuild succeed: Please restart your web server to complete the installation"

Hope this steers you in the write direction. PaaS services are great, but be perparded to get to know your server.

Hi, thanks for the info, I added the paths to the install file which are:

/usr/local/bin/phpize /usr/local/bin/php-config

Respectively, but now I receive a LOT errors more, after searching I found that I need php-devel to install it and my VPS is using cPanel and I found some information that is not easy to install extensions when using cPanel, maybe I'll not be able to use Phalcon in this configuration which is really bad.

Here is what I get:

[email protected]**** [/home/workiver/public_html/phalcon/cphalcon/build]# sudo ./install
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for icc... no
checking for suncc... no
checking whether gcc and cc understand -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/                                        include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20100525
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable phalcon framework... yes, shared
checking whether byte ordering is bigendian... no
checking for ext/igbinary/igbinary.h... no
checking whether HAVE_BUNDLED_PCRE is declared... no
checking whether HAVE_JSON is declared... yes
checking for ext/json/php_json.h... yes
checking whether HAVE_PHP_SESSION is declared... yes
checking for ext/session/php_session.h... yes
checking whether HAVE_HASH_EXT is declared... yes
checking for ext/hash/php_hash.h... yes
checking whether to include code coverage symbols... no
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 98304
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
/bin/sh /home/workiver/public_html/phalcon/cphalcon/build/64bits/libtool --mode=compile gcc  -I. -I/home/workiver/public_html/phalcon/cphalcon/build/64bits -                                        DPHP_ATOM_INC -I/home/workiver/public_html/phalcon/cphalcon/build/64bits/include -I/home/workiver/public_html/phalcon/cphalcon/build/64bits/main -I/home/work                                        iver/public_html/phalcon/cphalcon/build/64bits -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/                                        Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -DPHALCON_RELEASE -DHAVE_CONFIG_H  -march=native -mtune=native -O2 -finline-function                                        s -fomit-frame-pointer -fvisibility=hidden   -c /home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c -o phalcon.lo
mkdir .libs
 gcc -I. -I/home/workiver/public_html/phalcon/cphalcon/build/64bits -DPHP_ATOM_INC -I/home/workiver/public_html/phalcon/cphalcon/build/64bits/include -I/home                                        /workiver/public_html/phalcon/cphalcon/build/64bits/main -I/home/workiver/public_html/phalcon/cphalcon/build/64bits -I/usr/local/include/php -I/usr/local/inc                                        lude/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DPHALCON_RELEAS                                        E -DHAVE_CONFIG_H -march=native -mtune=native -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden -c /home/workiver/public_html/phalcon/cphalcon/                                        build/64bits/phalcon.c  -fPIC -DPIC -o .libs/phalcon.o
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:185:36: error: ext/pdo/php_pdo_driver.h: No such file or directory
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'phalcon_Phalcon_Db_init':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14794: error: 'PDO_FETCH_USE_DEFAULT' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14794: error: (Each undeclared identifier is reported only once
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14794: error: for each function it appears in.)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14795: error: 'PDO_FETCH_LAZY' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14796: error: 'PDO_FETCH_ASSOC' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14797: error: 'PDO_FETCH_NUM' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14798: error: 'PDO_FETCH_BOTH' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14799: error: 'PDO_FETCH_OBJ' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14800: error: 'PDO_FETCH_BOUND' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14801: error: 'PDO_FETCH_COLUMN' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14802: error: 'PDO_FETCH_CLASS' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14803: error: 'PDO_FETCH_INTO' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14804: error: 'PDO_FETCH_FUNC' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14805: error: 'PDO_FETCH_NAMED' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14806: error: 'PDO_FETCH_KEY_PAIR' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14808: error: 'PDO_FETCH_GROUP' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14809: error: 'PDO_FETCH_UNIQUE' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14810: error: 'PDO_FETCH_CLASSTYPE' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14811: error: 'PDO_FETCH_SERIALIZE' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:14812: error: 'PDO_FETCH_PROPS_LATE' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_fetchOne':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:36473: error: 'PDO_FETCH_BOTH' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_fetchAll':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:36507: error: 'PDO_FETCH_BOTH' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_tableExists':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:36870: error: 'PDO_FETCH_NUM' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_viewExists':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:36897: error: 'PDO_FETCH_NUM' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_listTables':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:37221: error: 'PDO_FETCH_NUM' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_listViews':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:37261: error: 'PDO_FETCH_NUM' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_describeIndexes':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:37302: error: 'PDO_FETCH_NUM' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_describeReferences':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:37371: error: 'PDO_FETCH_NUM' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_tableOptions':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:37477: error: 'PDO_FETCH_ASSOC' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_Pdo_connect':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:39787: error: 'PDO_ATTR_ERRMODE' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:39787: error: 'PDO_ERRMODE_EXCEPTION' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:39793: error: 'PDO_ATTR_PERSISTENT' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:39797: warning: assignment makes pointer from integer without a cast
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_Pdo_Mysql_describeColumns':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:40492: error: 'PDO_FETCH_NUM' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_Pdo_Oracle_describeColumns':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:40777: error: 'PDO_FETCH_NUM' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_Pdo_Oracle_lastInsertId':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:40929: error: 'PDO_FETCH_NUM' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_Pdo_Postgresql_describeColumns':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:41080: error: 'PDO_FETCH_NUM' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_Pdo_Sqlite_describeColumns':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:41356: error: 'PDO_FETCH_NUM' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_Pdo_Sqlite_describeIndexes':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:41535: error: 'PDO_FETCH_NUM' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Adapter_Pdo_Sqlite_describeReferences':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:41618: error: 'PDO_FETCH_NUM' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'phalcon_Phalcon_Db_Result_Pdo_init':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:44602: error: 'PDO_FETCH_OBJ' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Db_Result_Pdo_dataSeek':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:44771: error: 'pdo_stmt_t' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:44771: error: 'stmt' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:44808: error: expected expression before ')' token
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:44818: error: 'PDO_FETCH_ORI_NEXT' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Mvc_Model_refresh':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:66325: error: 'PDO_FETCH_ASSOC' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Mvc_Model_Resultset_Complex___construct':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:90114: error: 'PDO_FETCH_ASSOC' undeclared (first use in this function)
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c: In function 'zim_Phalcon_Mvc_Model_Resultset_Simple___construct':
/home/workiver/public_html/phalcon/cphalcon/build/64bits/phalcon.c:90483: error: 'PDO_FETCH_ASSOC' undeclared (first use in this function)
make: *** [phalcon.lo] Error 1

Any clue lol?

Greetings!



30.4k
Accepted
answer

Hi,

"error: ext/pdo/phppdodriver.h: No such file or directory"

Check this error. Googling: https://bugs.php.net/bug.php?id=61859 https://github.com/phalcon/cphalcon/issues/1155 ;-)

edited Apr '14

Thank you very much! I was able to install Phalcon on my VPS!

The problem was with the PDO headers, so I installed them using EasyApache, recompiling Apache + PHP but including the PDO + MySQL PDO extension as described here https://github.com/phalcon/cphalcon/issues/1155 and https://forums.cpanel.net/f5/enable-pdo-78853.html

I also had to edit the install file and add the --with-php-config=PATH-TO-PHP-CONFIG and also add the path to phpize

So thanks both @le51 and @Phillip Jackson !

Now I'm able to use this great framework :D

Greetings!