PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Wed Dec 31, 2008 3:37 pm Reply with quote Back to top

Now this is probably something I did lol, but just wanted to see if anyone else ever had this problem.

When I go to admin.php I get a completely blank page. No source code what so ever.

If I go to admin.php?op=adminMain it works fine.

Any ideas?


Last edited by Palbin on Thu Jan 01, 2009 5:27 pm; edited 1 time in total
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Wed Dec 31, 2008 4:21 pm Reply with quote Back to top

Actually yes but it might not be applicable in this instance. In my case I had uploaded an old (pre nuke 7.5) module - you know the ones where the admin side has admin/xx files instead of modules/ModuleName/admin/xx

Turned out as I'm using Ubuntu, I uploaded the whole 'admin' directory for the module and it had some bizzare directory permissions which then got transferred when the directory was uploaded.
It also did the same thing to my admin 'images' directory and I couldn't see any icons when I did get to the admin screen.
View user's profile Send private message Send e-mail Visit poster's website
jakec
Site Admin


Joined: Feb 06, 2006
Posts: 3038
Location: United Kingdom

PostPosted: Thu Jan 01, 2009 3:35 pm Reply with quote Back to top

I think I had something similar before, but once I cleared my browsers cache it was OK.
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Thu Jan 01, 2009 5:31 pm Reply with quote Back to top

Ok i'll try that.
View user's profile Send private message
Susann
Moderator


Joined: Dec 19, 2004
Posts: 3143
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Thu Jan 01, 2009 5:59 pm Reply with quote Back to top

If you are able to do a validation check you will find out why the page is blank and why there isn´t a source code I believe.
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Thu Jan 01, 2009 6:08 pm Reply with quote Back to top

What?
View user's profile Send private message
Susann
Moderator


Joined: Dec 19, 2004
Posts: 3143
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Thu Jan 01, 2009 6:20 pm Reply with quote Back to top

Try Tidy. Are there any errors, warnings ?
I had blank pages before and the validator gave me the information I needed.
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Tue Jan 06, 2009 5:39 am Reply with quote Back to top

This can also be a messed up case statement, i.e., a missing one in the various system and/or module case files, but it is odd that it is when just going to admin.php with no query string. I am really surprised that with $display_errors on and dblogging on, that nothing is showing up.
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Tue Jan 06, 2009 6:16 am Reply with quote Back to top

The problem was related to a notice about an undefined variable $op. I had added an if statement and a $op = ''; and that is what was causing this. Guardian added a mantis issue about it.

I can't reproduce the undefined $op though Sad
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Tue Jan 06, 2009 7:13 am Reply with quote Back to top

Was your if statement like this:

if (!isset($op)) $op = '';

??

If so, I can't see how that would cause this issue. Weird.
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Tue Jan 06, 2009 1:22 pm Reply with quote Back to top

That is exactly what Guardian and I had. I don't know if that caused an isset($op)to get mad Smile or what. It was really werid.

Look at issue 1317 if interested.
View user's profile Send private message
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Wed Jan 07, 2009 1:46 am Reply with quote Back to top

Pretty sure its this code in admin.php
Code:

if(!isset($op)) {
   $op = 'adminMain';

That sets the default op for the admin

I haven't tested any code, but I figure if you set
$op = 'adminMain';
it should work
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Wed Jan 07, 2009 1:40 pm Reply with quote Back to top

Well that would be the answer to why my admin.php would be blank after adding if (!isset($op)) $op = ''; to mainfileend.php.

if(!isset($op)) {
$op = 'adminMain';

That needs to be

if(empty($op)) {
$op = 'adminMain';

or maybe

if(!isset($op) || empty($op)) {
$op = 'adminMain';
View user's profile Send private message
jestrella
Moderator


Joined: Dec 01, 2005
Posts: 535
Location: Santiago, Dominican Republic

PostPosted: Wed Jan 07, 2009 10:41 pm Reply with quote Back to top

or maybe...
Code:
$op = isset($op) ? $op : 'adminMain';
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Wed Jan 07, 2009 11:29 pm Reply with quote Back to top

jestrella wrote:
or maybe...
Code:
$op = isset($op) ? $op : 'adminMain';


You would have the same problem as now. When $op is initialized $op =''; the "catch all" would not catch all because it is set even though it is set to ''. So you need to use empty() as well.
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Fri Jan 09, 2009 8:55 pm Reply with quote Back to top

I like your

if(!isset($op) || empty($op)) {
$op = 'adminMain';

The best as it ensures no warning if $op isn't set. But, if you follow through the analysis and are certain that it will be set before mainfileend.php (doubtful in all cases), then, of course, you can go strictly with your "empty".
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Fri Jan 09, 2009 9:30 pm Reply with quote Back to top

I have proposed this in the mantis issue

if(!isset($op) || empty($op)) {
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum