I have some recommendations for future versions (otherwise excellent product!):
-do NOT use stristr -- you kill all php4 installs, just implement a stristr_clone function like phpnuke 7.7 does... or just use strstr(strtolower(...)) not too much more typing, is it.
-do not put `` around table names. Reason: cannot include a db prefix if one does that. I have moved my sentinel tables to its own db, and this has hampered my effort.
Joined: Aug 27, 2002 Posts: 15235 Location: Kansas
Posted:
Wed Aug 03, 2005 3:42 pm
steve1 wrote:
I have some recommendations for future versions (otherwise excellent product!):
-do NOT use stristr -- you kill all php4 installs, just implement a stristr_clone function like phpnuke 7.7 does... or just use strstr(strtolower(...)) not too much more typing, is it.
-do not put `` around table names. Reason: cannot include a db prefix if one does that. I have moved my sentinel tables to its own db, and this has hampered my effort.
-do NOT use stristr -- you kill all php4 installs
Please explain as I have never heard of this and I have been using PHP for many years and NukeSentinel since day one.
-do not put `` around table names.
We have to as that's the only way to get MySQL to recognize _ in database and table names at the same time. So, there has to be a compromise. Please give an example of the issue you are having.
I have some recommendations for future versions (otherwise excellent product!):
-do NOT use stristr -- you kill all php4 installs, just implement a stristr_clone function like phpnuke 7.7 does... or just use strstr(strtolower(...)) not too much more typing, is it.
-do not put `` around table names. Reason: cannot include a db prefix if one does that. I have moved my sentinel tables to its own db, and this has hampered my effort.
-do NOT use stristr -- you kill all php4 installs
Please explain as I have never heard of this and I have been using PHP for many years and NukeSentinel since day one.
-do not put `` around table names.
We have to as that's the only way to get MySQL to recognize _ in database and table names at the same time. So, there has to be a compromise. Please give an example of the issue you are having.
stristr: SORRY, upon visiting
Only registered users can see links on this board! Get registered or login to the forums!
realized that it works in php4 as well. I thought it did not. Sorry again.
What I did was move the tables to another db, call it ('sentinel' db). I do that since I run multiple nukes on the same box, and one to ban people only once.
So I manipulate $prefix to include db name. This does not work `sentin.some_table`. This works sentin.`some_table`.
I did not realize you need `` to make table names work. In any case, I worked around the problem by doing a "USE sentin" before entering sentinel code, so that all db references are referencing that code.
Joined: Aug 27, 2002 Posts: 15235 Location: Kansas
Posted:
Wed Aug 03, 2005 3:58 pm
Thanks for the explanations. especially on #1
On the other one, now I see your issue. If I remember right, what happens is certain hosts use db_.table and that trailing _ causes problems. I could be remembering wrong but it seems that is the issue.
I've done this a few times for select users and it works well. The other option is to make copies of the db directory files and create a $db2 var like:
Either of the above work, I prefer the second since coping the db directory files is easy and once you do it you can search and replace $db with $db2 easily.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum