phpDivinglog 2.0

3rd party extensions (phpDivingLog, dive computer downloader,...)
mhedstrom
Posts: 46
Joined: Wed Jun 06, 2007 23:21

Post by mhedstrom » Sat Dec 29, 2007 21:55

I've done some research on the jpgraph error I'm getting, and I don't necessarily think it's your error, unless you're familiar enough with jpgraph to see how I could get around it. I tried a few suggestions I found doing some searches (changing the Verdana font definitions to FF_FONT1), but those didn't work.

Inferno
Posts: 252
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Post by Inferno » Wed Jan 02, 2008 16:28

mhedstrom wrote: JPGraph Error
Too small plot area (50,50,161841383,70: 450x -161841053). With the given image size and margins there is to little space left for the plot. Increase the plot size or reduce the margins.
That is strange, have to look at it
Also is there supposed to be a legend on the Dive Statistics screen for the pie chart? On mine there isn't, so I'm not sure I understand what the pie chart is showing me.
There should be a legend on the pie chart.

Do you have a link where I can see the error?

mhedstrom
Posts: 46
Joined: Wed Jun 06, 2007 23:21

Post by mhedstrom » Wed Jan 02, 2008 17:54

Sent you a PM since it's really not a public link yet (we're in the process of moving servers).

jcsvi
Posts: 2
Joined: Sun Jan 06, 2008 15:43

Post by jcsvi » Sun Jan 06, 2008 15:59

Having some trouble getting v2 to work, there seems to be a problem in how
the information is gathered, or theres somthing wrong with a plugin. I dont know which it is and im completely clueless.

I also had another problem with the mysql, when i tried to use the same database i user for v1.9 i get errors, seems v2.0 isn't using the table prefix i set. Well kinda got that solved with creating a database without prefixes.

Check it out here: http://www.dykkebilder.com/divelog2/


Edit: got it working fine now

Inferno
Posts: 252
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Post by Inferno » Mon Jan 07, 2008 08:25

jcsvi wrote:Having some trouble getting v2 to work, there seems to be a problem in how
the information is gathered, or theres somthing wrong with a plugin. I dont know which it is and im completely clueless.

I also had another problem with the mysql, when i tried to use the same database i user for v1.9 i get errors, seems v2.0 isn't using the table prefix i set. Well kinda got that solved with creating a database without prefixes.

Check it out here: http://www.dykkebilder.com/divelog2/


Edit: got it working fine now
Maybe it is good to tell what you did change, maybe I need to change the manual.

jcsvi
Posts: 2
Joined: Sun Jan 06, 2008 15:43

Post by jcsvi » Mon Jan 07, 2008 11:31

This didn't work:

Code: Select all

* Your path where divelog is located
* EXAMPLE: http://www.foo.com/users/j/jo/john
* abs_url_path = /users/j/jo/john
* Nothing todo where phpdivinglog is installed on your harddrive!
*/
$_config['abs_url_path'] = '/home/dykkebi/public_html/divelog2/';
This did:

Code: Select all

/**
* Your path where divelog is located
* EXAMPLE: http://www.foo.com/users/j/jo/john
* abs_url_path = /users/j/jo/john
* Nothing todo where phpdivinglog is installed on your harddrive!
*/
$_config['abs_url_path'] = '/divelog2';

And while we're at it:
characters like æøå was supported in old version, doesn't seem to be working now, it's working in the data from the database, but if i try to translate the language in english.php to my native language the characters
are displayed as ? and /.

talbers
Posts: 6
Joined: Tue Jan 29, 2008 07:59

empty page as answer

Post by talbers » Tue Jan 29, 2008 22:45

