Fixed it myself. I had to add.. include($phpbb_root_path . 'common.' . $phpEx); To the top. The functions_user.php file relied on things in common. So obvious now. I spent hours on this one. Thanks for all the help anyway.
Hi, I don't think that URL for the functions_user.php file will work since it's stored on a local drive. Try: This: include("/forum/includes/functions_user.php"); Or this: include("/includes/functions_user.php"); Or this: include("../includes/functions_user.php"); Or, at last, this: include("includes/functions_user.php");
elias_sorensen... include function can include file with full path address... for more info, read this http://id2.php.net/manual/en/ini.core.php#ini.include-path Code (markup):
Yes it's finding the include file just fine. No error message about "group_user_add" being an undefined function. The script just runs and quits without any output and like I said if I put a print line after the call to the function it doesn't output but if I put it before it does. So it seems to be like the function isn't working right and is crashing or something weird. I know this function is commonly used to do this though. If someone can fix this for me here in the forums I'll pay you as well. Here are a couple different scripts that use this function without any problems and at the bottom the full function text.... and... Full function from functions_user.php
It looks like it might be expecting an array for the $user_id try this : <?php $group_id = 5; $user_id = array(); $user_id[] = 54; include("C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/forum/includes/functions_user.php"); if ($error = group_user_add($group_id, $user_id)) { trigger_error($error); } ?> PHP: