⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

HTTP 500 error at $crud = new GroceryCrud($config, $database);



rkrajnik
  • profile picture
  • Member

Posted 08 January 2019 - 21:56 PM

Using the sample code (example.php, Enterprise v2.6.10) I'm getting the HTTP 500 death error.  The config.php is straight out of the zip, database.php is modified to match my mysql connect values (can connect via phpmyadmin, Adminer, Excel extracts, etc.)

 

This works...

<?php
try {
$user = "xxxx";
$pass = "xxxx";
$dbh = new PDO('mysql:host=localhost;dbname=dbXXX', $user, $pass);
foreach($dbh->query('SELECT * from tblXXX') as $row) {
print_r($row);
}
$dbh = null;
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "<br/>";
die();
}
?>

 

This throws the 500 error... never gets to the phpinfo() call...

 

...
include("../libraries/autoload.php");

use GroceryCrud\Core\GroceryCrud;

$database = include('database.php');
$config = include('config.php');

$crud = new GroceryCrud($config, $database);

phpinfo();

 

Help!


rkrajnik
  • profile picture
  • Member

Posted 09 January 2019 - 22:40 PM

I'm new to GC but sad to see that such an easy issue cant be addressed by the "community"... guessing I picked the wrong tool for the job.

 

Could be something GC-specific or my config which should be simple fix since all other MySQL connections work... oh well.  it was worth wasting $50 on the "Enterprise" experience to know to stay away from Brocery Crud.

 

Thanks anyway.


rkrajnik
  • profile picture
  • Member

Posted 09 January 2019 - 22:42 PM

How do I get my money refunded for these wasted bytes of time?