Web Hosting Talk







View Full Version : PHP Fatal error : Cannot redeclare CSQLAdmin


thazer
06-12-2007, 10:04 AM
hello guys , i'll try to be as fast as i can , i know this topic was previously discussed , but the conclusion of that thread quite didn't help me

i previously owned a free hosting plan , witch seems they use php4.x , i say seems because they don't allow phpinfo() , when i changed the provider and plan , they have php5.x , i have installed a Real Estate Management System , that uses that sqladmin.php file

the error :
Fatal error: Cannot redeclare CSQLAdmin::$functions in /home/impho/public_html/test/realestate/admin/lib/sqladmin.php on line 38

is still there after i try adding the
php_flag allow_call_time_pass_reference 1 and php_value error_reporting "E_ALL & ~E_NOTICE" to .htaccess but no luck the 1st change does nothing and the 2nd shows a blank page , no output

the allow_call_time_pass_reference seems to be on from phpinfo in the payd hosting plan
Directive Local Value Master Value
allow_call_time_pass_reference On On

so it's on , but still that damn error :( i guess recoding the sqladmin.php file could help , but have no idea on php coding, well basic stuff ....

the source code of that sqladmin.php file used by the realestate cms is available here : hoop://pastebin.ca/561456

please please help me
it's a matter of life and death :D

p.s. once again i must appologise for this post :P

Ks Jeppe
06-12-2007, 02:43 PM
Just delete the "var $functions;" on line 38, it's already there on line 28... Actually, you can delete the lines 29-38 since they just say the same, and there's no real need for that :)

Hope this helps, and good luck :)

thazer
06-12-2007, 04:43 PM
well it worked, eventually , now the bug has apeared in other file , in my own tryes i've renamed the 2nd var function deleting last char so making it another var , but having no ideea what i've done , didn't knew it was fixed, now the new bug is Fatal error: Using $this when not in object context in /home/impho/public_html/test/realestate~st/pb_events.php on line 5 the 5th line: $jpp = (int)$this->vars->data["ipp"]; from native english language "not in object context" that meaning it aint declared nowere? or what... thanks again with the 1st help :P now what about this 2nd :D big big sorrys for english tho :D the full source of pb_events.php: hoop://pastebin.ca/562546

Ks Jeppe
06-13-2007, 02:03 PM
Erhm... That fil looks rather weird to me, are you sure that you dont have a class declared somewhere? In php5, $this refers to a object in which the variables occur, but.. you don't seem to have a class :S

That file is going to bea bi**h to fix, could you perhaps upload and show us the other files which are including pb_events.php? :)

thazer
06-13-2007, 05:09 PM
ok thank's very musch for helping me out i've uploaded the hole script in rapidshare , so there won't be the need of other files to be shown here's my uploaded script (the same as the original) hoop://rapidshare.com/files/37048855/realestate-management-tool-code.zip.html or you could download it directly from official: hoop://real-estate-management-software.org/realestate-management-tool-code.zip the reason i post this here , and don't contact the software's manufacturer is because i already did that , and it seems that this project has been forgoten , and no help is available :(

Ks Jeppe
06-13-2007, 05:55 PM
Ok thazer, i've gone through the files for the past 40-50 mins, and to make these work under php 5 will be a regular nightmare :S Is there any chance that you'll be able to either switch back to php4.4, or use some other software?

Perhaps any of the software listed here will be of intrest? http://www.hotscripts.com/PHP/Scripts_and_Programs/Real_Estate/index.html?action=formsubmit&listing_sorting_order=guest_rating&listing_sorting_direction=des :)

thazer
06-18-2007, 07:46 AM
got some questions about this script , if u've kinda seen it's code , when i add manually some new mysql fields like say "currency" i've made with phpmyadmin the table , made it text , and site in templates i add the "Currency: {CURRENCY}" it works suggesting it connects to mysql and reads the currency field , the thing is when i try to search based upon currency it doesnt work , there should be an error like somethin "search based criteria not found" like the other search types do , adding in search.php?currency=euro it doesnt work as long as ?area=2 works please could you tell me how to add these new fields in php script so cms can search in those fields?
p.s. got it to work on a php4.x box , had a long talk with the hosting provider and evantually he changed the domain place.