Installation issue

Installation issue

Postby ronimhoff » Wed Nov 16, 2011 9:00 pm

I've just installed Reportico and excited to get going with it.

But, each time I try to connect to my MySQL DB, I get the following

Error: Error in Connection: Connection attempt failed: SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (10061)

Firewall is off, I can access my DB via phpMyAdmin at the address listed, and the mysql command line client does work.

This is running on Windows.

If anyone has any tips, please let me know ( still looking myself )

Product looks really cool though.
ronimhoff
 
Posts: 16
Joined: Wed Nov 16, 2011 8:55 pm

Re: Installation issue

Postby peterdeed » Wed Nov 16, 2011 9:41 pm

Hi ronimhoff

Sorry to hear you have this problem .. I'd like to help you ..

I do get the same error message if I have the wrong host when creating a project. I assume you are trying to create a project.
Is your reportico installed on an ISP server or on your own machine?
Is the reportico installation on the same machine as your database - if not the 127.0.0.1 host is probably wrong?

For more info you coud add some debug to the file swdb.php at line 254 ( this is the code that connects to the mysql database? ).. so something like :-

Code: Select all
                               $this->ado_connection = NewADOConnection("pdo");
                                        $cnstr =
                                                "mysql:".
                                                "host=".$this->_conn_host_name."; ".
                                                "username=".$this->_conn_user_name."; ".
                                                "password=".$this->_conn_password."; ".
                                                "dbname=".$this->_conn_database;
echo $cnstr;
                                        $connected = $this->ado_connection->Connect($cnstr,$this->_conn_user_name,$this->_conn_password);


if you are able to do this when you press the Go button to create the project (or configure tutorials ) you should see the connection string and you could verify that the hostname, username, password, dbname are correct?

Let me know if this helps and Ill try to help you further
peterdeed
 
Posts: 1837
Joined: Thu Oct 13, 2011 11:00 pm

Re: Installation issue

Postby ronimhoff » Fri Nov 18, 2011 8:55 pm

Thanks for the response.

I got around this and here is what the problem was.

I had installed an instance of Drupal 6.22 from Acquia. This puts Drupal in on top of Apache with MySQL, but it configures MySQL to use port 33066.

All of the error message resolutions were referring to MySQL on port 3306.

So I uninstalled everything, installed Apache, then MySQL with port 3306 ( instead of 33066 ), and Reportico on top of that and it now works.

I like this package, its very cool.

I do have some other questions though and maybe you veterans can enlighten me....

Thanks again
:lol:
ronimhoff
 
Posts: 16
Joined: Wed Nov 16, 2011 8:55 pm

Re: Installation issue

Postby eelco » Sat Jan 21, 2012 9:15 am

Hi,
I´ve got an other installation issue. The smarty error. I can create a new password when browsing to the index.html. But after I click on ¨Create A New Project¨; I read:
Warning: Smarty error: unable to read resource: "en_gb_createproject_prepare.tpl" in /reportico-2.3/smarty/libs/Smarty.class.php on line 1093
I´ve read that the permission statements should be set so certain files are readable, but I´ve even tested this with all permissions - the whole reportico site - set to 777.
Still the same error. What is my mistake?
Thanx.
Eelco
eelco
 
Posts: 4
Joined: Sat Jan 21, 2012 9:03 am

Re: Installation issue

Postby peterdeed » Sat Jan 21, 2012 12:11 pm

Hi

Thanks for the post .. This is a strange issue but I would like to suggest a fix if you are able to make a small change to a source file.
I dont think you have got any permission problems I think the code is behaving slightly oddly.

If you'd rather not make modifications, let me know and I can send you an updated file.

In the main Reportico directory there is a file called swutil.php .. any chance you could open this at line 656 and you should see :-

Code: Select all
    if ( !is_file ( $newpath ) && !is_dir ( $newpath ) )
    {
        find_file_to_include($newpath, $newpath, $reltoinclude);
        $newpath = get_relative_path(str_replace ("/", "\\", realpath($newpath)), dirname($_SERVER["SCRIPT_FILENAME"]));
    }


Could you change this to

Code: Select all
    if ( !is_file ( $newpath ) && !is_dir ( $newpath ) )
    {
        $found = find_file_to_include($newpath, $newpath, $reltoinclude);
        if ( !$found )
            return false;
        $newpath = get_relative_path(str_replace ("/", "\\", realpath($newpath)), dirname($_SERVER["SCRIPT_FILENAME"]));
    }


And try reloading the Create Project page?

However the behaviour you have been seeing is different to what Ive been seeing so I would like to find out what is different ..

