g3 pages not rendering properly
|
Gork
Joined: 2008-09-09
Posts: 31 |
Posted: Tue, 2009-11-10 18:21
|
|||
|
G3-b3 First, I understand IIS isn't supported at this point and I may have to give up on Gallery altogether. It'll be a tough goodbye, seeing as I stopped creating my photos web pages manually long ago in favor of using Gallery. But I digress. Please see the attachment. Not only does the page not render properly, but clicking on any of the links ends with a 404 error. IE also reports "done but with errors" upon page load. These are similar to problems I had with phpBB before they updated their code after fast-cgi was implemented on IIS. I should note that I have full permissions granted to all g3 sub/directories at this time. Does anyone else have PHP 5.3 working properly in IIS with a Gallery3-b3 installation? And if so, any ideas what my problem could be? Note: The links seem odd, /gallery3/index.php/admin/advanced_settings. Is it normal to have a "/" character after a filename like index.php? I've noticed that while /gallery3/index.php works properly, /gallery3/index.php/ (note the trailing slash) does not. Maybe I should start another thread on this, but I noticed during installation that Gallery3 requires short_open_tag to be enabled in PHP. PHP has stated that this option is only available for backward compatibility and programmers should not be currently writing code using short tags. With G3 being current code, I find it odd short tags are being utilized. Any thoughts on this?
|
||||

