I'm getting the same error. Thought it might be that metasploit just needs time to load stdapi, but looking at the console, the load is actually timing out. Am I missing something?
I did see that meterpreter comes back with a message as follows:
meterpreter> load stdapi
[*] Timed out waiting for command to completeLastly, the meterpreter.php file above contains the line: exec("/www/pineapple/modules/meterpreter/fork-meterpreter.sh");but the code for this file doesn't appear to be on this page like the others (e.g. meterpreter-keepalive.sh)