Having trouble with an external configuration file linking to another configuration file within a MODx page.
I’ve checked and rechecked my work but can’t find a solution to the following error:
PHP error debug
Error: require_once(../../../affiliates/lib/xmlrpc.inc) [function.require-once]: failed to open stream: No such file or directory
Error type/ Nr.: Warning - 2
File: /home/xxxx/public_html/assets/snippets/affiliatesforall/affiliatecart.inc
Line: 24
Line 24 source: require_once (’../../../affiliates/lib/xmlrpc.inc’);
I have "affiliatecart_inc" snippet call the top of my page,
http://www.xxxx.com.au/test/affiliates/sub?ref=2:
<?php
require_once($modx->config['base_path']."assets/snippets/affiliatesforall/affiliatecart.inc");
?>
assets/snippets/affiliatesforall/affiliatecart.inc:
<?php
(23) require_once ('config.inc'); /* No problem line */
(24) require_once ('../../../affiliates/lib/xmlrpc.inc'); /* Problem line */
(rest of code)
I’ve tried various path combinations of the following to test if I’d missed anything:
../../../affiliates/lib/xmlrpc.inc
../../affiliates/lib/xmlrpc.inc
../affiliates/lib/xmlrpc.inc
./affiliates/lib/xmlrpc.inc
/affiliates/lib/xmlrpc.inc
affiliates/lib/xmlrpc.inc
The MODx file structure is:
/assets
/snippets
/affiliatesforall
affiliatecart.inc
config.inc
The file that failed to be found is here:
/affiliates
/lib
xmlrpc.inc
Any clues out there please? (I realise config files ending in .inc only is poor form)