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.

Problem installing Phalcon on a fresh CentOS with cPanel

Hey, I've installed Phalcon on many systems , but am having troubles installing on a fresh CentOS machine with cPanel installed.

Here are the errors:

/root/src/cphalcon/build/64bits/phalcon.c:185:36: error: ext/pdo/phppdodriver.h: No such file or directory /root/src/cphalcon/build/64bits/phalcon.c: In function ‘phalconPhalconDbinit’: /root/src/cphalcon/build/64bits/phalcon.c:15120: error: ‘PDOFETCHUSEDEFAULT’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15120: error: (Each undeclared identifier is reported only once /root/src/cphalcon/build/64bits/phalcon.c:15120: error: for each function it appears in.) /root/src/cphalcon/build/64bits/phalcon.c:15121: error: ‘PDOFETCHLAZY’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15122: error: ‘PDOFETCHASSOC’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15123: error: ‘PDOFETCHNUM’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15124: error: ‘PDOFETCHBOTH’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15125: error: ‘PDOFETCHOBJ’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15126: error: ‘PDOFETCHBOUND’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15127: error: ‘PDOFETCHCOLUMN’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15128: error: ‘PDOFETCHCLASS’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15129: error: ‘PDOFETCHINTO’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15130: error: ‘PDOFETCHFUNC’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15131: error: ‘PDOFETCHNAMED’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15132: error: ‘PDOFETCHKEYPAIR’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15134: error: ‘PDOFETCHGROUP’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15135: error: ‘PDOFETCHUNIQUE’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15136: error: ‘PDOFETCHCLASSTYPE’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15137: error: ‘PDOFETCHSERIALIZE’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:15138: error: ‘PDOFETCHPROPSLATE’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterfetchOne’: /root/src/cphalcon/build/64bits/phalcon.c:36756: error: ‘PDOFETCHBOTH’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterfetchAll’: /root/src/cphalcon/build/64bits/phalcon.c:36790: error: ‘PDOFETCHBOTH’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdaptertableExists’: /root/src/cphalcon/build/64bits/phalcon.c:37153: error: ‘PDOFETCHNUM’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterviewExists’: /root/src/cphalcon/build/64bits/phalcon.c:37180: error: ‘PDOFETCHNUM’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterlistTables’: /root/src/cphalcon/build/64bits/phalcon.c:37504: error: ‘PDOFETCHNUM’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterlistViews’: /root/src/cphalcon/build/64bits/phalcon.c:37544: error: ‘PDOFETCHNUM’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterdescribeIndexes’: /root/src/cphalcon/build/64bits/phalcon.c:37585: error: ‘PDOFETCHNUM’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterdescribeReferences’: /root/src/cphalcon/build/64bits/phalcon.c:37654: error: ‘PDOFETCHNUM’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdaptertableOptions’: /root/src/cphalcon/build/64bits/phalcon.c:37760: error: ‘PDOFETCHASSOC’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterPdoconnect’: /root/src/cphalcon/build/64bits/phalcon.c:40101: error: ‘PDOATTRERRMODE’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:40101: error: ‘PDOERRMODEEXCEPTION’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:40107: error: ‘PDOATTRPERSISTENT’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:40111: warning: assignment makes pointer from integer without a cast /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterPdoMysqldescribeColumns’: /root/src/cphalcon/build/64bits/phalcon.c:40806: error: ‘PDOFETCHNUM’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterPdoOracledescribeColumns’: /root/src/cphalcon/build/64bits/phalcon.c:41083: error: ‘PDOFETCHNUM’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterPdoOraclelastInsertId’: /root/src/cphalcon/build/64bits/phalcon.c:41235: error: ‘PDOFETCHNUM’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterPdoPostgresqldescribeColumns’: /root/src/cphalcon/build/64bits/phalcon.c:41386: error: ‘PDOFETCHNUM’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterPdoSqlitedescribeColumns’: /root/src/cphalcon/build/64bits/phalcon.c:41662: error: ‘PDOFETCHNUM’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterPdoSqlitedescribeIndexes’: /root/src/cphalcon/build/64bits/phalcon.c:41841: error: ‘PDOFETCHNUM’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbAdapterPdoSqlitedescribeReferences’: /root/src/cphalcon/build/64bits/phalcon.c:41924: error: ‘PDOFETCHNUM’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘phalconPhalconDbResultPdoinit’: /root/src/cphalcon/build/64bits/phalcon.c:44931: error: ‘PDOFETCHOBJ’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconDbResultPdodataSeek’: /root/src/cphalcon/build/64bits/phalcon.c:45100: error: ‘pdostmtt’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:45100: error: ‘stmt’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c:45137: error: expected expression before ‘)’ token /root/src/cphalcon/build/64bits/phalcon.c:45147: error: ‘PDOFETCHORINEXT’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconMvcModelrefresh’: /root/src/cphalcon/build/64bits/phalcon.c:66809: error: ‘PDOFETCHASSOC’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconMvcModelResultsetComplexconstruct’: /root/src/cphalcon/build/64bits/phalcon.c:90702: error: ‘PDOFETCHASSOC’ undeclared (first use in this function) /root/src/cphalcon/build/64bits/phalcon.c: In function ‘zimPhalconMvcModelResultsetSimpleconstruct’: /root/src/cphalcon/build/64bits/phalcon.c:91071: error: ‘PDOFETCHASSOC’ undeclared (first use in this function) make: * [phalcon.lo] Error 1

I was told this means I don't have the PDO headers in my PHP installation, but not sure what I can do to resolve this, as this is truly a fresh installation without any changes except for installing cPanel out-of-the-box

Thanks Shai



2.4k
Accepted
answer

Solution was easier then expected. Had to rebuild Apache and PHP with PDO enabled.

This is done easily in cPanel with WHM =>Software => Easyapache =>select Apache and PHP version (leave current version if you don't want to upgrade) ==> Go to "Exhaustive options" in this list you have to select "PDO" option -> Save and build Apache.