TinyPortal

Development => Feedback => Bugs/Errors => Topic started by: Names all Gone on September 19, 2006, 09:57:49 PM

Title: Front Page Uninitialized string
Post by: Names all Gone on September 19, 2006, 09:57:49 PM
SMF 1.1 RC3 TinyPortal v0.9.5
default installs - no mods - default templates
installed with package manager
...................................

Errors In front page if I use either of these settings
Only forum
Both forum and articles - sorted on date

8: Uninitialized string offset: 0
File: /home/virtual/site2/fst/var/www/html/test1/Themes/default/TPortal.template.php (eval?)

same error repeats for lines
Line: 300
Line: 242
Line: 196
Line: 196
Line: 196
Line: 189
Line: 179
Line: 177
Line: 171
Line: 169
Line: 10


tried

complete reinstall both manual & package manager
overwriting files
deleting all but core template
blocks on/off no difference

fixes applied (same error with or without these)

http://www.tinyportal.net/smf/index.php?topic=8261.msg67752#msg67752

and eek's fix
http://www.tinyportal.net/smf/index.php?topic=8411.msg68942#msg68942

Any suggestions?
Title: Re: Front Page Uninitialized string
Post by: Xarcell on September 20, 2006, 05:34:22 AM
I was unable to reproduce the error so I dunno...
Title: Re: Front Page Uninitialized string
Post by: Names all Gone on September 20, 2006, 06:29:58 AM
Thanks for trying to replicate :)

Unfortunately I'm no good with code so have no idea how to figure this out myself.

I've spent hours searching through the forums & find nothing similar - since it only produces errors for either of these two settings I'm totally at a loss.
Title: Re: Front Page Uninitialized string
Post by: Names all Gone on September 20, 2006, 09:38:31 PM
can anyone else duplicate this on a clean install

install SMF 1.1 RC3 - make no changes
install TinyPortal v0.9.5 (TP_095beta.zip)
restart forum
check error logs

I've now tried on 6 different servers/hosts and get the same errors everytime
11 errors produced everytime the home button is clicked
Title: Re: Front Page Uninitialized string
Post by: G6Cad on September 20, 2006, 10:15:21 PM
I have done this install about 30 times now, both test and live sites.
Done about 20+ upgrades from 1.1rc2 TP V.086 to 1.1rc3 and TP V.095, and still havent got that error ( all exept 4 installs on diffrent servers around the globe)

Title: Re: Front Page Uninitialized string
Post by: Names all Gone on September 21, 2006, 03:15:51 AM
Ok its got to be all on my end then

I get similar errors in Sources/ManageServer.php
8: Uninitialized string offset: 1

If I ever find why it's happening I'll post here
Title: Re: Front Page Uninitialized string
Post by: G6Cad on September 21, 2006, 07:52:16 AM
What server setup do you have from your host ? DB version ?
There have been many strange errors the past month regarding newer versions of sql with more.
Can you check and see what set up your server have ?
Title: Re: Front Page Uninitialized string
Post by: Names all Gone on September 21, 2006, 08:33:25 AM
Hey thanks for checking back - I don't think I qualify for the newer version errors:
Linux
Apache
MySql:    3.23.58
Php:    4.3.3 
Safe Mode:    On
Register Globals:    Off

I've switched to "Go directly to forum index" where I dont get any errors - at least this way I can get things setup & working & learn the options - shame though, I would have really liked the forum & articles on the homepage.

Edit
weird, system is showing safe mode on & php info is showing safe mode off - I'm not sure what it is now

Other servers are
Linux
Apache
MySql:    4.0.20a
Php:    4.3.11
Safe Mode:    Off
Register Globals:    Off
Title: Re: Front Page Uninitialized string
Post by: G6Cad on September 21, 2006, 08:55:02 AM
The error might jus be that you actually have Safemode set to on there.

Can you contact your host and aske them about this? And if you cant change the setings your self, ask them to help you change to safemode = off and see if you can have a working forum and portal ?
Title: Re: Front Page Uninitialized string
Post by: Names all Gone on September 21, 2006, 09:05:09 AM
Just going to go try
do I have to restart apache after changing?
Title: Re: Front Page Uninitialized string
Post by: G6Cad on September 21, 2006, 09:11:33 AM
Always restart the server program after any change ;)
Title: Re: Front Page Uninitialized string
Post by: Names all Gone on September 21, 2006, 09:14:29 AM
Apache restarting - well I hope it is ......

waiting, waiting

decided to just go for it - one small change shouldn't screw things up - should it  :D

Can't afford $40 a pop for them to do fixes for me

Whew - back up & live sites are ok - lets see if that worked brb
Title: Re: Front Page Uninitialized string
Post by: Names all Gone on September 21, 2006, 09:31:36 AM
nope didn't work - still the same errors

looks like I can't have articles & forum on home page  :(

I'll try a new install just to make sure - but either way I can still have the benefits of tp on other pages just not the frontpage. Will have to change the menus so I don't have home & forum leading to the same place though.

Thanks for the help, maybe the next release will fix things for me.

hmm just had an idea, I never tried a different version, maybe I should do that and see if I have the same problems.

