require_once() on a class.php file
Posted: Wed Oct 17, 2012 1:42 am
Hi,
This may be a stupid question but it has me and my team stumped. We need to back up the execution results as file as we make them. That means when we run the execution code it creates an xml file, if we add a bug it modifies the xml file, and if we add an attachment it will also modify the xml file.
I have all the code working for creating the file and modifying it. However, when I login I get the following error:
Now in the tlAttachmentRepository.class.php I added these two lines:
require_once('../../config.inc.php');
require_once('../execute/exec_duplicate.lib.php');
I include the config.inc.php to determine if I have execution_duplication enabled, and the other file is my own library for backing up the result files.
If I comment both of them out I can login normal. (Obviously the modified code won't work)
I am sure this is a stupid error on my part, but I can't figure out why including these two files would actually cause a problem.
Any help would be greatly appreciated,
Thanks,
BTowle
This may be a stupid question but it has me and my team stumped. We need to back up the execution results as file as we make them. That means when we run the execution code it creates an xml file, if we add a bug it modifies the xml file, and if we add an attachment it will also modify the xml file.
I have all the code working for creating the file and modifying it. However, when I login I get the following error:
But get this, I am actually logged in, if I change the url I can access the testlink server fine.Fatal error: require_once(): Failed opening required '../../config.inc.php' (include_path='.:/usr/share/php:/usr/share/pear:.:/var/www/testlink/lib/functions/:/var/www/testlink/lib/issuetrackerintegration/:/var/www/testlink/third_party/') in /var/www/testlink/lib/functions/tlAttachmentRepository.class.php on line 24
Now in the tlAttachmentRepository.class.php I added these two lines:
require_once('../../config.inc.php');
require_once('../execute/exec_duplicate.lib.php');
I include the config.inc.php to determine if I have execution_duplication enabled, and the other file is my own library for backing up the result files.
If I comment both of them out I can login normal. (Obviously the modified code won't work)
I am sure this is a stupid error on my part, but I can't figure out why including these two files would actually cause a problem.
Any help would be greatly appreciated,
Thanks,
BTowle