Still getting the same error

MtGox down. Waiting...
sh: /usr/local/phpchroot/wget: No such file or directory
Are you sure that you changed BOTH occurences of the wget call? ;-)
Also if you chrooted the script it maybe doesnt have access to the wget tool.
$a = exec ('/usr/bin/wget -qO- --no-check-certificate --post-data "name=' . $username . '&pass=' . $password . $post_data . '"
' . $scriptname);