Home > Archive by tag 'php'

Install Apache/PHP/MySQL on Mac Computer(Snow Leopard)

Apache Start Apache sudo apachectl start Check it’s working: http://localhost/ PHP In /etc/apache2/httpd.conf, uncomment this line: LoadModule php5_module libexec/apache2/libphp5.so Restart Apache sudo apachectl restart Fix a warning appearing in phpinfo() Create /etc/php.ini and make it writable cd /etc sudo cp php.ini.default php.ini sudo...

Fatal error: Allowed memory size of 67108864 bytes exhausted

PHP Fatal error:  Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /usr/lib/php/PEAR.php on line 868. Here’s the entire error message… Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 33532118 bytes) in /home/anxietyz/public_html/blogs/includes/database.mysql-common.inc on...

How To Force File Download With PHP

Say you want a PHP script that will make the browser to download a file instead of opening it. This is useful for common filetypes that would normally be displayed in a browser, like .html, images, PDFs and .doc files. You can find a lot of scripts that do this on the web but one thing most of them don’t handle is download...