Circular reference when calling PHP script from C++ program -
when called php script c++ program called different php script, server crashed. i'm assuming circular reference occurred.
i'm using godaddy dedicated server centos 6.9.
here first php script (named script1.php):
<?php passthru('test_cpp'); ?>
here c++ program (named test_cpp)
#include "iostream" #include "cstdlib" int main(int argc, char* argv[]) { std::cout << std::system("/usr/bin/php script2.php") <<std::endl; return 1; }
here second php script (named script2.php):
<?php #!/usr/bin/php echo "hello"; ?>
i expect first php script display output of second script. instead, browser displayed hourglass minute, , 2 minutes later mysql database stopped working had restart server.
Comments
Post a Comment