View Single Post
Old 05-02-2012, 11:11 AM   #15
b1ackmai1er
Junior Member
b1ackmai1er began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2012
Device: Xoom
Request for assistance installing COPS

Hi Guys,

Anyone able to assist with the install on this?

I have installed fastcgi, php5 and nginx and the COPS files and updated the nginx.conf and config_local.php configuration but received "Error 502 Bad gateway" messages when I load the site.

The error log reports: connect to unix:/tmp/fcgi.sock failed (2: No such file or directory)

The nginx.conf files refers to this directory in the line:

fastcgi_pass unix:/tmp/fcgi.sock;

So I change this to

fastcgi_pass 127.0.0.1:9000;

But the I received the error:

[error] 4215#0: *1 upstream sent unsupported FastCGI protocol version: 72 while reading response header from upstream, client: 192.168.2.14, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "box"

So I worked out I had to run fastcgi:

php-cgi -b 127.0.0.1:9000

But now I get the following error:

XML Parsing Error: syntax error
Location: http://box/
Line Number 1, Column 1:exception 'PDOException' with message 'could not find driver' in /usr/local/html/base.php:223

At this stage I am lost. The COPS files are stored in /usr/local/html/ including the base.php file.

Edit 1: I realize now the XML error is generated by my web browser. The actual page source lists the errors:

exception 'PDOException' with message 'could not find driver' in /usr/local/html/base.php:223
Stack trace:
#0 /usr/local/html/base.php(223): PDO->__construct('sqlite:/usr/loc...')
#1 /usr/local/html/author.php(33): Base::getDb()
#2 /usr/local/html/base.php(123): Author::getCount()
#3 /usr/local/html/feed.php(30): Page->InitializeContent()
#4 {main}exception 'PDOException' with message 'could not find driver' in /usr/local/html/base.php:223
Stack trace:
#0 /usr/local/html/base.php(223): PDO->__construct('sqlite:/usr/loc...')
#1 /usr/local/html/author.php(33): Base::getDb()
#2 /usr/local/html/base.php(123): Author::getCount()
#3 /usr/local/html/feed.php(30): Page->InitializeContent()
#4 {main}

Edit 2: I made some further progress - php.ini needed the pdosqlite extension added:

extension=pdo_sqlite.so

Unfortunately, I now get the error:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/pdo_sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/pdo_sqlite.so: undefined symbol: sqlite3_libversion in Unknown on line 0

It seems my PHP5 is compiled for the wrong sqlite version ???

from phpinfo()

SQLITE
SQLite support enabled
PECL Module version 2.0-dev $Id: sqlite.c 306939 2011-01-01 02:19:59Z felipe $
SQLite Library 2.8.17
SQLite Encoding iso8859

PDO
PDO support enabled
PDO drivers odbc, sqlite2

A bit confused at this stage as the sqlite library is sqlite3.so

usr/local/lib/php/extensions/no-debug-non-zts-20090626/pdo_sqlite.so
usr/local/lib/php/extensions/no-debug-non-zts-20090626/sqlite3.so

Can anyone help? Thanks.

Last edited by b1ackmai1er; 05-03-2012 at 10:04 AM.
b1ackmai1er is offline   Reply With Quote