Community Forums

ATutor Bug Reports

Parcher Warning


You must be signed-in to post.

AuthorSubject
 
Page: 1
marklee

Avatar for marklee
Subject: Parcher WarningQuote this post in your reply
I got the following warning as I used the Patcher to install (each of) the patches after installation of 1.62:

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of array_pop(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/content/Atutor/mods/_standard/patcher/classes/Patch.class.php on line 691
Posted: 2009-06-02 16:28:54
cindy

Avatar for cindy
Subject: Re: Parcher WarningQuote this post in your reply
You can ignore this warning for now. It won't affect patch installation. This will be fixed in our next release. Thanks.
Posted: 2009-06-03 16:05:48
marklee

Avatar for marklee
Subject: Re: Patcher WarningQuote this post in your reply
Some more worries. This spews out at the top of the page when the Search link is clicked:
Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php on line 35

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php on line 35

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php on line 38

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php on line 38

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php on line 48

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php on line 48

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php on line 49

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php on line 49

Warning: Cannot modify header information - headers already sent by (output started at /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php:35) in /home/content/l/e/e/leemediacom/html/training/Atutor/include/classes/Language/Language.class.php on line 123
Posted: 2009-06-04 00:35:28
cindy

Avatar for cindy
Subject: Re: Patcher WarningQuote this post in your reply
Thanks for your report. This has been confirmed and will be fixed in our next release.
Posted: 2009-06-04 10:08:19
marklee

Avatar for marklee
Subject: Re: Patcher WarningQuote this post in your reply
Is there any short term solution? Any visitor/user (including malicious ones) who does a search now sees our full server path.

Thanks.
Posted: 2009-06-04 10:44:05
cindy

Avatar for cindy
Subject: Re: Patcher WarningQuote this post in your reply
Turn on allow_call_time_pass_reference in php.ini
Posted: 2009-06-04 10:56:57
marklee

Avatar for marklee
Subject: Re: Patcher WarningQuote this post in your reply
I'm on a hosted server so no access to their php.ini.
Posted: 2009-06-04 11:25:28
cindy

Avatar for cindy
Subject: Re: Patcher WarningQuote this post in your reply
Go to the scripts and the lines where "Call-time pass-by-reference has been deprecated..." are reported, remove '&' in front of the variables.

for example, include/lib/search.inc.php, line 35 is:

$content_search_results = get_content_search_result($words, $predicate, $course_id, &$total_score, &$course_score);

remove '&' in front of $total_score and $course_score:

$content_search_results = get_content_search_result($words, $predicate, $course_id, $total_score, $course_score);
Posted: 2009-06-04 11:39:47
marklee

Avatar for marklee
Subject: Re: Patcher WarningQuote this post in your reply
Error warnings at top of page gone. Thanks.

After a search, while results are shown, this warning is above them:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php on line 202

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php on line 202

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php on line 202
Posted: 2009-06-04 14:24:20
cindy

Avatar for cindy
Subject: Re: Patcher WarningQuote this post in your reply
Removing '&' itself would not cause this error. It could be somewhere else was accidentally modified. Hope you keep the backup of search.inc.php before modifying it. Revert search.inc.php to the ATutor one and apply patch #0025. I just issued patch #25 to fix warning of "Call-time pass-by-reference has been deprecated". Rmb, revert search.inc.php back to what it was before applying this patch.
Posted: 2009-06-04 14:50:11
marklee

Avatar for marklee
Subject: Re: Patcher WarningQuote this post in your reply
Thanks for the patch but it achieved the same result as when I removed the ampersands myself. (Smart enough to edit a php script without messing it up. smile ) That problem resulted from navigating to the search page and had nothing to do with MySQL search result.

This warning comes after a search is done:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php on line 202

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php on line 202

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/content/l/e/e/leemediacom/html/training/Atutor/include/lib/search.inc.php on line 202
Posted: 2009-06-04 15:10:48
cindy

Avatar for cindy
search.inc.php

Attachment: search.inc.php
Subject: Re: Patcher WarningQuote this post in your reply
Umm.. Do u have all the patches installed?

cannot re-produce. backup the file u have and try attached search.inc.php.
Posted: 2009-06-04 15:47:13
marklee

Avatar for marklee
Subject: Re: Patcher WarningQuote this post in your reply
Thanks Cindy. It works. It may have something to to with the patches because that's the only way I "touched" the file apart from removing the ampersands locally.

Aaha. I think I know what went wrong. I edited and uploaded the original search.inc.php rather than editing the one on the server that had all the patches.

Now comparing the two files the the "while" with the sql fecth is now at line 204 and not 202 as in the warning message.

I am silly enough to screw up the script after all happy
Posted: 2009-06-04 16:05:51
aelfwine
Subject: Re: Patcher WarningQuote this post in your reply
If you are asking for help, provide lots of detail so problems can be reproduced.

Things to describe:
Operating system ATutor is installed on -
ATutor version -
Patch #s applied -
ATutor theme name -
PHP version -
MySQL version -
Webserver & version -
Copies of error messages -
Changes to default settings -
Web browser being used -
...and anything else relevant -
Posted: 2009-06-04 16:23:59
 
Page: 1

You must be signed-in to post.

Related Articles