Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.3 RN Issues
Author Message
Palbin
Site Admin



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

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

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?

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan.

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: 6799
Location: Ha Noi, Viet Nam

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

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
jakec
Site Admin



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

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

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







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

Ok i'll try that.
 
Susann
Moderator



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

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

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
Palbin







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

What?
 
Susann







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

Try Tidy. Are there any errors, warnings ?
I had blank pages before and the validator gave me the information I needed.
 
montego
Site Admin



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

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

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.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Palbin







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

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
 
montego







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

Was your if statement like this:

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

??

If so, I can't see how that would cause this issue. Weird.
 
Palbin







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

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.
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

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

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

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
Palbin







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

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';
 
jestrella
Moderator



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

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

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

_________________
"For those whom have not reach the sky... Every mountain seems high"

Best Regards
Jonathan Estrella [ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Visit poster's website
Palbin







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

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.
 
montego







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

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".
 
Palbin







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

I have proposed this in the mantis issue

if(!isset($op) || empty($op)) {
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.3 RN Issues

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©