Installation Error

PANKAJ

New member
Hi,

Good Day!

I am getting below error when trying to access the index.php file/install.php

DaDaBik 9.0 Enterprise Version Installation




[Wed Aug 15 14:23:01.308570 2018] [authz_core] [pid 25081] mod_authz_core.c(809): [client 10.84.4.153:51796] AH01626: authorization result of <RequireAny>: granted
[Wed Aug 15 14:23:01.308578 2018] [core] [pid 25081] request.c(304): [client 10.84.4.153:51796] request authorized without authentication by access_checker_ex hook: /index.php
[Wed Aug 15 14:23:01.336409 2018] [:error] [pid 25081] [client 10.84.4.153:51796] PHP Notice: Undefined variable: conn in /var/www/kop2sscan/include/db_functions_pdo.php on line 72
........​




Additional Info:
  • OS - Ubuntu 16.04
  • IonCube Loader is installed and working fine
  • I can successfully access dummy index.html, info.php etc files in any of the directory in installation folder or subfolders
  • PDO and PDO_mysql are installed and enabled (Checked forum for previous messages on this error - found that PDO was missing for earlier errors. But in my case it is installed)
  • Database can be accessed normally by phpmyadmin, mysql, command line.
  • debug is also set to 1, but this is all I am getting for this error.

Please help to solve this problem.

Thank you.
 

eugenio

Administrator
Staff member
Hello,
can you run the file check_sessions.php (in the root)? If yes, what is the output? Do you see this message

[Wed Aug 15 14:23:01.308578 2018] [core] [pid 25081] request.c(304): [client 10.84.4.153:51796] request authorized without authentication by access_checker_ex hook:

also for check_sessions.php ?

Did you change any file apart from config.php?
 

PANKAJ

New member
Hi Eugenio,

Thanks for the reply.

I have only changed the config.php file.

And i could see the access_check_ex hook in the error message.

Please find below error log for both check_session.php and config.php.

Thanks in advance.




