How to get this to work?

Talk about installation process and problems

Moderator: alexandrleonenko

ethanthomas82
Junior
Junior
Posts: 22
Joined: Jan 22nd, '12, 23:35

How to get this to work?

Postby ethanthomas82 » Jan 22nd, '12, 23:43

I am a PHP programmer but I guess even technical knowledge helps me little in this case. My server is running PHP 5.2. I have tried everything and hours of time to get only a basic grid to work. I have read the instructions over and over. The examples in the free download will not work(they even point to directories that do not exist) and I have tried altering the examples. I can not think of anything else to try. I have debug mode set to true and all I get is blank white screen. I tried to creat the most basic grid I can think of so I downloaded the phpgrid program zip file, unzipped it, and placed all the files in directory http://www.home.com/datagrid. Then I did the following:

<?php
define ("DATAGRID_DIR", "/datagrid/");
define ("PEAR_DIR", "/datagrid/pear/");

require_once(DATAGRID_DIR.'datagrid.class.php');
require_once(PEAR_DIR.'PEAR.php');
require_once(PEAR_DIR.'DB.php');

$DB_USER='myusername';
$DB_PASS='xxxxx';
$DB_HOST='localhost';
$DB_NAME='mydatabase';

ob_start();
$db_conn = & DB::factory('mysql');
$result_conn = $db_conn->connect(DB::parseDSN('mysql://'.$DB_USER.':'.$DB_PASS.'@'.$DB_HOST.'/'.$DB_NAME));
if(DB::isError($result_conn)){ die($result_conn->getMessage()); }
$dgrid->DataSource($db_conn, $sql, $default_order);

$sql = "SELECT * FROM mytable";

$debug_mode = true;
$messaging = true;
$unique_prefix = "abc_";
$dgrid = new DataGrid($debug_mode, $messaging, $unique_prefix);

$default_order_field = "count";
$default_order_type = "ASC";
$dgrid->dataSource($db_conn, $sql, $default_order_field, $default_order_type);

$dgrid->bind();
ob_end_flush();
?>

Anyone have any ideas on what I can try?

ethanthomas82
Junior
Junior
Posts: 22
Joined: Jan 22nd, '12, 23:35

Re: How to get this to work?

Postby ethanthomas82 » Jan 23rd, '12, 01:06

I was reading through the forum and many people have not been able to get the free version to work and never have I seen a solution. The examples can't work as downloaded because the subdirectories in the examples do not even exist. So I am buffled by the logic of this because if the free version doesn't work, why put it on the site? It only wastes the time of customers and makes selling the paid version more difficult. I am only following the advice posted on the site which advises to first try the free version. Now that the free version will not work, now I am asking myself is it wise to purchase a product from a site that has a free version download that does not work? Wouldn't that be kind of stupid? Shouldn't the purpose of the free version to be to impress the doubters not cause doubt in the paid version?

ethanthomas82
Junior
Junior
Posts: 22
Joined: Jan 22nd, '12, 23:35

Re: How to get this to work?

Postby ethanthomas82 » Jan 23rd, '12, 01:22

This is what it states on http://www.apphp.com/index.php?page=conditions
"We strongly recommend always to download and try free program before purchasing of paid version."

But the free version doesn't work. So what now?

administrator
Site Admin
Site Admin
Posts: 6105
Joined: Jan 7th, '09, 23:18
Contact:

Re: How to get this to work?

Postby administrator » Jan 23rd, '12, 10:04

Please check you defined valid paths to datagrid folder:

define ("DATAGRID_DIR", "/datagrid/");
define ("PEAR_DIR", "/datagrid/pear/");

What is the trailing slashes in these definitions?
Also, did you turn On debug mode and check what was wrong?

Please upload the script to any shared hosting, turn On debug mode and allow us to see it online,
so we could understand what exactly was wrong in your definition of paths or other things.

ethanthomas82
Junior
Junior
Posts: 22
Joined: Jan 22nd, '12, 23:35

Re: How to get this to work?

Postby ethanthomas82 » Jan 23rd, '12, 14:04

Thank you for your prompt answer.
I tried the slashes, paths, and even used absolute paths and nothing worked. What you saw in my example was just the latest variation. But I searched the Internet and saw there were no complaints about the ApPHP product and so I took a chance and bought the latest version and I had it working within minutes. I am sorry I lost so much of my time with the free product. Thank You!


Return to “Installation”