This blog is reprinted from a post on the Undead Overlord Forums.
Noticed something funky with our presskit() install today, and thought I should share the solution since I did not quickly see it out there already, and I'm guessing there are a fair number of indie devs using presskit() these days.
If you're not aware of presskit(), which is pronounced "do presskit", and you're an indie developer, it's worth taking a look. It's nothing that a halfway competent HTML coder couldn't do for you, but it does a good job of pointing out the things that make for a good press kit, organizing your thoughts on the matter if you haven't done PR before (I expect most indie devs to raise their hand for that one - I know that certainly applied to me before this current PR push for Undead Overlord), and it makes it all relatively painless. Relatively - there's a small learning curve to overcome, and it's a *wee* bit brittle yet.
I ran into an issue when I got a bit frisky with the data XML that presskit() uses to build the page, which caused the PHP parser to create an error_log in the directory where the preskit() stuff lives on our web host. Presskit() then picked that error_log file up as an extra project to list, so suddenly there was a new project link called "error_log". A catchy name for a game project, to be sure, but not what I was looking for at the time. The link just led back to the same page it was on...but still, definitely not the intended behavior.
Fussing with the XML a bit to get it back to where presskit() expected it to be made the original error that had been logged go away, and then deleting the error_log file itself made the phantom project go away. No worries, but kind of a hassle. I sent a note to Rami at Vlambeer, thanked him profusely for providing such an awesome free tool, and mentioned that it would be nice if presskit() were less fussy about missing XML. He never wrote me back - he must be very busy. |-)
So today, checking back in on our presskit() installation, I noticed that we had a phantom "error_log" project once again, due to a PHP error_log file having been generated in the presskit() folder, even though nothing had changed with the XML for a while (it needs updating, actually - we have some press now!). This time I tracked it down to the fact that one of the presskit() .php files was using a variable before it was declared, generally acceptable in PHP, but it triggers a low level warning under E_NOTICE. Not something I could easily fix without actually learning some PHP and understanding the intent of that variable - more work than I'm prepared to do at this time.
The quick and dirty hack solution I went with was to disable that level of error logging in my php.ini file.
That meant - check the PHP setup with my host to make sure it's set to use a single php.ini file to control the whole site. Then search on "error" a few times in that php.ini file, to come across these docs:
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
Then search on "error_reporting" to find the appropriate setting. In my case, my setting was none of these things, but instead:
error_reporting = E_ALL & ~E_DEPRECATED
Which I promptly changed to:
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
Telling it to now ignore logging for errors from the E_NOTICE level, as well as the E_STRICT level while I was at it, just for good measure - and still ignoring the E_DEPRECATED level as was already specified.
Hopefully, the Curse of the Phantom Projects has now been solved, and if you've run into a similar issue, maybe this will help you out.
To give credit where credit is due, this guy Georgi Kralev's post here is what led to me to this solution.
Lastly, if you're PHP savvy, and want more information and alternate solutions, there's a bunch here on a stackoverflow answer.