Welcome Guest, Not a member yet? Register   Sign In
index.php - Defined Constants not Absolute [with fix]
#5

[eluser]Pygon[/eluser]
I actually removed the part of my statement that you were more about cutting people down (I was a bit heated and it was an unfair statement so I do appologize).

Quote:A quick search for function_exists(’realpath’) shows that it’s a very commonly used snippet. Of course that doesn’t make it right. It’s almost always accompanied by something like: “It’s broken on my server”.

You're absolutely correct that there are many implementations of this (none of which would ever actually fix the issue of directory permissions on folders higher than the CWD), and this would always pass as true because realpath DOES exist regardless of whether realpath() is working correctly or not. This ofcourse is assuming that PHP doesn't have some undocumented feature to disable(automatically?) realpath that I don't know about and can't find.

Quote:The $system_folder variable either takes a folder name, or a full system path. My server borks when I give it a relative path - that could be a server issue though. So with that prerequisite in mind, the only reason why the else statement would run (and no realpath checking happens) is when a full system path is given.

It absolutely could be a server issue, because "../system" "something/system" are not full system paths even though CI considers them to be using that snippet of code. Added: And it's not whether the system might fail out at some later point without good explaination, that's something we should try to avoid.


Messages In This Thread
index.php - Defined Constants not Absolute [with fix] - by El Forum - 07-18-2008, 05:35 PM
index.php - Defined Constants not Absolute [with fix] - by El Forum - 07-18-2008, 07:16 PM
index.php - Defined Constants not Absolute [with fix] - by El Forum - 07-18-2008, 09:04 PM
index.php - Defined Constants not Absolute [with fix] - by El Forum - 07-19-2008, 06:50 AM
index.php - Defined Constants not Absolute [with fix] - by El Forum - 07-19-2008, 07:15 AM
index.php - Defined Constants not Absolute [with fix] - by El Forum - 07-19-2008, 09:48 AM
index.php - Defined Constants not Absolute [with fix] - by El Forum - 07-19-2008, 10:55 AM
index.php - Defined Constants not Absolute [with fix] - by El Forum - 07-19-2008, 12:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB