an error occured when i start my application

johan

Member
Hi Eugineo,

I have copied my new application and database to the production server, but now I get twise the message "an error occured" above my application.
When I looked it up, I saw that the error was given by a function in the header.php

But what can I do to fix this issue?

regards Johan


[sub]You are using DaDaBIK version 9.2.1

PHP Version: 7.0.10

mysql version: 5.7.14

Web server: Apache/2.4.23 (Win64) PHP/7.0.10

Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36[/sub]
 

eugenio

Administrator
Staff member
Hello,
have you changed anything in the original header.php file? Can you post the complete error message?

Best,
 

johan

Member
Hello Eugineo

There is one line changed:
<title>Nerp 1.2</title>

When I put the original file back, the error still stays.
And the messaga "an error occured" and on the next line again "an error occured" is all there is.
The application works fine, for so far I can test.

It happend after I copied the application to the production server.
On my build desktop there is no error at all.


The message is above every page in the application.

Regards,
Johan
 

eugenio

Administrator
Staff member
Hello,
you said that the error was given by a function in the header.php, can you post the complete error message? How do you know that is related to header.php?

If you post a screenshot it would be even better.

Best,
 

johan

Member
Hello,

I know because i looked it up, and the message "an error occured" was only found in the header.php file.

But I can be wrong, all I would like is to fix this error.

on row 1788: from your header.php code. ...1806
####################################################
foreach($temp_ar as $temp_ar_el){


if ($enable_granular_permissions === 1 && $enable_authentication === 1){
if ( user_is_allowed($_SESSION['logged_user_infos_ar'], 'table', $temp_ar_el['name_table'], '1') === 1 || user_is_allowed($_SESSION['logged_user_infos_ar'], 'table', $temp_ar_el['name_table'], '1') === 2 || $temp_ar_el['name_table'] === $users_table_name || $temp_ar_el['name_table'] === $groups_table_name || $temp_ar_el['name_table'] === $prefix_internal_table.'static_pages'){
$allowed_table_infos_ar[] = $temp_ar_el;
}
}
elseif($enable_granular_permissions === 0 || $enable_authentication === 0){

$enabled_features_ar = build_enabled_features_ar($temp_ar_el['name_table']);

if ($enabled_features_ar['list'] === '1'){
$allowed_table_infos_ar[] = $temp_ar_el;
}
}
else{
echo "<p>An error occured";
} // end else

###################################################

Regards,
Johan
 

eugenio

Administrator
Staff member
I am realizing now the typo (occured instead of occurred), apart from that, that message is also in other two files (you don't see that because they are encrypted).
I would say it's quite impossibile that you get that message if the files you have only are exactly the same you have locally, are you sure you didn't change anything, for example in config.php?

Can you paste here your entries in config.php for this two parameters (just copy and paste the relevant lines):
$enable_authentication
$enable_granular_permissions

best,
 

johan

Member
Hi Eugenio,

the two parameters would be:

$enable_granular_permissions = 1;
$enable_authentication = 1;

And the copy I made was 1@1,
I made an sql drop from the database, and made a new one at the production server and inserted the sql dropfile.
I have zipped the program map and extracted in a map on the server with the same name.

I did this procedure a few times before with other versions of my app in the last 2 years and it works everytime on this way.
Except when I had to install the ionclube programe on the server.

I hope you can help me.

regards Johan
 

eugenio

Administrator
Staff member
That's very strange.
I guess you had to change, at least, config.php; can you double check if you introduced by mistake some additional characters?
Maybe you could try to replace config.php with the one from the working installtion and then edit your db parameters again.

Are all the requirements, including ioncube version, respected on the server?

Best,
 
Top