[Wed Aug 15 21:29:38.954044 2018] [core] [pid 37506] protocol.c(653): [client 10.84.4.153:58288] Request received from client: GET /install.php HTTP/1.1
[Wed Aug 15 21:29:38.954261 2018] [http] [pid 37506] http_request.c(394): [client 10.84.4.153:58288] Headers received from client:
[Wed Aug 15 21:29:38.954329 2018] [http] [pid 37506] http_request.c(398): [client 10.84.4.153:58288] Accept: image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
[Wed Aug 15 21:29:38.954393 2018] [http] [pid 37506] http_request.c(398): [client 10.84.4.153:58288] Accept-Language: en-US,en;q=0.5
[Wed Aug 15 21:29:38.954450 2018] [http] [pid 37506] http_request.c(398): [client 10.84.4.153:58288] User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
[Wed Aug 15 21:29:38.954523 2018] [http] [pid 37506] http_request.c(398): [client 10.84.4.153:58288] Accept-Encoding: gzip, deflate
[Wed Aug 15 21:29:38.954580 2018] [http] [pid 37506] http_request.c(398): [client 10.84.4.153:58288] Host: 10.84.4.16
[Wed Aug 15 21:29:38.954646 2018] [http] [pid 37506] http_request.c(398): [client 10.84.4.153:58288] Connection: Keep-Alive
[Wed Aug 15 21:29:38.954705 2018] [http] [pid 37506] http_request.c(398): [client 10.84.4.153:58288] Cookie: PHPSESSID=7km1h389uk07pjgu89rsp6p1c2; kop2sscan=60kcng6oism6a1vm9dr8baue91
[Wed Aug 15 21:29:38.954822 2018] [authz_core] [pid 37506] mod_authz_core.c(809): [client 10.84.4.153:58288] AH01626: authorization result of Require all granted: granted
[Wed Aug 15 21:29:38.954886 2018] [authz_core] [pid 37506] mod_authz_core.c(809): [client 10.84.4.153:58288] AH01626: authorization result of <RequireAny>: granted
[Wed Aug 15 21:29:38.954943 2018] [core] [pid 37506] request.c(304): [client 10.84.4.153:58288] request authorized without authentication by access_checker_ex hook: /install.php
[Wed Aug 15 21:29:38.974780 2018] [:error] [pid 37506] [client 10.84.4.153:58288] PHP Notice: Undefined variable: conn in /var/www/kop2sscan/include/db_functions_pdo.php on line 71
[Wed Aug 15 21:29:38.975018 2018] [:error] [pid 37506] [client 10.84.4.153:58288] PHP Fatal error: Uncaught Error: Call to a member function query() on null in /var/www/kop2sscan/include/db_functions_pdo.php:109\nStack trace:\n#0 /var/www/kop2sscan/include/db_functions_pdo.php(569): execute_db('SELECT TABLE_NA...', NULL)\n#1 /var/www/kop2sscan/include/business_logic.php(0): get_tables_list(1)\n#2 /var/www/kop2sscan/include/common_start.php(0): build_tables_names_array(0, 0)\n#3 /var/www/kop2sscan/install.php(0): unknown()\n#4 {main}\n thrown in /var/www/kop2sscan/include/db_functions_pdo.php on line 109
[Wed Aug 15 21:29:38.975209 2018] [http] [pid 37506] http_filters.c(1129): [client 10.84.4.153:58288] Response sent with status 500, headers:
[Wed Aug 15 21:29:38.975279 2018] [http] [pid 37506] http_filters.c(1136): [client 10.84.4.153:58288] Date: Wed, 15 Aug 2018 13:29:38 GMT
[Wed Aug 15 21:29:38.975337 2018] [http] [pid 37506] http_filters.c(1139): [client 10.84.4.153:58288] Server: Apache/2.4.18 (Ubuntu)
[Wed Aug 15 21:29:38.975394 2018] [http] [pid 37506] http_filters.c(958): [client 10.84.4.153:58288] Expires: Thu, 19 Nov 1981 08:52:00 GMT
[Wed Aug 15 21:29:38.975462 2018] [http] [pid 37506] http_filters.c(958): [client 10.84.4.153:58288] Cache-Control: no-store, no-cache, must-revalidate
[Wed Aug 15 21:29:38.975522 2018] [http] [pid 37506] http_filters.c(958): [client 10.84.4.153:58288] Pragma: no-cache
[Wed Aug 15 21:29:38.975578 2018] [http] [pid 37506] http_filters.c(958): [client 10.84.4.153:58288] Content-Length: 189
[Wed Aug 15 21:29:38.975634 2018] [http] [pid 37506] http_filters.c(958): [client 10.84.4.153:58288] Connection: close
[Wed Aug 15 21:29:38.975689 2018] [http] [pid 37506] http_filters.c(958): [client 10.84.4.153:58288] Content-Type: text/html; charset=utf-8
[Wed Aug 15 21:29:38.975836 2018] [core] [pid 37506] core_filters.c(525): [client 10.84.4.153:58288] core_output_filter: flushing because of FLUSH bucket
[Wed Aug 15 21:29:38.976054 2018] [core] [pid 37506] core_filters.c(525): [client 10.84.4.153:58288] core_output_filter: flushing because of FLUSH bucket
[Wed Aug 15 21:31:06.072897 2018] [core] [pid 37507] protocol.c(653): [client 10.84.4.153:58311] Request received from client: GET /check_sessions.php HTTP/1.1
[Wed Aug 15 21:31:06.073140 2018] [http] [pid 37507] http_request.c(394): [client 10.84.4.153:58311] Headers received from client:
[Wed Aug 15 21:31:06.073213 2018] [http] [pid 37507] http_request.c(398): [client 10.84.4.153:58311] Accept: image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
[Wed Aug 15 21:31:06.073296 2018] [http] [pid 37507] http_request.c(398): [client 10.84.4.153:58311] Accept-Language: en-US,en;q=0.5
[Wed Aug 15 21:31:06.073358 2018] [http] [pid 37507] http_request.c(398): [client 10.84.4.153:58311] User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
[Wed Aug 15 21:31:06.073420 2018] [http] [pid 37507] http_request.c(398): [client 10.84.4.153:58311] Accept-Encoding: gzip, deflate
[Wed Aug 15 21:31:06.073480 2018] [http] [pid 37507] http_request.c(398): [client 10.84.4.153:58311] Host: 10.84.4.16
[Wed Aug 15 21:31:06.073553 2018] [http] [pid 37507] http_request.c(398): [client 10.84.4.153:58311] Connection: Keep-Alive
[Wed Aug 15 21:31:06.073616 2018] [http] [pid 37507] http_request.c(398): [client 10.84.4.153:58311] Cookie: PHPSESSID=7km1h389uk07pjgu89rsp6p1c2; kop2sscan=60kcng6oism6a1vm9dr8baue91
[Wed Aug 15 21:31:06.073742 2018] [authz_core] [pid 37507] mod_authz_core.c(809): [client 10.84.4.153:58311] AH01626: authorization result of Require all granted: granted
[Wed Aug 15 21:31:06.073809 2018] [authz_core] [pid 37507] mod_authz_core.c(809): [client 10.84.4.153:58311] AH01626: authorization result of <RequireAny>: granted
[Wed Aug 15 21:31:06.073870 2018] [core] [pid 37507] request.c(304): [client 10.84.4.153:58311] request authorized without authentication by access_checker_ex hook: /check_sessions.php
[Wed Aug 15 21:31:06.090182 2018] [:error] [pid 37507] [client 10.84.4.153:58311] PHP Notice: Undefined variable: conn in /var/www/kop2sscan/include/db_functions_pdo.php on line 71
[Wed Aug 15 21:31:06.090803 2018] [:error] [pid 37507] [client 10.84.4.153:58311] PHP Fatal error: Uncaught Error: Call to a member function query() on null in /var/www/kop2sscan/include/db_functions_pdo.php:109\nStack trace:\n#0 /var/www/kop2sscan/include/db_functions_pdo.php(569): execute_db('SELECT TABLE_NA...', NULL)\n#1 /var/www/kop2sscan/include/business_logic.php(0): get_tables_list(1)\n#2 /var/www/kop2sscan/include/common_start.php(0): build_tables_names_array(0, 0)\n#3 /var/www/kop2sscan/check_sessions.php(20): include('/var/www/kop2ss...')\n#4 {main}\n thrown in /var/www/kop2sscan/include/db_functions_pdo.php on line 109
[Wed Aug 15 21:31:06.091037 2018] [http] [pid 37507] http_filters.c(1129): [client 10.84.4.153:58311] Response sent with status 500, headers:
[Wed Aug 15 21:31:06.091126 2018] [http] [pid 37507] http_filters.c(1136): [client 10.84.4.153:58311] Date: Wed, 15 Aug 2018 13:31:06 GMT
[Wed Aug 15 21:31:06.091198 2018] [http] [pid 37507] http_filters.c(1139): [client 10.84.4.153:58311] Server: Apache/2.4.18 (Ubuntu)
[Wed Aug 15 21:31:06.091270 2018] [http] [pid 37507] http_filters.c(958): [client 10.84.4.153:58311] Expires: Thu, 19 Nov 1981 08:52:00 GMT
[Wed Aug 15 21:31:06.091355 2018] [http] [pid 37507] http_filters.c(958): [client 10.84.4.153:58311] Cache-Control: no-store, no-cache, must-revalidate
[Wed Aug 15 21:31:06.091429 2018] [http] [pid 37507] http_filters.c(958): [client 10.84.4.153:58311] Pragma: no-cache
[Wed Aug 15 21:31:06.091498 2018] [http] [pid 37507] http_filters.c(958): [client 10.84.4.153:58311] Content-Length: 189
[Wed Aug 15 21:31:06.091568 2018] [http] [pid 37507] http_filters.c(958): [client 10.84.4.153:58311] Connection: close
[Wed Aug 15 21:31:06.091637 2018] [http] [pid 37507] http_filters.c(958): [client 10.84.4.153:58311] Content-Type: text/html; charset=utf-8
[Wed Aug 15 21:31:06.091718 2018] [core] [pid 37507] core_filters.c(525): [client 10.84.4.153:58311] core_output_filter: flushing because of FLUSH bucket
[Wed Aug 15 21:31:06.091842 2018] [core] [pid 37507] core_filters.c(525): [client 10.84.4.153:58311] core_output_filter: flushing because of FLUSH bucket



 

