View Full Version : PHP error changing form input field
10-12-2009, 09:21 AM
I am having an issue trying to change a 'select' field to 'text' in my searchform.
I get the following error when i attempt a search
Fatal error: Call to undefined method SearchListingFullText::GetRow() in /var/www/html/includes/class_search.php on line 347
This is the code i am attemting to change in SEARCH.PHP
$search_form_object->addField('category','text',array('label'=>$PMDR->getLanguage('public_general_search_category'),'fieldset'=>'search','value'=>$_GET['category'],'style'=>'width: 220px; height: 28px;','first_option'=>'','options'=>$db->GetAssoc("SELECT id, title FROM ".T_CATEGORIES." WHERE hidden=0 AND level=1 ORDER BY left_"),'class'=>'input_small'));
This is line 347 in CLASS_SEARCH.PHP
10-12-2009, 09:48 AM
This line #347 seem to be an encrypted php code. You need to get php source code to debug this script.
10-12-2009, 09:56 AM
The error says that the method GetRow() dos not exist in in the class SearchListingFullText.
Please check if GetRow() exists in the class SearchListingFullText. Also please check that you are calling GetRow() on an instance (object) of a correct class (I mean it could be that GetRow() exists in some other class but you are calling it on an object of SearchListingFullText by mistake).
I am sorry, but I am afraid it would be really difficult to help without seeing more code.
Also the line you have shown looks like part of some string. It does not look like PHP code ... Could your PHP code be encoded with something like Zend Guard or IonCube by any chance?
Edit: Sergey Popov has been faster to answer...
10-12-2009, 10:09 AM
I have attached the class_search.php file pasted in txt format.
Let me what you think.
Again Thanks guys much appreciated!!
10-12-2009, 10:58 AM
Yes, it is encoded with IonCube. You would be unable to see the PHP code.
Probably you have documentation for the class. So that you could check which methods the class actually contains.
In case you are using PHP5, probably you could try Reflection API (http://www.php.net/manual/en/language.oop5.reflection.php) to check the class structure. I said "try" because personally I did not try Reflection API on encoded code so I am not sure it it would work ...
10-12-2009, 12:40 PM
Yeh there is ioncube encryption.
From your experience (if any) with script developers, would they be cooperative in providing source code for the encryped php file?
10-12-2009, 12:54 PM
I am sorry, I never asked such developers to provide the source code ... Still if they encrypt the code and sell it, I think they should provide some documentation or answer questions ... I would definitely ask them I think.
I can not say for the developers of course ... I know if I encrypted anything, I would answer questions for sure ...
Though honestly speaking personally I try not to use encrypted code. Probably because if I use a 3rd party code, I want to check the programming style (to get an opinion how experienced the programmer who wrote it was), possibility of SQL injections and other possible security holes etc. Since with encrypted code this is not possible, I am trying not to use such server-side code without really strong need. Though this is my personal opinion only. Personally I am a little bit paranoic about security and usually do not trust any server-side code which I can not check myself. Again: this is my personal opinion only which could be wrong of course.
10-12-2009, 04:24 PM
Mate you have been a great help!
I am not fluent enough with php to assert any opinion to the contrary.
I myself am more familiar with html.
Could you please take a look at this issue i am having if you have the chance?
Here is a link http://codingforums.com/showthread.php?t=179430
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.