Adding some modification code creates an error

I’m trying to add a Member Credit modification to a php file, that works successfully on another site. I’m trying to figure it out as I go, When I add the lines of code into the search.php file I see a HTTP Error 500. But when I commented-out these lines:

//CREDITS MOD
//–BEGIN–
$video_price = videoPrice();
$total_price = $video_price * $total_records;
$member_credits = get_member_credits($user_id);
// --END–

the file proceeds successfully. So, obviously I’m missing something. Can you tell me what the function of these lines might be? And maybe what might be needed? Any help will be appreciated.

Hard to say what the two functions do, though I’d assume the first returns the price of a video, and the second returns member credits. So the first thing to do is look at the code for those functions and see what might be causing them to fail. For example, how does the first one know what price to return? Is it based on some kind of global variable, and if so, is it set to a proper value? For the second, is $user_id set to a proper value?

Another thing would be to narrow down exactly which of the lines is causing the error, or do they work if you un-comment them one at a time?

1 Like

have a look at the phpinfo() where your logfile is.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.