Originally Posted by
Dave224
I tried to change the order of the files in the directory with no success. I'm using a Mac with a MAMP Pro development system. Using the Mac Terminal utility and the ls -f command to list the directory files unsorted, showed that the SBA file was first, followed by other files including the one in question. The files were not ordered alphabetically or by date added or date created or date modified or size or anything else I could look at. I deleted the file in question and replaced it with a copy from another drive. No change in file order in the directory. I deleted the file again, created a brand new file and copied the code to it. Same file order as before. I verified the file execution order with debug output. So it seems to me that trying to fool with the file order in the directory is a dead end.
Your point on the development system is noted.
Let's continue the discussion on the SBA notifier in the SBA forum thread.
Dave
While not entirely clear above about which file(s) were removed and placed, but it is my understanding that one factor of a file's placement is that it receives some sort of "id" associated to a file being loaded to the system in such a way that it doesn't relate to date, time, or spelling... Its like a products_id, next file gets the next number...
My thought therefore, to potentially account for that was since this alternate file has been placed to the server (call it file 2) *after* the SBA file (file 1), that file 1 would need to be fully removed from the system (not so much renamed or moved because in both of those cases it still exists, but has some different identifying information related to the "sequence"). And to then load file 1 back to the system (again from outside of the existing system) so that it effectively would have a new "number" that comes "after" file 2...
The other thing is to actually cause the file to be executed rather than looked at in the directory... Meaning, for "arguments" sake, could set a variable in this other file such that if it is executed first then it could be detected in the second file. So, let's say the variable: in your "file 2" within the php space in such a place that a "diversion" doesn't occur away from processing the next file, then in file 1 (SBA file) at the top of the file (in the php space), could put a test like:
Code:
if (!empty($imHere)) {
trigger_error('variable set', E_USER_WARNING);
}
What this would do (assuming that logs are able to be captured on the server) is, if the load sequence is 1) consistent from load to load and 2) such that file 2 is loaded before file 1, then a myDebug-xxx file would be created when interfacing with the shopping cart (adding a product or similar).
If necessary, could also place a trigger_error like call in file 2 at/around the point of the variable assignment just to "prove" that the statement executed at least...
But, again... The load sequence is system dependent (as we both said in our own way) and may be by some other "method" such as a filename/file data hash or...or...or...
Bookmarks