Legalize drugs and educate people about them will help. Building a bigger fence won't, unless you build it around the entire coast line as well and thoroughly inspect every truck, container, and person crossing the border. Trade would come to a halt.
For example Extacy. Sasafras oil is being harvested in Cambodia, send to The Netherlands for manufacturing and comes into the states after being shipped to Vancouver by container ships.
4 countries are spending a lot of money to try to stop this but the profit margins are just too big. The only result is speeding up the process of deforestation in Cambodia, the more harvests are being intercepted, the more trees are cut down. The same thing happens with illegal Marijuana grow ops in California, they're not going away no matter how many you burn down.
All that energy spend on combating drugs that aren't even harmful if manufactured and taken with care.
Illegal immigration is a lot harder to solve. Again the best solution is to combat the cause. Why do people flee their country? Either they're afraid for their lives or can't sustain themselves properly. Increase free trade with Mexico, help the government fight corruption to make Mexico a more desirable place to stay. Taking the money out of the drug cartels by legalizing drugs will also help lessen their grip on the country.