Today I’ve struggled with adding PHP generated TypoScript configuration to the backend. There doesn’t seem to be an API for this, unfortunately, so I had to dig a little bit into the TYPO3 source.
Turns out that
t3lib_befunc#getPagesTSconfig, which is responsible for retrieving TypoScript configuration for the backend, makes use of the following global variable as the “default TypoScript configuration”:
So, being short of a proper API, I ended up simply appending my generated configuration to the
defaultPageTSconfig string (in my
Is there a better way to achieve the same thing? If so, let me know :)
Easy as pie if you know how to do it (actually this works for installing NewRelic anywhere that is not a standard Apache/PHP path) :)
- Download the New Relic installer files (as a .tar.gz package)
- Find out your MAMP PHP path (mine was /Applications/MAMP/bin/php/php5.3.6/bin)
- Go to your unpacked new relic installer files and execute
sudo NR_INSTALL_PHPLIST='<your mamp php path>' ./newrelic-install
- Follow the instructions in the installer (don’t forget to edit your php.ini, the installer gives you instructions on what to add)
And voilá, worked like a charm :)
PS: New Relic is kind of awesome!
Redirecting in PHP is easy:
$url = "http://coding-journal.com/"; header("Location: $url");
But there is tons of stuff to worry about when doing a header redirect, for instance:
Using PHP functions can be surprising at times. Validating IP-Addresses using Validate Filters seems to be one of those. Continue reading
Many of you may already be familiar with cloud platforms such as Heroku and Google App Engine which allow you to easily deploy scalable web applications with a minimal administration effort. Today I’ll be checking out PHPFog, a new cloud platform for (you guessed it) PHP.