I have some problems to get the v2 running.
I just got an empty page as answer if i open the index.php.
the config file was edited to match my server data.
V1.9 is running without problems. Any idea where to look for a log or debug message?
thanks in adv.
Thorsten :(

Inferno
Posts: 252
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Re: empty page as answer

Post by Inferno » Tue Jan 29, 2008 22:54

talbers wrote:I have some problems to get the v2 running.
I just got an empty page as answer if i open the index.php.
the config file was edited to match my server data.
V1.9 is running without problems. Any idea where to look for a log or debug message?
thanks in adv.
Thorsten :(
Post your config file (without passwords)

What is your hosting setup?

talbers
Posts: 6
Joined: Tue Jan 29, 2008 07:59

Post by talbers » Wed Jan 30, 2008 06:55

Dear Inferno,
the config file looks like:

Code: Select all

 *  database settings
 */
$_config['database_server'] = "lapserver1";
$_config['database_db'] = "talbers_divelog";
$_config['database_username'] = "yyyy";
$_config['database_password'] = "xxxx";

/**
 * Define the connection type use mysqli for php5 (check if mysqli is installed), otherwise enter mysql
 * The driver mysqli is not used everywhere (planned)
 */
$_config['database_type'] = "mysqli"; 
/**
 * Enter prefix for single user mode (for multi user see below) 
 */
$_config['table_prefix'] = ""; 
/**
 *  language setting determines which language file is used
 */
$_config['language'] = "german";

/**
 * change this to your website url
 */
$_config['web_root']        = 'http://dive.server.web' * Your path where divelog is located
 * EXAMPLE: http://www.foo.com/users/j/jo/john
 * abs_url_path = /users/j/jo/john
 * Nothing todo where phpdivinglog is installed on your harddrive!
 */
$_config['abs_url_path']    = '/divelog2'; 

/**
 * See below for more file location settings 
 */

/**
 * Define if we need to embed phpDivinglog
 * @todo make embedding possible 
 */
$_config['embed_mode'] = false;

/**
 * when view_type = 1 grid with ajax is displayed view_type = 2 old table mode 
 */
$_config['view_type'] = 1;

/**
 * When multiuser is set to true, you need to define the table prefixes
 * Data for all the users should be in the same database
 */
$_config['multiuser'] = false;
/**
 * Define the table prefix for each user
 * $_config['user_prefix'][user_id] = 'table_prefix'
 * The user_id should start with 1 and can be defined. 
 */
$_config['user_prefix'][1] = 'rob';
$_config['user_prefix'][2] = 'sjaak';
$_config['user_prefix'][3] = 'sjaak2';
I tried it with different combinations in the $_config 'web_root'] = http://dive.server.web' like xxx.web/divelog2 ,..
without any result.
The webservername is changed in the log.
The original webspace is passw. protected.
The server is at my home, which means i can change what ever I want for testing.
I will try move it to a public viewable part if necessary,
Thanks
Thorsten

talbers
Posts: 6
Joined: Tue Jan 29, 2008 07:59

Post by talbers » Wed Jan 30, 2008 20:37

Dear Inferno,
seams to be solved now.
I changed the config to this:

Code: Select all

require_once (ABSPATH_DIVELOG . '/includes/misc.inc.php');
require_once (ABSPATH_DIVELOG . '/pear/phpmydatagrid.class.php');
require_once (ABSPATH_DIVELOG . '/smarty/Smarty.class.php');
require_once  'classes.inc.php';
require_once (ABSPATH_DIVELOG . '/pear/PEAR.php');
require_once (ABSPATH_DIVELOG . '/pear/Pager_Wrapper.php');
require_once (ABSPATH_DIVELOG . '/pear/MDB2.php');
require_once (ABSPATH_DIVELOG . '/includes/jpgraph/src/jpgraph.php');
require_once (ABSPATH_DIVELOG . '/includes/jpgraph/src/jpgraph_line.php');
because i found in the apache logs the following:

Code: Select all

[error] [client 127.0.0.1] PHP Warning:  require_once(phpmydatagrid.class.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in D:\\Apache Software Foundation\\files\\divelog2\\config.inc.php on line 224
[Wed Jan 30 20:53:58 2008] [error] [client 127.0.0.1] PHP Fatal error:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'phpmydatagrid.class.php' (include_path='.:D:\\Apache Software Foundation\\files\\divelog2//pear/:D:\\Apache Software Foundation\\files\\divelog2//include:D:\\Apache Software Foundation\\files\\divelog2/') in D:\\Apache Software Foundation\\files\\divelog2\\config.inc.php on line 224
Oh, its a windows based apache server. Could it be that the problem lies in a / or \ issue?

later I got an error in the Browser: MDB2 error: not found
after change from mysqli ti mysql in the sql type row it worked.
Have not tested itt all, but already the first view looked good.
Nice Job, Thanks!
Thorsten 8)

EDIT: :( :(
Its not working
all pages reachable from the top link row (satitistik..) are fine, but I still cant open the dives ore divesides.
Error massage in Apachelog:

Code: Select all

[Wed Jan 30 21:39:18 2008] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  diver_choice_linktitle in D:\\Apache Software Foundation\\files\\divelog2\\classes.inc.php on line 609, referer: http://localhost/divelog2/divestats.php/list
[Wed Jan 30 21:39:18 2008] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  diver_choice in D:\\Apache Software Foundation\\files\\divelog2\\classes.inc.php on line 610, referer: http://localhost/divelog2/divestats.php/list
[Wed Jan 30 21:39:18 2008] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  display_rows_dives in D:\\Apache Software Foundation\\files\\divelog2\\classes.inc.php on line 1362, referer: http://localhost/divelog2/divestats.php/list
[Wed Jan 30 21:39:18 2008] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  dlog_title_place in D:\\Apache Software Foundation\\files\\divelog2\\classes.inc.php on line 1378, referer: http://localhost/divelog2/divestats.php/list
I think I have to get the path infos right. Inferno can you help?

Thanks
Thorsten
Last edited by talbers on Wed Jan 30, 2008 20:48, edited 1 time in total.

Inferno
Posts: 252
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Post by Inferno » Wed Jan 30, 2008 20:45

talbers wrote: Oh, its a windows based apache server. Could it be that the problem lies in a / or \ issue?
Yes that is the problem, what I will have to do, is change the dir separator depending on the enviroment. Never tested phpDivinglog on a windows machine.
later I got an error in the Browser: MDB2 error: not found
after change from mysqli ti mysql in the sql type row it worked.
If you don't have the mysqli module for php then this won't work.

talbers
Posts: 6
Joined: Tue Jan 29, 2008 07:59

Post by talbers » Wed Jan 30, 2008 20:55

Inferno,
can you tell me where to change the path-seperators "/"
Thorsten

Inferno
Posts: 252
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Post by Inferno » Wed Jan 30, 2008 21:07

Ok fixed this in trunk
http://rob.lensen.nu/WebSVN/diff.php?re ... rev=0&sc=1

Should look like this:

Code: Select all

/**
 * Path to .ihtml (template) files
 */
define('TEMPLATE_DIR', $_config['app_root']. '/tpl/');
if ( ! defined( "PATH_SEPARATOR" ) ) {
  if ( strpos( $_ENV[ "OS" ], "Win" ) !== false )
      define( "PATH_SEPARATOR", ";" );
  else define( "PATH_SEPARATOR", ":" );
}
ini_set('include_path', get_include_path() . PATH_SEPARATOR . $_config['pear_path'] . PATH_SEPARATOR . $_config['app_root']."/include". PATH_SEPARATOR . $_config['app_root']);
The var PATH_SEPARATOR is set by php according the running OS. However on old versions of php it wasn't there so we do an extra check.

talbers
Posts: 6
Joined: Tue Jan 29, 2008 07:59

Post by talbers » Wed Jan 30, 2008 21:29

Dear Inferno
I chnaged the config and get now:

Code: Select all

[Wed Jan 30 22:22:54 2008] [error] [client 127.0.0.1] PHP Warning:  require_once(/pear/phpmydatagrid.class.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in D:\\Apache Software Foundation\\files\\divelog2\\config.inc.php on line 227
[Wed Jan 30 22:22:54 2008] [error] [client 127.0.0.1] PHP Fatal error:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/pear/phpmydatagrid.class.php' (include_path='.;C:\\php5\\pear;D:\\Apache Software Foundation\\files\\divelog2//pear/;D:\\Apache Software Foundation\\files\\divelog2//include;D:\\Apache Software Foundation\\files\\divelog2/') in D:\\Apache Software Foundation\\files\\divelog2\\config.inc.php on line 227
as result
I am in doubt with the 2 \\divelog2//pear/ slash change
Thorsten

talbers
Posts: 6
Joined: Tue Jan 29, 2008 07:59

Post by talbers » Wed Jan 30, 2008 21:38

Inferno
sorry have not changed the whole config back.
I will edit your fresh one and come back.

OK
Used a fresh one and inserted your change.

It works fine now.

Many thanks for you help!
Thorsten
Last edited by talbers on Wed Jan 30, 2008 21:57, edited 1 time in total.

Post Reply