Error with PDO class

Installation Problems And Solutions

Error with PDO class

Postby DavidJohnston » Sat Dec 26, 2015 7:53 pm

I've installed mate-pro-4.2 on a vanilla Fedora-Core-22 linux box under /var/www/mate. I Installed the example tables. Group is apache as you would expect.
When I try to run any of the examples, I get this..

Invalid json sent back from server. Error: SyntaxError: Unexpected token <
Server sent: Fatal error: Class 'PDO' not found in /var/www/html/mate/DBC.php on line 33

Line 33 says this:
self::$instance = new PDO(
Which indeed references PDO, which isn't defined anywhere.

So I'm stuck. What is going on here?
DavidJohnston
 
Posts: 4
Joined: Sat Dec 26, 2015 7:45 pm

Re: Error with PDO class

Postby DavidJohnston » Sat Dec 26, 2015 8:23 pm

Alright, I'm no PHP programmer, but I managed to find out that you have to install php-pdo. You might have mentioned that in the intallation instructions, however it doesn't help. It just leads to another error..

Invalid json sent back from server. Error: SyntaxError: Unexpected token <
Server sent: Fatal error: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' in /var/www/html/mate/DBC.php on line 38

Could you please publish complete installation instructions with all the prerequisites listed?

I'm not happy that I spent money one something that does not work and raises nothing but fatal error when run.
DavidJohnston
 
Posts: 4
Joined: Sat Dec 26, 2015 7:45 pm

Re: Error with PDO class

Postby DavidJohnston » Sun Dec 27, 2015 1:54 am

Wait! There's more disfunction.

I found that the documentation failed to specify that php-pdo, php-mysql and php-mycrypt must be installed. When I do that and I try to reorder fields, I get this, which clearly is a bug..

Invalid json sent back from server. Error: SyntaxError: Unexpected token <
Server sent: Warning: mcrypt_encrypt(): Key of size 17 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /var/www/html/mate2/php/AjaxTableEditor.php on line 386
DavidJohnston
 
Posts: 4
Joined: Sat Dec 26, 2015 7:45 pm

Re: Error with PDO class

Postby DavidJohnston » Sun Dec 27, 2015 2:03 am

Wait! There's more disfunction.

The encryption key is both the wrong length and is a constant in the source code..

protected $encKey = 'c4j9803f90riepals';

Should I submit this for a CERT advisory?
DavidJohnston
 
Posts: 4
Joined: Sat Dec 26, 2015 7:45 pm

Re: Error with PDO class

Postby olivier » Tue Dec 29, 2015 9:18 pm

Hi,
Have you tried installing the php5-mcrypt package on your server?
olivier
 
Posts: 17
Joined: Tue Dec 15, 2015 12:09 pm

Re: Error with PDO class

Postby admin » Tue Jan 19, 2016 3:50 pm

The functionality to encrypt data before it is stored in the browser will most likely be removed or made optional in the future. First off there is no sensitive data being stored (just column names), second it will be faster not encrypting the data and third it will remove the dependency for php-mcrypt.

If you are concerned about people decoding the encrypted storage data and discovering column names in your database you can easily change the encryption key in your version.
admin
Site Admin
 
Posts: 1502
Joined: Fri Jul 11, 2008 1:34 am


Return to Installation

Who is online

Users browsing this forum: No registered users and 3 guests

cron