Edit
is there anywhere I can download an earlier version to try - couldn't see anything in the downloads section.
Title: Re: Front Page Uninitialized string
Post by: Names all Gone on September 21, 2006, 09:06:03 PM
Ok I contacted support & was told that the script was trying to do assignments inside isset() giving false positives/negatives causing the errors, & this does not work the same with all versions of php & to use null or define instead. That I come not use the script as it stands because I would flood the system with errors.
Also told me to check the comparison tables on www.php.net (lot of good that does me LOL)

Since that's all double dutch to me, it looks like I need to upgrade.
which version of php 4 is this best with.
Title: Re: Front Page Uninitialized string
Post by: G6Cad on September 21, 2006, 10:07:03 PM
What i understand any php will work just as good when the settings you have are correct.
Why would it work for some, and for some not at all with the exact same versions of both apache and php/sql ?
I think a better configuration with the php and sql will solve the issues.

I think we have to call in eather eeek or Thurnok here :)
Title: Re: Front Page Uninitialized string
Post by: Names all Gone on September 21, 2006, 10:21:22 PM
I don't understand any of it, just looking to get things sorted even if I have to buy a new server as they suggested.
Title: Re: Front Page Uninitialized string
Post by: G6Cad on September 21, 2006, 10:24:04 PM
I have made o post in the team borad for eeek and Thurnoc.
They know this like the back of their hands, i have pointed them to this thread, so when they are here and read it, im sure they will give you a better explanation then i can :)
Title: Re: Front Page Uninitialized string
Post by: Names all Gone on September 21, 2006, 10:32:24 PM
Thanks

but do tell them it's not urgent, I do not have this on a production site & I don't want to take time away from essentials. It's just frustrating when others seem to be able to use it successfully.
Title: Re: Front Page Uninitialized string
Post by: eeek on September 21, 2006, 11:26:36 PM
hmmmm ???

Having just had a fiddle with my site seems I cant get forum posts on the front page?? I only have blocks and never tried this after I uploaded from my test server. The only forum stuff that will show is "go directly to forum". I only have one error or should I say 1000s of the same error but all caused by google bots and spiders  ;D

This crappy free ISP server runs
Mysql 3.23.58
PHP 4.3.10
Apache/2.0.51 (Fedora)

And its in safe mode...

My test server is in the middle of a rebuild so cant do much checking till I get it up and running again :)
Title: Re: Front Page Uninitialized string
Post by: Names all Gone on September 22, 2006, 12:09:34 AM
hehe sounds the same as my crappy server LOL

Can I be mean & say I'm glad you had problems - felt like I was alone alone.

Anyway this is what I was told

He said the problem was the way isset had been used assigning by reference & that each version of php treated that differently until the reference fix was brought out & thats why it works on some versions of php & not others. Something about Zend not using the values & things being undefined as a result. He was muttering about the nested calls being the main problem.

Now remember I just jotted notes as he talked and may have confused somethings, but he said to use the comparison tables on www.php.net and to search the documents for an explanation of the reference fix.

Going off to look at new server specs & pricing - this one is over 4 years old & I know prices have come down.
Title: Re: Front Page Uninitialized string
Post by: Xarcell on September 23, 2006, 12:51:52 AM
Doesn't it have something to do with your mysql version?
Title: Re: Front Page Uninitialized string
Post by: Names all Gone on September 23, 2006, 09:28:22 AM
The support guy said it was the php - but who knows
two different php & mysqyl setups same results.

I've given up on it for now & will just use blocks to get what I want instead.

I'm going to get a new box anyway - maybe TP will work on that one for me :)
Just trying to decide on Ensim or Plesk.
Title: Re: Front Page Uninitialized string
Post by: Names all Gone on October 02, 2006, 07:00:50 AM
Just a quick update

disclaimer - I have no clue what I'm doing

No more errors & I can now use all the different TP layouts

Themes/default/TPortal.template.php

looked for isset & changed it to @isset

line 169
line 171
line 177
line 179
line 189
line 196
line 242
line 300

on any theme that uses its own TPortal.template.php the line numbers are different

& problems with save errors were fixed in

Sources/ManageServer.php on line 460
change !isset to !@isset

I have not had any of the undefined index errors reappear either since doing those changes.

If I screwed it up - PLEASE kick me and let me know


Title: Re: Front Page Uninitialized string
Post by: IchBin on October 02, 2006, 05:03:27 PM
Well, all you've done is suppressed the errors. You haven't gotten rid of them. :) The "@" sign suppresses the errors when you do that.
Title: Re: Front Page Uninitialized string
Post by: Thurnok on October 03, 2006, 07:44:59 AM
isset() hasn't changed from version 3, 4, or 5 of php.  Not sure what smoke your Host provider was blowing up yer... , ahem, anyway...

Undefined index errors relate to array elements (myarray[1]  or myarray['test'] for example) where that particular index does not exist in the array.  Using the @ symbol supresses php errors.. which in your case should help your whiny host provider by not filling up the php error.log file.  Additionally, the return value will still be false, which in this case is what you are looking for, so your changes should not affect the program logic.