Issue tracker moved to https://gitlab.archlinux.org/archlinux/aurweb/-/issues
FS#16887 - header.php not included when uploading a package fails (pkgsubmit.php)
Attached to Project:
AUR web interface
Opened by mickael9 (mickael9) - Wednesday, 28 October 2009, 18:04 GMT
Last edited by Loui Chang (louipc) - Monday, 20 September 2010, 01:27 GMT
Opened by mickael9 (mickael9) - Wednesday, 28 October 2009, 18:04 GMT
Last edited by Loui Chang (louipc) - Monday, 20 September 2010, 01:27 GMT
|
DetailsThe title says it all, the header.php is not included, and you end up with a page without style.
I looked at the code, and I think the problem is related to the chdir($_SERVER['DOCUMENT_ROOT']) call that makes the header.php inclusion fail (wrong directory?) easy fix : store the previous path with getcwd() instead of using $_SERVER['DOCUMENT_ROOT'] |
This task depends upon
Closed by Loui Chang (louipc)
Monday, 20 September 2010, 01:27 GMT
Reason for closing: Fixed
Additional comments about closing: 1.7.0
Monday, 20 September 2010, 01:27 GMT
Reason for closing: Fixed
Additional comments about closing: 1.7.0
please fix it :)
Can you give me a link to the commit?
My local installation works fine, but aur.archlinux.org is configured differently.
It may be possible to fix this in code. I'll have to investigate.
The problem has to do with document-root changing:
http://redmine.lighttpd.net/wiki/1/Docs:ModSimpleVhost#Conditionals-vs-simple-vhost
Because of that header.php and footer.php aren't found.
I don't think relying on DOCUMENT_ROOT is a good idea, for example, one could install the AUR in a subdirectory.
Is it even necessary to chdir at all ?
The bug is triggered by going to pkgsubmit.php and pressing Upload without filling any field.
I'm attaching a patch.
Thanks for contributing. :D