Page cannot be displayed -(served as download index.php) after logging out

Started by rakuli, August 10, 2007, 07:28:26 AM

Previous topic - Next topic

rakuli

Hi everyone,

It's been a while since I last toyed with SMF but I have a problem that defies logic and I am struggling to explain.

I have created a new theme with SMF and everything - literally everything - is working perfectly on my testing server. I have just today uploaded it to my host and after installing everything again is working perfectly.

The problem comes after I install my new theme, it installs successfully and I am able to change the forum theme and default them to be my new one. Everything still works perfectly, then when I log out - nothing, nada, the page won't display in IE and FF tried to dish my index.php as a downloadable file.

I have to use the URL www.openthource.com/index.php?theme=1 to go back to the default theme, then log in and the "Open Thource" custom theme works perfectly again -- until I log out.

I am really struggling to come up with a possible cause for this problem, any ideas.

Thanks for your help.

Rakuli

Herman's Mixen

open up you phpmyadmin goto the smf_members table and explore your user account search for the setting ID_THEME set the value to 1 for the default theme ;)
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

rakuli

Thanks for the reply but I am happily able to do that, what I would really want is to figure out what in my custom theme is causing the problem.

Cheers, still scratching my head here.

rakuli

After an incredible amount of hair pulling and many swear words (of which som eI had to look up on Google) I have identified that the problem seems to come from somewhere around this line in the main index.php

set_error_handler('error_handler'); // Aprox line 123

When I comment the line out, the site works perfectly again for guests. When I uncomment, it stops working again....

The whole time, the site works perfectly on my testing server for both logged in users and guests...

Any ideas? I'm stumped

The Version Info from Web Host
Version Information:
Forum version: SMF 1.1.3 (more detailed)
Current SMF version: SMF 1.1.3
PHP version: 5.2.3
MySQL version: 4.1.22-standard
Server version: Apache/1.3.37 (Unix) PHP/5.2.3 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a
GD version: bundled (2.0.34 compatible)


The Version Info from Testing Server
Version Information:
Forum version: SMF 1.1.3 (more detailed)
Current SMF version: SMF 1.1.3
PHP version: 5.1.2
MySQL version: 5.0.18-nt-log
Server version: Apache/2.2.0 (Win32) PHP/5.1.2
GD version: bundled (2.0.28 compatible)

Thanks.

rakuli

Sorry (Daniel and Grudge), bit of a bump..

I have confirmed that the problem is definitely arising from the error handler but I am really struggling to find out what could be causing it.

The forum works okay without the customer error handling but becuase SMF uses E_ALL for errors there are many warnings and notices that pop up when I haven't caught a bug and don't really want this information available to guests (but also don't won't to disable errors altogether).

ioszilla

QuoteWhen I uncomment, it stops working again....

So what happens when you uncomment the line?

rakuli

Quote from: wordzilla on August 16, 2007, 09:13:10 AM
QuoteWhen I uncomment, it stops working again....

So what happens when you uncomment the line?

Guests cannot see the forum -- and the browser tries to dish up index.php as a download.

Members who are logged in can still use the theme without any problems or change whatsoever, this problem only happens when you log out.

From top post :
Quote from: rakuli on August 10, 2007, 07:28:26 AM
The problem comes after I install my new theme, it installs successfully and I am able to change the forum theme and default them to be my new one. Everything still works perfectly, then when I log out - nothing, nada, the page won't display in IE and FF tried to dish my index.php as a downloadable file.

I have to use the URL www.openthource.com/index.php?theme=1 to go back to the default theme, then log in and the "Open Thource" custom theme works perfectly again -- until I log out.

Advertisement: