Hi there,
I’m in charge of setting up an internal website for a university department, which will include a custom-written timetabling software. I’ve created the timetabling system outside of MODx, and it is working fine, but when trying to implement the various parts as snippets to use in MODx, I run into problems.
In particular, I have a class that takes care of creating and modifying events in the timetable. When the class is called, MODx throws an error. The error isn’t in my code, but points to a line in the document parser class:
PHP error debug
Error: mysql_query() [function.mysql-query]: Access denied for user ’apache’@’localhost’ (using password: NO)
Error type/ Nr.: Warning - 2
File: /data/html/www/modx/manager/includes/document.parser.class.inc.php
Line: 1295
Line 1295 source: $ds= @mysql_query($sql);
Parser timing
MySQL: 0.0037 s (6 Requests)
PHP: 0.0611 s
Total: 0.0649 s
Error while inserting event log into database.
I’m not getting this error on any of the other pages, so the parser class is fine. Does anyone have any idea what could be causing the MODx parser to attempt to connect to the database as apache (i.e. to lose its database connection settings, I assume)? I’ve checked that I closed all my database connections again, and I don’t have any global variables floating around in my code, they are all declared as var within a class.
If it helps, I’m happy to post my code up here.
Thanks in advance,
Jan