PDA

View Full Version : Invalid Argument Errors


emerson
30-06-05, 07:46 AM
Warning: Invalid argument supplied for foreach() in /home/nigel_l/strategichelpdesk-www/projectmanagement/includes/main_functions.php on line 538

Warning: Invalid argument supplied for foreach() in /home/nigel_l/strategichelpdesk-www/projectmanagement/modules/projects/vw_idx_proposed.php on line 73

What is causing these problems. How can I fix it?

emerson
30-06-05, 07:47 AM
I also get

Table 'strategichelpdesk_com_project.tasks_critical' doesn't exist

pedroa
30-06-05, 08:07 AM
tasks_critical is a temporary table, so ...
Do you have mySQL rights to create temporary tables with the username/password you gave at dP installation?

Pedro A.

emerson
30-06-05, 08:16 AM
Actually, looking at other post on the forum I found the fix for the table does not exsist error. I used the temporary table fix.

The current problem is:
Warning: Invalid argument supplied for foreach() in /home/nigel_l/strategichelpdesk-www/projectmanagement/includes/main_functions.php on line 538

)
1 /home/nigel_l/strategichelpdesk-www/projectmanagement/modules/projects/index.php:91 exec('/home/nigel_l/strategichelpdesk-www/projectmanagement/classes/query.class.php',523,0,'query failed(CREATE TEMPORARY TABLE tasks_sum SELECT task_project, COUNT(distinct task_id) AS total_tasks,
SUM(task_duration * task_percent_complete * IF(task_duration_type = 24, 8.0, task_duration_type))/
SUM(task_duration * IF(task_duration_type = 24, 8.0, task_duration_type)) AS project_percent_complete FROM tasks GROUP BY task_project) - error was: Access denied for user: \'nigel_l@strategichelpdesk.com\' to database \'strategichelpdesk_com_project\'')
2 /home/nigel_l/strategichelpdesk-www/projectmanagement/index.php:319 require('/home/nigel_l/strategichelpdesk-www/projectmanagement/modules/projects/index.php')

ERROR: /home/nigel_l/strategichelpdesk-www/projectmanagement/classes/query.class.php(523): query failed(CREATE TEMPORARY TABLE tasks_summy SELECT task_project, COUNT(distinct task_id) AS my_tasks FROM tasks WHERE task_owner = 1 GROUP BY task_project) - error was: Access denied for user: 'nigel_l@strategichelpdesk.com' to database 'strategichelpdesk_com_project'
Backtrace:
0 /home/nigel_l/strategichelpdesk-www/projectmanagement/classes/query.class.php:523 dprint(

pedroa
30-06-05, 08:23 AM
Seems like the fix didn't work, i guess ...

Pedro A.

emerson
30-06-05, 08:36 AM
I applied that fix to index.php would the same fix be applied to main_functions.php ?

pedroa
30-06-05, 09:02 AM
What does the fix do?
If we are talking about the same fix (and I suppose we are), then the idea is to avoid the creation of temporary tables and their deletion after use, but create permanent tables with the same structure of the temporary ones, and instead of deleting the tables after its use do a deletion of all the records in those tables.

main_functions.php has nothing to do with temporary tables creation problem.

Pedro A.

emerson
30-06-05, 09:09 AM
That is what I thought. thank you