I tried searching through the forums to get an answer but failed. I just got G2 from Sourceforge and went through the install process. I completed all 10 steps correctly and it seemed to work.
I then went to the gallery (main.php) and I got the following error:
Fatal error: Call to a member function on a non-object in /var/lib/apache/htdocs/gallery/modules/core/classes/GalleryTemplateAdapter.class on line 312
Can somebody please tell me what is wrong?
Thanks,
MT
----
Gallery URL (optional):
Gallery version: 2.0 Alpha 4
Webserver (with version): Apache 1.3.29
Datatabase (with version): MySQL Ver 8.40 Distrib 4.0.13, for pc-linux on i686
PHP version (eg 4.2.1): 4.3.2 (Zend Engine v1.3.0)
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system: Linux
Web browser/version: Mozilla 1.7.1
Posts: 8601
no theme is loaded to display the page, which means something went wrong with the install.. if you PM me ssh/ftp access to your server and the G2 url I can take a look.
Posts: 45
Is there some way I can try to debug this on my own? If you can tell me what to look for, I should be able to look for it...
I don't have ability to change passwords and the sysadmin is not going to be around for some time.
Another thing to note is that I redid the whole install and I got a similar error (only this time it was complaining that errorHead.tpl was missing - and if you check the tar.gz file - it is missing)
Warning: stat(): Stat failed for /var/lib/apache/htdocs/gallery/templates/errorHead.tpl (errno=2 - No such file or directory) in /var/lib/apache/htdocs/gallery/modules/core/classes/GalleryPlatform.class on line 570
Posts: 8601
where did you get your tar.gz? perhaps try a clean install using a current nightly snapshot.. see the FAQ for snapshot locations.
Posts: 45
I downloaded the current build from:
http://galleryupdates.jpmullan.com/
and it stopped complaining about not finding errorHead.tpl. However, the fatal error still exists. Could this be related to my php/apache/mysql version?
Thanks,
MT
----
Gallery version: 2.0 Alpha 4
Webserver (with version): Apache 1.3.29
Datatabase (with version): MySQL Ver 8.40 Distrib 4.0.13, for pc-linux on i686
PHP version (eg 4.2.1): 4.3.2 (Zend Engine v1.3.0)
Operating system: Linux
Web browser/version: Mozilla 1.7.1
Posts: 8601
without access to your server i can't guess what went wrong. you can try to debug why _theme in GalleryTemplateAdapter doesn't seem to be getting set...
Posts: 45
I tried running main.php from the command line and it seems that there is a permissions problem. I'm including an error log along with this post.
I have g2data chmodded to 777 (as per the documentation). I did not create anything inside this folder - everything is owned by nobody:nobody.
In your past experience, what has caused the session files to be non-creatable?
Does this indicate some sort of a umask problem?
I created a test php file and read the default umask. It is set to 18 (which I'm guessing is 0x12).
If this is a umask problem, what should the correct umask be and should I change GalleryPlatform.class to adapt the umask?
Thanks,
MT
Posts: 8601
when you access G2 via the webserver then php runs as the webserver user.. sounds like user "nobody" in this case.. if you then try to run from the command line (as your own user) it won't have permission to write the files/dirs it created before as "nobody".. so the behavior you saw in that test is normal.
Posts: 45
ah, that makes sense.
So, how do you guys debug problems? Is there no way of running the php script on the command line to find out where it is choking?
thanks
Posts: 7994
The most straightforward way is to add print statements to the code to dump out extra information at run time. We do have some more sophisticated debugging tools like PhpED (but they cost money).
Can you post a directory listing for us? What do these commands return?
The second entry might be quite long .. if it turns out to be really long, you can publish it on your site and put a link to it here.
That should give us an idea of how G2 is creating files and directories on your system so we can start narrowing down what's going wrong.