Tiiba":2md4jbci said:Yes, I use Apache. But I realized that I gave the description incorrectly. The PHP script actually runs as a cron job. As root. And has the same problem as the Web-based test I whipped up. So it's not related to the server or what user I'm running as.
And why is it such a horrible idea? I have a tool that can create data, I have a tool that needs that data. What's wrong with that?
All the tools you are using imply you are creating a web service. As web services go you are doing it precisely the worst possible way. If you're just trying to script a process, that's fine; although you should try avoiding running it as root if at all possible.
If you are going to convert this later to a web service you need to seriously rethink your over-all approach and re-evaluate it from a security perspective; web services absolutely require the highest level of integrity in design and implementation to be secure; ad-hoc slapping code together, particularly php code doesn't lead to good design.