PHPWebAdmin missing file

Use this forum if you want to discuss a problem or ask a question related to a hMailServer beta release.
Post Reply
GlenC
Senior user
Senior user
Posts: 680
Joined: 2004-08-17 23:31
Location: Santiago, Chile

PHPWebAdmin missing file

Post by GlenC » 2006-01-11 16:35

I appear to be missing /include/common.js from my PHPWebAdmin directory. Not sure when it went missing.

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2006-01-11 21:23

Thanks Glen. I don't think that file is used any more. I've removed the inclusion from index.php and will run a few tests on it.

GlenC
Senior user
Senior user
Posts: 680
Joined: 2004-08-17 23:31
Location: Santiago, Chile

Post by GlenC » 2006-01-11 21:29

Darn... that means I probably have some other reason why it quit working :?

Back to Tshooting...

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2006-01-11 21:30

Hmm. Did it stop working completely? Or what stopped working?

GlenC
Senior user
Senior user
Posts: 680
Joined: 2004-08-17 23:31
Location: Santiago, Chile

Post by GlenC » 2006-01-11 21:44

I don't use it often, so I'm not sure when it stopped working. But this is what I get when I load the page:
  • PHPWebAdmin for hMailServer Version;?>
Followed by a box with only this in the top left corner:
  • "; ?>
I think I have upgraded to PHP 5.1.1 since I last used it so that may be the problem. I'm not getting any logged php or apache errors (since I removed the reference to common.js in index.php)

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2006-01-11 21:51

It sounds to me like PHP is the problem. ?> is a PHP-end-tag, so that shouldn't be visible when you visit the page using a normal web browser.
If you right-click on the web page, and chose view source, do you see the actual PHP source then?

GlenC
Senior user
Senior user
Posts: 680
Joined: 2004-08-17 23:31
Location: Santiago, Chile

Post by GlenC » 2006-01-11 21:57

Yes, it appears to be the same as index.php. Kinda strange, all my other php stuff seems ok.

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2006-01-11 22:03

That's really weird. Why would PHP fail to parse this single file. I'm using PHP 4.1.1 myself with nemas problemas... :-\

Perhaps you could turn of error_reporting in php.ini, just to see if PHP actually gives an error message.

GlenC
Senior user
Senior user
Posts: 680
Joined: 2004-08-17 23:31
Location: Santiago, Chile

Post by GlenC » 2006-01-11 22:23

I turned on error_reporting = E_All & E_STRICT and it generates nothing. I might try a PHP downgrade and see what happens later on.

GlenC
Senior user
Senior user
Posts: 680
Joined: 2004-08-17 23:31
Location: Santiago, Chile

Post by GlenC » 2006-01-11 23:44

Sorted... it was this:

Code: Select all

short_open_tag = On
You may or may not want to make changes to the code... here is the note they had for that option:

Code: Select all

; Allow the <? tag.  Otherwise, only <?php and <script> tags are recognized.
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable code,
; be sure not to use short tags.

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2006-01-12 00:30

Thanks for the info. So short_open_tag was set to off in your clean installation of PHP?

GlenC
Senior user
Senior user
Posts: 680
Joined: 2004-08-17 23:31
Location: Santiago, Chile

Post by GlenC » 2006-01-12 00:42

Yes, it was off. I must have missed it when I was transposing my php.ini files from old to new. I didn't have that problem before so I either missed it or it wasn't an option in my other version.

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2006-01-12 00:50

Thanks. I'll wait until 4.3 to fix this. Doesn't feel like a big hurry..

Pittoors
New user
New user
Posts: 2
Joined: 2006-01-14 04:18
Location: Netherlands

Post by Pittoors » 2006-01-14 04:25

I think you may want to add a global to the function "LoginError". in the file "background_login.php" (but I also think that beer is essential for the human species to survive,.. so I may be wrong). It's on line 30 or so,.. the function,.. not the beer.

Code: Select all

function LoginError()
{
	global $hmail_config;
	header("refresh: 0; url=".$hmail_config['rooturl']."index.php?page=login&error=1");
	exit();	   
}

Post Reply