Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 122880 bytes) in/private/var/www/localhost/image_bbs/upload .php on line 167
It's just an image board and it's 134MB. That's impossible
If you add the following to php.ini, you will have unlimited memory, so this problem will not occur. It may be dangerous, though.
;memory_limit = 128M memory_limit = -1
Don't forget to restart apache after setting up!
In the meantime, let's review the program.