All posts in PHP and Frameworks

ServerGrove PHP Installation on a VPS

ServerGrove’s VPS services come with a special installation of PHP that includes most of the common extensions. By creating this special installation, we can ensure our customers that we provide the latest stable versions and that updating them is as easy as running the CentOS, Ubuntu or Debian updater. PHP . . . Read more

Sending emails with Zend_Mail

If you are trying to send emails with Zend_Mail, we recommend that you do it in a way so that Zend_Mail uses the mail() function (instead of delivering the message over SMTP). To do this, just setup Zend_Mail and send the message without specifying a transport. Here is an example: . . . Read more

PHP sessions never expire

PHP Sessions use a cookies to keep the session alive. The default value for the cookie lifetime is 0 (session.cookie_lifetime) which means that the session will be valid for the amount of time the browser is open. You can change this value by using ini_set (before starting the session) or . . . Read more

PHP Parse error: syntax error, unexpected T_STRING

PHP Parse error: syntax error, unexpected T_STRING in /path/project/apps/frontend/modules/module/templates/indexSuccess.php on line 1 The path above is an example of a template file on a symfony project. If your files work fine in your development server, and we you upload it to the production server you get this error, it is . . . Read more

Locale problems

If you are having locale-related issues, like character conversion or encoding, it is possible that the locale that you are trying to use is not properly installed on the server. If you are on a VPS, you can generate your locale definitions. check that your locale is installed: locale -a . . . Read more