eugenio

Administrator
Staff member
Hello,
what you pasted here is the output you see on the screen or something you see from your logs? Are you using Apache as a Web server?
Is it possible to see the application online?

Can you try to remove the first part of check_sessions.php leaving only this part

<?php
if (!isset($_SESSION['test'])){
$_SESSION['test'] = 1;
}
else{
$_SESSION['test']++;
}
echo $_SESSION['test'];
?>

and re-run it?
 

PANKAJ

New member
Hi Eugenio,

Thanks for the reply.

What i pasted above is what i see in the logs. On the screen i am only getting - HTTP 500 Internal Server Error.
Yes, i am using Apache as a WebServer on Ubuntu 16.04.
Unfortunately, the server is behind firewall so there is no online access to it. However, I am still trying to get it installed.

When i run the check_session after removing all include statements i get 1 on the screen.
For other files i get logs similar to logs as before.

Thanks in advance for your help on this.
 

eugenio

Administrator
Staff member
Hello,
in this case I am pretty sure the problem is related to the DB connection, I guess you have already checked that but can you double check that host, user and password are correct?
Do yo have any other application accessing via PDO your DB, just to confirm that everything is working on that side?

Best,
 

PANKAJ

New member
Hi Eugenio,

I had made another script running from same folder and accessing another php file from include folder just to mimic the behaviour of DaDaBIK. This script will connect to DB to give me results of some sql query.

