[Sahana_proj] fatal error and fix

Lanstein, Alex C aclan at conncoll.edu
Tue Nov 28 12:24:15 EST 2006


>>>HINT: If you use Linux terminal the grep command is your friend to do text search across multiple files. 
 
Agreed - `find . | xargs grep -i "string"` is your friend.
 
acl
 

________________________________

From: sahana_proj-bounces at lists.trincoll.edu on behalf of de Lanerolle, Trishan R.
Sent: Fri 11/24/2006 9:12 PM
To: sahana_proj at lists.trincoll.edu
Subject: [Sahana_proj] fatal error and fix



Hi Guys,
Just wanted to pass along the following coding lesson. If you come across the following error, it is due to a file getting included twice. This could happen if you call a .inc inside another and both contain calls  to shared library or another inc file.

Fatal error: Cannot redeclare get_manager_id() (previously declared in /usr/share/sahana_deploy/sahana_nov24/mod/vm/utility_functions.inc:28) in /usr/share/sahana_deploy/sahana_nov24/mod/vm/utility_functions.inc on line 34

The fix is to use include_once() or require_once() instead of include(). This would force php to load the library once.

This is a good example of the type of problem, that if you run into is worth sharing with the group. Even if you haven't found the fix.
Have a good weekend,
Trishan


HINT: If you use Linux terminal the grep command is your friend to do text search across multiple files. 



Trishan de Lanerolle'04
Computer Science/Engineering
Technology Coordinator
Systems and Networking
LITC B35
Trinity College
(860) 297 5313


_______________________________________________
Sahana_proj mailing list
Sahana_proj at lists.trincoll.edu
http://lists.trincoll.edu/cgi-bin/mailman/listinfo/sahana_proj





More information about the Sahana_proj mailing list