IIS6.0 & latest PHP ( 5.2.6 ) gone wild

Installing and updating Jinzora. Importing media.

IIS6.0 & latest PHP ( 5.2.6 ) gone wild

Postby cybernga » August 20 2008 - 08:53

Hello,

I found out about this ( seemingly :P ) very nice project and decided to have a go at it... didn't expect these results though.

First off, the server setup:
  • Win2003 with IIS6.0
  • PHP 5.2.6 loaded as FastCGI
  • MySQL 5.0.67-community
  • phpMyAdmin 2.11.8.1

PHP, MySQL and phpMyAdmin were all freshly installed for this. I don't think that it matters much, but the pages where viewed using Opera 9.26.

All steps of the web based installer were completed without a problem ( well, I did kinda mixup some options regarding the media import, leading to Jinzora thinking my artists are categories, but that's not the issue at hand :oops: ), and I managed to login to Jinzora just fine with the credentials given during the setup.

However, that's when all the weirdness begun - the interface exploded with all kinds of warnings about DOCUMENT_ROOT not being a valid index, and JZ_SECURE_ACCESS / SMARTY_* constants being redefined

Image

I know that IIS does not provide $_SERVER['DOCUMENT_ROOT'] as Apache does, is it required for Jinzora? I tried adding a small code snippet to create it in system.php, and it seems to keep at least those warnings at bay, but I don't thinks that's a nice approach :P

Can anyone imagine what I'm missing here?

Thanks in advance for all suggestions and thoughts :)
CyberNGA

p.s. I'll be looking further into this when I get home, since it's quite tiring to try solving this over a remote desktop connection.
p.s.1 please refrain from "just install apache"-type comments :)
cybernga
 
Posts: 3
Joined: August 20 2008 - 08:16

Re: IIS6.0 & latest PHP ( 5.2.6 ) gone wild

Postby cybernga » August 20 2008 - 10:20

Found a temporary solution - just changed php.ini so that

Code: Select all
error_reporting = E_NONE


but obviously don't know if that's the "recommended" solution... do note that the ugly warnings are gone and that most functions seem to work flawlessly - I've just started playing around though :)
cybernga
 
Posts: 3
Joined: August 20 2008 - 08:16

Re: IIS6.0 & latest PHP ( 5.2.6 ) gone wild

Postby maarten » August 20 2008 - 11:09

Hi cybernga,

I'm afraid this is the recommended solution. The developers usually develop for Apache and there's probably no code that checks what server's being used.

I hope you like Jinzora!
maarten
 
Posts: 575
Joined: December 08 2005 - 07:13

Re: IIS6.0 & latest PHP ( 5.2.6 ) gone wild

Postby cybernga » August 21 2008 - 02:05

oh :)

in that case, would you be interested in some code snippets that fix the problems ? :P I've ironed out the DOCUMENT_ROOT issue in a non-invasive way, should make life with IIS easier:

Code: Select all
// Make sure we're not overwriting something
if ( !isset($_SERVER['DOCUMENT_ROOT']) ) {
     $localpath=getenv("SCRIPT_NAME");
     $absolutepath=realpath($localPath);

     $_SERVER['DOCUMENT_ROOT'] = substr($absolutepath, 0,
            strpos($absolutepath, $localpath));
}


adding that on top of system.php (right after the comment block) has stopped all of my warnings about it, don't know if it's the best place for it to be though :)

To fix other warnings:
I've only used Slick, so in styles/slick/default.php replace

Code: Select all
define('JZ_SECURE_ACCESS','true');


with
Code: Select all
defined('JZ_SECURE_ACCESS') or define('JZ_SECURE_ACCESS','true');



For the warning about $who_is_where_height being undefined in file /frontend/ajax.php, it's used in the NowStreaming block function for some reason, but not included in the globals statement, so that goes away by adding it to line 317. So from

Code: Select all
global $jzUSER, $img_tiny_play, $im_tiny_play_dis, $css, $img_tiny_info, $skin, $root_dir, $include_path,$jzSERVICES;


changing it to

Code: Select all
global $jzUSER, $img_tiny_play, $im_tiny_play_dis, $css, $img_tiny_info, $skin, $root_dir, $include_path,$jzSERVICES, $who_is_where_height;


solves that warning.


Finally, I get a $return undefined warning in the same file, at line 415:

Code: Select all
$return .= $style. $retVal;


which seems to be because you're appending to a non-defined variable. Since it seems that it never appends to anything, but only defined the variable, it can be safely set to

Code: Select all
$return = $style. $retVal;


(I think :P )

I don't know if you will consider adding these minor changes, but there you go :)
cybernga
 
Posts: 3
Joined: August 20 2008 - 08:16

Re: IIS6.0 & latest PHP ( 5.2.6 ) gone wild

Postby maarten » August 21 2008 - 02:26