The custom php script worked normally and gave me results with exact same configuration while DaDaBIKgave error with same configuration in DaDaBIK config.php file.

I have made re-installations of the server as well as DaDaBIK, but still no success.
Planning to give up on other OS and stick to Wamp, though in my opinion other OS are more suitable for server installations.

Thanks for your time.
 

eugenio

Administrator
Staff member
That's very strange, does the other script also uses PDO? Can you send the other script (remove password and sensible information first) to support@dadabik.org?

Best,
 

PANKAJ

New member
Hi Eugenio,

I am getting below output when executing below script (replace *xxxx* with actual info)
(My apologies i was not able to access my email when writing this post, so i pasted the content here for checking)
----------------------------------------Output
Hello World - PDO-localhost

{"outcome":true}
----------------------------------------


<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php
echo '<p>Hello World - PDO-localhost</p>';
try{
$dbh = new pdo( 'mysql:host=localhost;dbname=*mydbname*',
'*myusername*',
'*mypassword*',
array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
die(json_encode(array('outcome' => true)));
}
catch(PDOException $ex){
die(json_encode(array('outcome' => false, 'message' => 'Unable to connect by PDO')));
}?>
</body>
</html>





Thanks for your support.
 

PANKAJ

New member
Hi Eugenio,

This has been solved. :)

After checking permissions, virtual host and all other settings. I found the real issue for conn was the db name.

Mysql db - dbname
WAMP - DBNAME worked as it is without issues.
Ubuntu had it case sensitive - DBNAME and dbname are different

Because of this the index.php and install.php were not able to connect correctly.

Only after i changed 'localhost' to '127.0.0.1', it gave me clear error on the screen that either user/password/dbname was not correct.

Once i changed that, it worked just fine.

Thanks for your support and my apologies for any inconvenience.
 

eugenio

Administrator
Staff member
Awesome :)
I was pretty sure it was DB-related but sometimes there are tricky issues that are difficult to track without seeing the application.

Best,
 
Top