Discussion Forums  >  Self Hosted Control Panels

Replies: 3    Views: 102

SENSE
Apple Fan
Profile
Posts: 5
Reg: Oct 08, 2011
Cairo
6,450
06/03/12 09:58 PM (13 years ago)

PHP error - need help

I have just installed BT-Server with plugins on 000webhostcom. I followed the steps and it was easy process. However, I got this error on all CP pages: Oops, a PHP error was trapped. File: /usr/local/lib/php/head.php Line: 94 Message: Use of undefined constant code - assumed 'code' I assume that everything is alright. Don't know what's wrong !
 
chandywidi
Aspiring developer
Profile
Posts: 26
Reg: Apr 30, 2012
jakarta
1,910
like
06/04/12 12:38 AM (13 years ago)
i had a same problem with ones of free hosting, i use 1freehosting as my self hosted server and got same problem with php error trapped Oops, a PHP error was trapped. File: /usr/local/lib/php/head.php Line: 94 Message: Use of undefined constant code - assumed 'code' trying to reinstall until three times, but nothing happen. then i decide to migrate on website with paid service and solved may be that is common issue for using free web hosting, which used had shared database regards chan
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/04/12 01:17 AM (13 years ago)
For sure a tough one to figure out. We do know that the /usr/local/lib/php/head.php file is NOT part of the self hosted BT package. It's likely a file that the host is using to do some sort of configuration of PHP or something. The good news is this...the error / message you're seeing IS being displayed in the self hosted package. The config.php file in the root of the project has a method that outputs (echoes) PHP errors/ messages to the screen if it thinks something is wrong with a file or configuration. Thsi means you can easily comment out the echo statement (or adjust it to ignore this error) in the config.php file. See BT-server/config.php, look for the method called handleShutdown() on line 95. You'll see where it's echoing the last error. Just comment out the echo statement or adjust it to ignore this message - all will be well.
 
SENSE
Apple Fan
Profile
Posts: 5
Reg: Oct 08, 2011
Cairo
6,450
like
06/04/12 07:20 PM (13 years ago)
@David, I removed the message. Thank you for your help. @chandywidi, I'm planning to move soon. Thank you for your reply.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.