Hello -
Anyone seen this one?
Upgrading from 1.2.6 to 1.3. Followed all directions and ended up with this error:
-----
Parse error: syntax error, unexpected ',', expecting '(' in /home/inflight/public_html/zenphoto/zp-core/lib-Imagick.php on line 79
-----
...when going to either
http://www.inflightshutdown.org/zenphoto/ or
http://www.inflightshutdown.org/zenphoto/zp-core/setup.phpLost!
Comments
PHP 5.2
MySQL 5.0.90
GlowHost is my hosting service.
Also sorry, that I have no idea what this could be. MAybe you could post a bigger part of how your file looked around the lines in question?
77 `// Imagick::setResourceLimit() crashes if called statically (prior to 3.0.0RC1)`
78 `$mem_lim = getOption('magick_mem_lim');`
79 `if ($mem_lim > 0) {`
80 `$temp->setResourceLimit(Imagick::RESOURCETYPE_MEMORY, $mem_lim);`
81 `} else {`
82 `$temp->setResourceLimit(Imagick::RESOURCETYPE_MEMORY, $temp->getResourceLimit(Imagick::RESOURCETYPE_MEMORY));`
83 `}`
At least here, there are no blank lines close. (line 76 is blank as is
line 84.)
I really do appreciate the quick replies and assistance, am trying to come up with useful info to help troubleshoot, guess the head-scratching is making me touchy.
So, since this chunk of code looks exactly the same as what you posted, is there something screwy going on server-side with my host?
-----
// Imagick::setResourceLimit() crashes if called statically (prior to 3.0.0RC1)
$mem_lim = getOption('magick_mem_lim');
if ($mem_lim > 0) {
$temp->setResourceLimit(Imagick::RESOURCETYPE_MEMORY, $mem_lim);
} else {
$temp->setResourceLimit(Imagick::RESOURCETYPE_MEMORY, $temp->getResourceLimit(Imagick::RESOURCETYPE_MEMORY));
}
A quick peek around the forums reveals that the new problem might be a fairly routine one and I am going through the usual troubleshooting to sort that one out.
-----
Fatal error: require_once() [function.require]: Failed opening required '' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/inflight/public_html/zenphoto/zp-core/functions.php on line 28
After digging around about the new problem for a little while I found that it was somehow upset about loading Captcha. Deleted those four lines from functions.php just to see if I could get it to think about something else, or at least show me the setup screen.
Got through, and setup concluded that despite my old Zen gallery having been up and working fine since 10/2007, every last core file was somehow suspect and I (or my host) had many options set completely wrong. When I tried to work with any of the info I immediately got an Internal Server Error, and eventually the setup screen wouldn't load either. I'm sure it's my host's fault.
So I'm ripping it all off of my server, am replacing the backup of my 1.2.6 version, and will leave well enough alone. I can't stand any of the web-for-dummies galleries that I've tried to work with (or the over-the-top Gallery) and really like Zen, but don't want to be sifting through code and server settings and permissions and all that either. Lazy user, I guess.
Thanks for the help.
BTW, setup will tell you what version of PHP (and MySQL) you have running.
As for the upload, perhaps it is time to review the upgrade instructions.
1 & 2: backups performed, fine.
3: All files (not folders) in the remote home directory deleted. All. If this is too strict an interpretation of "remove the files" - including the existing .htaccess file - that might be problem #1, and needs clarification. Also, step 3 indicates that I will need the info out of my zp-config file, which doesn't appear to actually be the case going from 1.2.6 to 1.3, as it seems to grab this from the zp-config file that is in the zp-data folder. At any rate, deleted zp-core folder per instructions.
4: Downloaded, unzipped, uploaded new zp-core folder and new home directory files via SecureFX. No errors or special notes from FTP software.
5: The .htaccess file. Where is this meant to come from? If I deleted the files in the remote home directory, the old one is now gone. There is not a new one in the set of local new files from the download. The closest I can find is an htaccess file (no dot) in the new zp-core folder, which I briefly imagined might be a source for the setup routine to place on the server in the remote home directory - but since I am supposed to be checking this before going to setup, this seems unlikely. So, was I intended to leave the old .htaccess in the home directory where it was? For if that is the case, the upgrade instructions might have mentioned this somewhere.
6: Setup. This is where it blows apart for me - resulting in the error already mentioned above.
What I will try tomorrow is once again (third time) removing every shred of new downloaded files from my computer in case one of them went bad in transit, downloading a fresh copy of the 1.3 package, and starting again from there. 1.2.6 is currently running without problems on my server, and I should be able to upgrade as described.
If there is anything I mentioned above that I should do differently, I'd love to know about it.
Thanks!
@7jlong: As you noted the .htaccess file exists as a template within zp-core and should normally be created by thet setup (there should be an option to do so if no one already exists).
Setup caused problems for me every time I went into it by changing permissions on all php files in zp-core and the home directory to 777, which upset my server. Manually went in and changed them all back via FTP to 755, which made everyone happy.
Because of this, asking setup to change permissions for me would result in an internal server error. Same for asking it to write me a new .htaccess file. (I dragged in the template from the zp-core package so that I did not have to deal with the mod_rewrite issue.)
Again, I'm not a programmer, but I even went in to zp-config.php and changed the last bit to 755 and put the file back on the server, no change. Setup still changes files to 777 as soon as I run it.
The rest of the warnings in setup are still a mystery. It is upset about:
- magic quotes and my host's mbstring settings, fine, I'll talk to my host. a quick spin through the forums reveals that this will not disturb the universe, at least in the short term.
- field collations. I haven't even looked this one up yet to see what it is all about.
- every single theme file. I have some others that I auditioned when I first installed still on there, so I guess it's time for some housekeeping anyway. However, I've used the default dark theme since day one, so I'm not sure what setup is so uncomfortable about.
So that's that. It seems that my server settings have not been interfering once I solved the PHP5 problem, and it is likely that the second problem (the Captcha issue) was from an upload problem. However, this permissions thing is a bit irritating. How to solve that? Or just stay away from setup.php forever?
Setup "warns", those are no errors!
- magic quotes and my host's mbstring settings, fine, I'll talk to my host. a quick spin through the forums reveals that this will not disturb the universe, at least in the short term.
The first may cause trouble, the second is as said by the warning optional.
- field collations. I haven't even looked this one up yet to see what it is all about.
This is important if you encounter problems with special chars in titles or descriptions. A mysql table can have an encoding but several fields of that table can also have a different one (for whatever reason..)
If you use only plain English you will probably not have any encoding issues but people with other languages might (as I am with German for example).
- every single theme file. I have some others that I auditioned when I first installed still on there, so I guess it's time for some housekeeping anyway. However, I've used the default dark theme since day one, so I'm not sure what setup is so uncomfortable about.
Well, if you use a theme since "day one" it may not work correctly with the current release. A lot has changed since then.
Setup warns if the file time is out of variance so there "might" be a probem.
I am sure my collegue will respond later as well.
As far as the theme goes ("day one" being October 2007 for me), if I should have upgraded to a newer version of default-dark at some point... again, might that have been noted in the upgrade instructions somewhere? You guys remind people an awful lot to go by your instructions explicitly and not use other scripts/etc, but at no point do I remember a suggestion to update "officially supported" themes - only to replace the home directory files and zp-core. Maybe this was dumb of me, but I had assumed (since they aren't mentioned) that as with cache and album folders, the rest could be left alone. I don't update with every new release, but I've updated a few times.
I mean, it's not like I was trying to carry forward some iffy third-party theme.
So, if I can scrap my old theme folder and replace it with a new one from the 1.3 package without everything going berserk, that's fine. I have been using default-dark with absolutely no modifications. I'll backup my current installation and give it a go. The theme does work as-is, but I wouldn't want setup to be unhappy about it. Or maybe I should stick with "don't fix what ain't broke."
Themes. You are right that the upgrade instruction do not tell to replace the standard themes. We should add that. But isn't it quite obvious that from 2007 to 2010 something might have changed, especially for standard themes, especially improvements or new feature support?
Not even all former standard are included anymore (example theme was thrown out) and Zenpage theme is actually newer as well (since somewhere 2008).
Especially custom/customized themes may nor work fully (that is why many on our theme section are marked as incompatible). If you use an old standard theme without any change just try and if it still works good for you that is great. We of course don't test older standard themes with newer releases.
I guess what I'm trying to express is that I do exactly what you recommend, I read the difference between warnings and errors, between a Zenphoto problem and a host problem, I check my compatibility (ok, so I stupidly assumed that my host had already moved me to PHP5, but I think that's forgivable), I read the directions, I search the forums before hounding you about problems, and yes I even went in to the themes page to make sure I wasn't clinging to some hopelessly outdated theme from yesteryear.
Default still comes with the full installation package (the very definition of "default"), still marked as officially supported, and maybe I'm being dumb again, but if something is dated 2.5 years ago on your official pages I tend to suspect that it has not been modified since then and there's no need to go against your written upgrade instructions and replace the themes folder, considering that the convention with any other bit of software I've ever downloaded - patches, full installers, drivers, etc - is to mark the information page with a version number or at the very least a modification date.
What is most amazing is that you mention that you "of course" don't test your default theme with new releases. What's the point of having a default, included theme at all then?
What is most amazing is that you mention that you "of course" don't test your default theme with new releases. What's the point of having a default, included theme at all then?
No, I actually said "We of course don't test older standard themes with newer releases" and meant "older versions" of those themes. We of course test the theme but just the current version of it. (Just to note that English is my 2nd language so sometimes I am thinking in my 1st....)
Generally we try to make most things backward compatible by not changing standards but not always that may work out.
At any rate, the permissions thing still bugs me when I run setup if anyone has any thoughts on that. I am about to rip out my themes folder and move in the new one, hopefully that will be fine.
Thank you for all the help, and as for "Besides, setup did warn you about the themes even if the instructions were not explicit!"... yeah. I know. That's why I asked about it in the first place. I guess I just didn't realize that I was supposed to assume unwritten upgrade steps, since the rest of the documentation is pretty clear and concise.
In my case, I only had to change PHP version (from v4.xy to 5.2) on my webserver (done throw a code in .htaccess at the root)
No more problem now.
Parse error: syntax error, unexpected ',', expecting '(' in /homez.65/patrician/www/albums/zp-core/lib-Imagick.php on line 79
I am quite desperate, especially since I cannot understand exactly from the discussion above what has to be done to correct this error.
Thanks a lot in advance