Posts: 16503
Reference?
Based on your screenshot it looks like your server is probably compressing the output of files like CSS and JS and the combined JS and CSS files are not being output properly. A link to your site would really help to see this problem better though.
IIS 5.1? Isn't that really old, like Windows 2000 old? Oh, I see, XP. You know you can run Apache on that, search google for XAMPP
There are people running G3 on IIS, but newer versions as far as I can tell.
As for the path stuff you're asking about, that's fine and normal. Basically you're passing parameters with nicer looking URLs. Search the G3 forums, there is a discussion to two about running G3 on IIS and some Windows guys who've posted some good info there.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 57
I'm curious, if you know IIS isn't supported, and that G3 is experimental code, why would that stop you from running G1 or G2? If you like G1 or G2, keep using them. They're still being pushed forward with new updates and I have lots of sites that are using both of them, depending on the need. Giving up on gallery altogether in order to hand code your galleries again based on an evaluation Pre-Release of G3, sounds a little strange.
It's normal to have a "/" after a filename like index.php . . . we use it all the time for the index.php/updater or any other common switch operator you might want to have.
I've never had a problem with short tags being utilized and I don't think it'd affect the service the way you're describing. Most likely it's an issue with the antiquated 5.1x IIS and a very soon to be End of Life XP. . .
Have you tried to install it in a straight Linux or Vista environment? I'd install a copy of Apache2, that'll probably fix it right up.
Posts: 31
@nivekiam
The reference is from the php.ini file itself:
; This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It's been
; recommended for several years that you not use the short tag "short cut" and
; instead to use the full <?php and ?> tag combination. With the wide spread use
; of XML and use of these tags by other languages, the server can become easily
; confused and end up parsing the wrong code in the wrong context. But because
; this short cut has been a feature for such a long time, it's currently still
; supported for backwards compatibility, but we recommend you don't use them.
Yeah, 5.1 is the XP version of IIS. I'm aware I could run Apache and I've considered doing so and moving everything over to that platform. It's just that I like what I have and so far Gallery is the only thing causing problems for me.
I've done some searching on the G3 forums and have solved a couple of problems I've run across prior to my own post. I haven't run across anything yet that has helped me with this particular problem, though. I'll continue to search through the posts, thank you.
As opposed to posting my URL, I'll share my current non static IP address so you can look at what the site's doing if you'd like: http://71.195.202.229/gallery3. This way I can post it openly here and change it if I get bombarded for whatever reason. I'd post the admin un/pw for testing purposes, but it appears visitors can't get to the login page to be able to use them anyway.
@elfinstrider
I am running G2, actually. I've installed G3(b) because I (somewhat) recently installed PHP 5.3 on my IIS web server and was forced to switch over to fast CGI. G2 does not work properly with this setup, though Gallery staff has indicated G3 is being coded to work properly with fcgi.
I didn't mean to sound idiotic; it looks as if I came across that way to some degree, however - sorry 'bout that. My plans are not to give up on Gallery altogether in order to hand code my photo pages again based on a pre-release of G3. I only mentioned my feelings with regard to that matter because I read that they're not planning on coding G3 to work with IIS, so it may work with IIS or it may not. If it doesn't, I'll have to come up with something else - more than likely some other way of posting my photos. I just don't know that it'd be worth it to me to switch to Apache, though I'd sorely miss Gallery. My "photo life" improved greatly when I stopped writing static pages for my photos.
I haven't been able to upload photos to my G2 installation since upgrading to PHP 5.3 (requiring fcgi) though.
As far as the usage of short tags goes, I have no experience with which to base an opinion, only what I read. I enabled short tags and will monitor to see if I do end up noticing any oddities though.
I have not tried to install G3 in Linux/Vista yet, no. I don't own a copy of Vista and am using old hardware to run apps that family/friends use. I could try setting something up in my beta copy of Win7, installed in VMware, until it goes belly up I suppose. I'm curious to see if that would make a difference, but probably won't have the time before Win7 beta is rendered unusable. And my infamiliarity with Linux would entail a lot of time to get such a machine set up. I know I could figure it out, and for the moment it'd only be a virtual machine, but it would definitely take me a lot of time. I've only fiddled around with Linux off and on over the years.
Thanks both for explaining the usage of "/". I've not paid strict attention, but usually see characters such as ? and # used. Why the "/" at the end of index.php is causing trouble is beyond me, even if no variables are passed.
Posts: 16503
Ah, that statement for short open tags is different in older versions of php.ini (development on G3 started before PHP 5.3 was released). Either way, search the forums it's been discussed and Bharat has posted several times his reasoning behind it. Basically it makes the code easier to read, lighter and we haven't found any major place where taking advantage of this is has caused any major problems.
For your current issue (if you're using a current version of Firefox), take a look at your source code and then take a look at the the combined JS and CSS. I get a 404 when trying to do that. I don't know if it has to do with you trying to run this on XP or ISS 5.1 or what, but something isn't right.
Try taking a look at your gallery3/var/logs directory and see if there are any error messages relevant to this.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 31
I can't pretend to be able to follow code like that very well, but I did look down through it and nothing jumped out at me. I've included a text file with the code from the main page in case you want to take a quick look at it.
I can't help but wonder if this has something to do with "/" being used instead of "?" (better explained in my previous post) as in G2. But if others have G3 running properly on IIS using PHP 5.3 (requiring fcgi) then it has to be a setting in IIS, though I can't figure out what it could be. Someone said they had this working, but I don't remember if they said they were using PHP 5.3/fcgi though.
No logs in /var/logs...
EDIT
It was rWatcher -- he (he?) posted he was able to get G3 working on his IIS server:
"
PHP version = 5.2.9-2 cgi-fcgi
Webserver = Microsoft-IIS/6.0
Database = mysqli 5.0.24a-community-nt,
Operating system = Windows NT PREMFS15 5.2 build 3790
"
(http://gallery.menalto.com/node/88927)
Not using 5.3, but he is using fcgi so that shouldn't matter. And I'm not far behind him with regard to my IIS version.
Posts: 16503
Ah, but rWatcher isn't using IIS 5.1 and he's using a real server (not XP)
These, dynamically generated, combined CSS and JS files do not exist or are not created on your "server"
/gallery3/index.php/combined/javascript/c596396b9e0bf7c100f9bcf0aa1a7b99.js
/gallery3/index.php/combined/css/824db748dcabbd8bcb45a2cc1404bdae.css
Unless you're running something specific that requires IIS, just dump it and switch to Apache:
http://www.apachefriends.org/en/xampp-windows.html
Here are other posts for IIS and G3. I'm not going to spin my wheels much more here
http://www.google.com/search?domains=gallery.menalto.com&sitesearch=gallery.menalto.com&q=iis+gallery3&op=Search+with+Google
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 31
Well, I appreciate you spinning your wheels as much as you did. I may at least try to run Apache through a different port to see if I can get it up and running with G3. In the very least I could just run G3 on Apache by itself maybe.
From what I understood IIS on XP is the same as on a server platform, only hobbled to not allow more than a handful of connections at a time. However, I could be entirely wrong.
As far as even trying to get my setup working I may be in over my head and it sounds more and more like it's not worth the trouble to try.
Thanks for the ideas and suggestions - not sure where I'll go from here.
Posts: 16503
It's actually XP itself that can't handle more than a handful of concurrent connections (10 specifically). That's why it does not make for a good "server" in an office of more than 10 workstations, which I still see people trying to do...
XAMPP is a really easy point-n-click install. I've gotten an older version of G3 running on that in less than 10 minutes (total time of install for XAMPP and G3)
But as you said, you may need to run it on a different port if you want to continue to have IIS running.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 22890
@short tags:
http://gallery.menalto.com/gallery_3.0_alpha_3_released#comment-304132
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 31
Thanks... If it's not causing any problems I guess the only concern (to the developers) would be PHP removing the backward compatibility (as they call it) altogether.
fwiw, I tried setting PHP up (never got to the G3 part) on the IIS which comes with Win7 beta and couldn't get it working. I was curious how well G3 would work on that platform. I may work on it a little more as I have time.
Posts: 16503
The only platform G3 is supported on is:
Linux
Apache 2.2 or newer
MySQL 5.x or newer
PHP 5.2.3 or newer
If it works anywhere else it works, but it's not supported and we haven't gone out of our way to test or know the ins and outs of anything outside of that configuration.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 31
I'm aware - I've read many heated posts about that but thanks for making sure I understood.
This is actually the reason I posted where I did, in hopes another user might have some ideas, instead of treating it like a problem with the coding or a bug.
Posts: 128
My 2 cents on the short tags:
When you look at the php modules in Gallery3, they are saturated with lines that look like this:
Quite often one right after another. I really beleive that converting that into a single block of php code such as
does not induce a lot of overhead in storage on the server-side, and it may be possible that the interpreter runs faster without bouncing back and forth in and out of php code (just a guess!).
For code such as this:
it could also be done as:
This would also likely be less overhead on the server side, zero impact to the client side, and a bit more legible to the 'non-expert' coders;
Just an opinion, but I am not going to start modifying everything out of principle

Martyn T. Griffin
Posts: 22890
Can you run some tests to give some quantitative data to go along with your assumption?
It is much easier for new users to read and understand the code with shot tags. This speeds up development for new devlopers/themers. Using a template engine, like we did in G2, was a big mistake. Making the code easy to read and understand makes the community contribute more and as a result we get much better themes and modules.
Like bharat said; 'it will be easy to convert everything we have over to PHP long tags with a script.' But nobody has said that they can't get short tags to work in their environment. We will cross that bridge when we have to.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 31
Just wanted to post a quickie that I finally got PHP working on IIS 7.5 (Win7 version) - even though the PHP installer created a handler mapping, IIS didn't actually use that mapping until I went in as if to change it then saved it myself. Odd.
Anyway, I installed G3 on IIS 7.5 and it renders properly so this issue with IIS 5.1 is either due to settings which need to be altered or incompatibility for whatever reason. If any IIS users out there have any ideas I'd love to hear from you - it'd be nice to get G3 working properly on IIS 5.1.
Posts: 31
My latest thought on this is that IIS 7.5 has URL rewrite capability while IIS 7.0 and below does not. (MS has apparently written an update for IIS 7.0 to provide this functionality however.) Any idea if that could be what is causing variables not to pass using a slash? I understand Apache has had URL rewrite capability for quite some time. It appears my IIS 5.1 wants to find a directory when the url ends with a slash, ie: http://www.mysite.com/index.htm/ returns with an error while http://www.mysite.com/index.htm works fine.
Not asking for any coding changes, or any help getting it to work - just trying to see if my thought process might be on track. At this point it's nothing more than a learning experience for me, really. Heck, if anything at least I'm starting to understand why it's a pain to try to support multiple platforms! And this is only ONE example. At this point I'm not even sure if the "slash issue" even has anything to do with the odd rendering issue.