Firstly would you tell me what is the Operating System you have installed this on?

Whether this fix works for you or not would you be able to change the same lines in swutil.php to add the following debug, rerun load the Create Project page and post the debug back to me? I am specifically interested in the value passed to the realpath function above ? So could you change the same lines to read :-


Code: Select all
    if ( !is_file ( $newpath ) && !is_dir ( $newpath ) )
    {
        $found = find_file_to_include($newpath, $newpath, $reltoinclude);

        echo "Found $newpath ? =  $found<br>";
        echo "Real Path for $newpath = '".realpath($newpath)."'<br>";
        echo "Script File ".$_SERVER["SCRIPT_FILENAME"]."<br>";
        $newpath = get_relative_path(str_replace ("/", "\\", realpath($newpath)), dirname($_SERVER["SCRIPT_FILENAME"]));
        echo "Relative Path is $newpath<br>";
        if ( !$found )
            return false;
    }


Let me know how you get on

Peter
peterdeed
 
Posts: 1837
Joined: Thu Oct 13, 2011 11:00 pm

Re: Installation issue

Postby eelco » Sat Jan 21, 2012 1:29 pm

Hi Peter,
Thanks for the quick reply.
It´s hosted on a Free BSD server.
I´l try to make the changes, and contact you again.
Eelco
eelco
 
Posts: 4
Joined: Sat Jan 21, 2012 9:03 am

Re: Installation issue

Postby eelco » Sat Jan 21, 2012 1:45 pm

Hi Peter
Your change in code did the trick.
Thanx

When entering your log/bug code. The following message appears above the projectpage:

Found templates/en_gb_createproject_prepare.tpl ? =
Real Path for templates/en_gb_createproject_prepare.tpl = '/data/home/xxxxxxxxxx/domains/hogeschool.org/public_html/test/reportico-2.3/templates/en_gb_createproject_prepare.tpl'
Script File /home/xxxxxxxxxx/domains/hogeschool.org/public_html/test/reportico-2.3/run.php
Relative Path is ../../../../../../../data/home/xxxxxxxxxx/domains/hogeschool.org/public_html/test/reportico-2.3/templates/en_gb_createproject_prepare.tpl

Hope this helps
I´ll no go on with Reportico and explore the program.

Eelco
eelco
 
Posts: 4
Joined: Sat Jan 21, 2012 9:03 am

Re: Installation issue

Postby eelco » Sat Jan 21, 2012 2:14 pm

Hi Peter,

In the tutorial i get this message:
Fatal error: Call to undefined method DateTime::setTimestamp() in /data/home/xxxxxx/domains/hogeschool.org/public_html/test/reportico-2.3/swutil.php on line 243
On that line in swutl.php I read: $datetime->setTimestamp ( $new_time );
The timestamps are set on YYYY-MM-DD

..........

Got it.
I think I forgot to enter the date-range. (an error when forgetting to do this would be nice)

I discovered this looking at your homepage/film - tutorials and comparing the pages.
I also found the following error, probably because I didn´t click on each page in the right order?
Image
showing you the image did not work. you find it at: hogeschool.org/wb/pages/office/reportico/error.php

Is there a way to enter /change the data (films, people who rent the film etc.) with a form I can design?
Thus entering the data in the mysql database, or have I overlooked it?

Thanx
Eelco
eelco
 
Posts: 4
Joined: Sat Jan 21, 2012 9:03 am

Re: Installation issue

Postby peterdeed » Sat Jan 21, 2012 2:48 pm

Firstly, are you saying that the date range is not already populated with defaults when you are running a report? when exactly were you getting the error about the DateTime?


If you just want to populate the tutorial database, the report menu provides a "generate the tutorial database" .. choose that and with Create tables radio button checked (it will create about 6 tables with a prefix of reptut) .. you should then have the data ready to report. There is no form for maintaing the data since this is only for reporting data.

BTW thanks for the debug output, I will have to put this fix into the release soon

Peter
peterdeed
 
Posts: 1837
Joined: Thu Oct 13, 2011 11:00 pm

Re: Installation issue

Postby peterdeed » Sun Jan 22, 2012 12:10 pm

Ok I found in the PHP documention on this page http://php.net/manual/en/function.realpath.php that the realpath functions does not behave as expected on BSD systems!! That explains everything

Peter
peterdeed
 
Posts: 1837
Joined: Thu Oct 13, 2011 11:00 pm


Return to Installation Issues

Who is online

Users browsing this forum: johnnyPeark and 2 guests

cron