I have a weird problem.
I am firing a PHP page (page 2) from within another PHP page (page 1) by using exec, which sends $argv variables to page 2.
The issue is, the DB connection on page 2 breaks because the $argv variable messes my environmental variables for the DB connection ($_ENV['DB_USER'] and $_ENV['DB_PW']).
I get a error like the password is incorrect ([1045] Access denied for user...).
It only happens if I call page 2 using the exec command on page 1, otherwise the connection works fine
If I comment out the DB connection, the $argv[1] (ID i need) is passed to page 2 without issues.
I've tested a lot, and am positive $argv is screwing up my environmental variables.
Does anyone have any ideas?
By the way, I don't want to use includes or cUrl to run page 2.
Thanks in advance.