Archive

Posts Tagged ‘PHP’

Drupal: 500 Internal Server Error on Modules Page

September 19th, 2009

When enabling Drupal modules a 500 Internal Server Error can often appear with the default installation. Too identify the cause of the problem look in the error_log file for your web server.

Each time I have encountered this problem the cause has been due to the PHP memory limit being exceeded. The typical error message if you have allocated 16MB is:

PHP Fatal error:  Allowed memory size of 16777216 bytes exhausted (tried to allocate 77824 bytes) in /xxx/yyy/zzz/xxx/drupal/modules/node/node.pages.inc on line 221

There are several very easy ways to fix this by increasing PHPs memory limit:

  • memory_limit = 16M to your php.ini file (recommended, if you have access)
  • ini_set('memory_limit', '16M'); in your sites/default/settings.php file
  • php_value memory_limit 16M in your .htaccess file in the Drupal root

See: http://drupal.org/node/76156 for more details.

PHP , , , , ,

BTFTA.org: PHP Customisation / Development

May 11th, 2009

British Thought Field Therapy AssociationMorley Computing have just completed a customisation of the BizDirectory PHP application on behalf of the British Thought Field Therapy Association (BTFTA).

The existing PHP application provided the essential functionality but it was also necessary to modify the PHP interface with PayPal for paid advertising.

News , , ,

How to do a recursive chmod all PHP files in a site or folder

May 6th, 2009

If you want to do a recursive chmod on a set of files below a given directory or folder using the bash shell you can do the following:

find . -type f -name ‘*.php’ -exec chmod 644 {} \;

This command can be easily adapted to work for other file types or modes. The ‘.’ following ‘find’ specifies the root directory for the operation.

How to chmod all folder/directories below the current directory…

find . -type d -exec chmod 755 {} \;

Alternatively, chmod on all directories below a given directory (./somedir)

find ./somedir -type d -exec chmod 755 {} \;

PHP , , , ,

Website Redevelopment: JoannaJones.co.uk

October 19th, 2008

JoannaJones.co.uk, the website for Dover-based artist Joanna Jones has recently undergone extensive redevelopment to improve usability, improve the ease maintenance, improve search-engine rankings and to incorporate modern web development standards.

The changes have involved extensive PHP changes and implementation of a simple file-based content management system to keep hosting fees low.

News , , , ,