Welcome to Geeklog Tuesday, June 18 2013 @ 11:35 PM EDT
|
||||||||
![]() |
Forum Index > Extensions > Cool Hacks |
New Topic
|
Post Reply
|
PHP Fatal error |
|||
| squatty |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member ![]() Status: offline ![]() Registered: 01/21/02 Posts: 269 |
Recently I posted a comment in regards to wrapping custom scripts inside of Geeklog. I soon discovered that the simplest way to wrap anything within Geeklog is to include calls to COM_siteHeader() and COM_siteFooter. This approach has proven to work time and time again. However, I recently came across one script that I can’t for the life of me figure out how to wrap? Upon hitting the page, the following error message occurs:
In a world without walls and fences, who needs Windows and Gates? |
||||||
|
|||||||
| squatty |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member ![]() Status: offline ![]() Registered: 01/21/02 Posts: 269 |
Maybe I should have posted this in the Help section? Anyway, here's an update. I still need help! I admit I'm no PHP guru but, I'm smart enough to try and debug. I downloaded and installed DBG PHP Debugger and Maguma PHP4EE Studio Light in order to look under the covers and all I got was the same "Call to a member function on a non-object" error message. In general what does this error mean? Any assistance would be much appreciated.
In a world without walls and fences, who needs Windows and Gates? |
||||||
|
|||||||
| squatty |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member ![]() Status: offline ![]() Registered: 01/21/02 Posts: 269 |
In thinking the problem was Win32 related I decided to scrip my XP install of Geeklog in place of Linux. I'm still getting the same error:
In a world without walls and fences, who needs Windows and Gates? |
||||||
|
|||||||
| ConXioN |
|
||||||
![]() ![]() ![]() ![]() ![]() Newbie Status: offline ![]() Registered: 03/31/02 Posts: 2 |
"In thinking the problem was Win32 related"
It 'w0rks' like that on my debian too 8) "Warning: Cannot add header information - headers already sent by (output started at /usr/products/apache/htdocs/music/index.php:278) in /usr/products/apache/ htdocs/geeklog/system/lib-sessions.php on line 133 Warning: Cannot add header information - headers already sent by (output started at /usr/products/apache/htdocs/music/index.php:278) in /usr/products/apache/ htdocs/geeklog/system/lib-sessions.php on line 145" Like you already know, the document has head and body. But in PHP you have to be careful with the way you do stuff. The second you start WRITING something visible on the document, the server assumes you're done with the header and sends the header on it's way. Now if you try to write for example cookies (that belong to headers), it generates that error. As the header is already on it's way, you cannot add anything to it anymore.. There are 2 ways to cope with that. If the cookies etc aren't really needed, then comment it out and find the solution later, or then walk backwards the documents until you find the spot you wrote something and then either try to move it further or then move the cookies upper in the process.. "Fatal error: Call to a member function on a non-object in /usr/products/apache/htdocs/geeklog/system/lib-database.php on line 141" Najs. I have embedded phpBB2 in the Geeklog and I get this error every time I try to change the theme on phpBB or try to view groups in it. Not sure where else to turn? Yeah tell me about it 8) The internet seems to be full of ppl with this problem but can someone tell me what this mysterious error means!. Would be a lot easier to debug it if I had a clue about what I'm looking for.. |
||||||
|
|||||||
| ConXioN |
|
||||||
![]() ![]() ![]() ![]() ![]() Newbie Status: offline ![]() Registered: 03/31/02 Posts: 2 |
Ok I got it now few minutes after posting here 8)
I added following to the Function DB_query $_DB = New database('dbhost','dbname','dbuser','dbpass','COM_errorLog'); I got rid of the error but got another one so I wiped the above away and added : include_once('/path/to/geeklog/public_html/lib-common.php'); to the files I got the "Call to a member function on a non object" error. Works fine now 8) |
||||||
|
|||||||
| handelaar |
|
||||||
![]() ![]() ![]() ![]() ![]() Newbie Status: offline ![]() Registered: 12/17/01 Posts: 6 |
For the record (and so the answer appears in the archive), the problem with Win32 was that your slashes were the wrong way around.
You want d:/directory/path, not d:\directory\path as is normal for Win32. It's a PHP thing. |
||||||
|
|||||||
| Content generated in: 0.25 seconds |
|
|
|