Thanks for posting!

I'll run it by Ben since I'm not a developer.

Cheers,

Maarten
maarten
 
Posts: 575
Joined: December 08 2005 - 07:13

Re: IIS6.0 & latest PHP ( 5.2.6 ) gone wild

Postby maarten » September 01 2008 - 04:14

It's me again!

I've changed everything you mentioned in Jinzora 3 SVN and copied the line

Code: Select all
defined('JZ_SECURE_ACCESS') or define('JZ_SECURE_ACCESS','true');

to all included themes.

It would be great if you could test my changes and report the results! If you'd like to test:

Please download a SVN snapshot, set PHP back to error reporting and see if the errors are gone.

Thanks!
maarten
 
Posts: 575
Joined: December 08 2005 - 07:13

Re: IIS6.0 & latest PHP ( 5.2.6 ) gone wild

Postby allnight » September 11 2008 - 03:54

I just applied those changes to my Jinzora 2.7.5 install, and indeed they did stop the warnings.

I agree that the DOCUMENT_ROOT is going to be apache vs iis.

And, I'm on a LAMP stack (linux, apache, mysql, php).
allnight
 
Posts: 13
Joined: September 21 2005 - 21:06

Re: IIS6.0 & latest PHP ( 5.2.6 ) - now also with latest wamp

Postby oceanmasterza » December 23 2008 - 20:13

If I were using IIS I would understand.. but I am using WAMP as mentioned here:
viewtopic.php?f=1&t=6464&start=0&st=0&sk=t&sd=a

And still getting these errors. Any ideas and has anyone else had these erros?

Thanks
oceanmasterza
 
Posts: 7
Joined: December 23 2008 - 18:39

Re: IIS6.0 & latest PHP ( 5.2.6 ) gone wild

Postby oceanmasterza » January 09 2009 - 00:36

Just installed wampserver 2.0f (released 16/12/08) and still having the same problems.

WampServer 2.0f [16/12/08]
Includes :
- Apache 2.2.11
- MySQL 5.1.30
- PHP 5.2.8


Any help would be appreciated.. really cant run it on linux.. Any other ideas?
oceanmasterza
 
Posts: 7
Joined: December 23 2008 - 18:39

Re: IIS6.0 & latest PHP ( 5.2.6 ) gone wild

Postby breese » January 09 2009 - 01:58

breese
 
Posts: 125
Joined: October 30 2008 - 15:55

Re: IIS6.0 & latest PHP ( 5.2.6 ) gone wild

Postby breese » January 10 2009 - 20:38

When doing a rescan of my media, I get the following..

Line: 442 (and others)
Char: 4
Error: 'p' is undefined
Code: 0
URL: http://xxx.xxx.xxx/popup.php?action=pop ... =&ext.html

Ideas?
fyi: I used xxx for my internet ID....
breese
 
Posts: 125
Joined: October 30 2008 - 15:55

Re: IIS6.0 & latest PHP ( 5.2.6 ) gone wild

Postby eveniax » May 14 2009 - 02:19

What CSS or HTML in a website script reads line breaks? I want to know the CSS or HTML name that reads line breaks. Like when I'm clickng 'enter' on keyboard to start a new paragraph the site would see it as that, instead of grouping all the text together. Thanks.
________________
yahoo keyword tool ~ overture ~ traffic estimator ~ adwords traffic estimator
eveniax
 
Posts: 2
Joined: May 13 2009 - 00:28

Re: IIS6.0 & latest PHP ( 5.2.6 ) gone wild

Postby AltPower » September 09 2009 - 07:25

When doing a rescan of my media, I get the following..

Line: 442 (and others)
Char: 4
Error: 'p' is undefined
Code: 0
URL: http://xxx.xxx.xxx/popup.php?action=pop ... =&ext.html
I've the same problem. If anybody knows, how to fix that, please post info here.
AltPower
 
Posts: 1
Joined: September 09 2009 - 07:23

Re: IIS6.0 & latest PHP ( 5.2.6 ) gone wild

Postby breese » September 09 2009 - 07:48

Well I'll be..... I have the same setup and have been TRYING to get someone to look into this.
So far to date, almost no one beleives there is an issue with the code.

From the last PHP updates, I am starting to think the Jinzora code is out-dated and making calls the new PHP does not like...

Let me guess...
Rescan takes more than 4 or 5 minutes because of the size of your collection....

On a Fresh Install and scan, there will be an error about an undefided 'f' or something like that.

All I can tell you is so long as your scans are Able to comlete, your doing well.

Last item.... Some will tell you that its tied to ID3V2 tags...
I have converted all my media (over 60,000) to ID3V1... Nothing Changed.
breese
 
Posts: 125
Joined: October 30 2008 - 15:55


Return to Installation

Who is online

Users browsing this forum: Google [Bot] and 1 guest