2014-11-22 20:06:23 -0500 asked a question php exec runs my c++ file but imread won't get nothing! Please Help! Hi! Please help me! I've been with this all day and it's important for me to find a way to solve it as soon as possible. The problem is the following: I have a php script that executes my file in c++ with the following: exec("/home/diego/detect -lmysqlcppconn pkg-config opencv --cflags --libs 2>&1", $output,$return); but it doesn't give me what I want. And looking around and doing lot's off cout<< I found that when executing from the php script it doesnt load the image. (But when i execute from the terminal it works perfect!) at these part: Mat image = imread("/home/diego/uploads/image.jpg"); cout< I've already replaced files from /usr/lib to /opt/lampp/ due some errors that I have at first place. libstdc++.so.6 and libtiff.so.5 I've been looking around and found that it could be possible that I mixed up debug and realese libs, because I think that the script do all the c++ but not the "things" that concern to opencv...The truth its that I dont know where to check or what to do. :( Please help me step by step if u could I'm a real noob :( thanks in advance.