Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RESTRICTED FILE
#1
Hello:

In a corebos instalation that has been in operation for several years, an error has just appeared while creating a new account.

Sorry! Access to restricted file
We are looking for this file path: modules//.php
We are looking here:
Real file path:
Root file path: /home/XXXXXXXXX/public_html/crm/

It seems that corebos is looking for nowhere...

The curious thing is that it does not appear in any of the other modules, and the user has adequate permissions. In fact, if another user accesses (myself) the error is not reproduced.

I have read on stack overflow https://stackoverflow.com/questions/9060930/vtiger-custom-module-sorry-attempt-to-access-restricted-file that it could be a problem with the cache, and it recommends deleting the contents of the folder templates_c.

Can I do it without problems? Any ideas?

Thank you
Reply
#2
Hi

you can delete that folder but it probably won't help. is it failing on all accounts or just some?

I'd say that it is some field that you are putting too many characters in. In other words, in the account name is 10 characters long you are putting 11. We added a check for that some years ago but if your installation is before that it could be the issue.

In general, these errors are easy to fix. Activate debugging, and reproduce the error, you should see an SQL error in the log that will indicate where the issue is.
Joe
TSolucio
Reply
#3
Thanks Joe, one of the fields was too long. Solved!
Reply
#4
great! Have a nice weekend!
Joe
TSolucio
Reply
#5
Hello:

I am trying to update an old corebos version,becausse I nneed that it work with Php 8.1,  and when I try to log in in the new system, appears this message:

Sorry! Attempt to access restricted file.

I made the changes  that the debugging guide (https://corebos.com/docs_grav/developer-guide/development_framework/debuging) recommend, and , when the functioncheckFileAccessForInclusion is called, the message is

Sorry! Attempt to access restricted file.
We are looking for this file path: modules//.php
We are looking here:
Real file path:
Root dir path: /home/XXXX/www/YYY/

I turn on debuging for ADODB , and returns

Query: SELECT denormtable FROM vtiger_entityname WHERE tabid=56 failed. Unknown column 'denormtable' in 'field list'
1054: Unknown column 'denormtable' in 'field list'

ADOConnection._Execute(SELECT denormtable FROM vtiger_entityname WHERE tabid=56) % line 1217, file: adodb.inc.php
ADOConnection.Execute(SELECT denormtable FROM vtiger_entityname WHERE tabid=56, Array[1]) % line  448, file: PearDatabase.php
PearDatabase.pquery(SELECT denormtable FROM vtiger_entityname WHERE tabid=?, Array[1]) % line   57, file: CRMEntity.php
CRMEntity.__construct() % line   99, file: CRMEntity.php
CRMEntity.getInstance(GlobalVariable) % line 4020, file: CRMEntity.php

This field don´t exist in the database. How I cam resolve it?

Thanks
Reply
#6
make sure you load and apply all pending changesets
one of those should add the missing column
I am not sure 8.1 is supported. I don't remember what version we stopped at
If you need a higher version support, contact me.
Joe
TSolucio
Reply
#7
Joe, I send you a mail. I prefer a higher version, if it is possible. Thanks
Reply
#8
Hello:

I an trying to update cbUpdater module, and when I charge new Updates, mysql debug returns:

Query: insert into vtiger_cbupdater(cbupdaterid,cbupd_no,author,filename,classname,execstate,execdate,systemupdate,execorder,perspective,blocked) values(130183,'cbupd-0000424','mohamed-shibeJR','importdefaultemailtemplates','importdefaultemailtemplates','Pending',NULL,'1','424','0','0') failed. Duplicate entry 'importdefaultemailtemplates-importdefaultemailtemplates' for key 'findupdate'
1062: Duplicate entry 'importdefaultemailtemplates-importdefaultemailtemplates' for key 'findupdate'

ADOConnection._Execute(insert into vtiger_cbupdater(cbupdaterid,cbupd_no,author,filename,classname,execstate,execdate,systemupdate,execorder,perspectiv...) % line 1204, file: adodb.inc.php
ADOConnection.Execute(insert into vtiger_cbupdater(cbupdaterid,cbupd_no,author,filename,classname,execstate,execdate,systemupdate,execorder,perspectiv..., Array[1]) % line 495, file: PearDatabase.php
PearDatabase.pquery(insert into vtiger_cbupdater(cbupdaterid,cbupd_no,author,filename,classname,execstate,execdate,systemupdate,execorder,perspectiv..., Array[11]) % line 816, file: CRMEntity.php
CRMEntity.insertIntoEntityTable(vtiger_cbupdater, cbupdater, ) % line 113, file: CRMEntity.php
CRMEntity.saveentity(cbupdater, ) % line 1084, file: CRMEntity.php

And I can´t load the rest of updates (I need do it because the former error is not solved).

There's a solution? Thanks

Searching the cbupdater module I found another update with the same name, importdefaultemailtemplates, but I can´t delete it... If I change the name of the existing upsate (after apply..), it works?
Thanks again
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)