Warning: date()
- Details
- Category: PHP
- Published on Wednesday, 22 September 2010 11:49
- Hits: 482
If you are receiving error like:
Warning: date(): It is not safe to rely on the system's timezone settings.
In PHP 5.3.x
Fastest fix is to add something like:
date.timezone = "Europe/Ljubljana"
in your php.ini.
Data source name not found and no default driver specified
- Details
- Category: PHP
- Published on Thursday, 12 March 2009 14:43
- Hits: 403
If received error like this one, then, beside all, you should check have you installed the SQL Server 2005 version of the SQL Native Client, since I didn't know that, and I tried to do it with the the SQL Server 2008 version of the SQL Native Client.
Taken from here.
Instalation on IIS 5.1 (WinXp)
- Details
- Category: PHP
- Published on Wednesday, 12 November 2008 21:27
- Hits: 671
If the path to your PHP directory has spaces (e.g. "C:\Program Files\PHP") and IIS gives a 500+ error or responds with "The specified module could not be found." when you try to run a PHP script, try changing the ISAPI DLL's path in IIS (in the "Home Directory" tab, under "Configuration...") to the 8.3-equivalent path.
ĂÂ
That is, use C:\PROGRA~1\PHP\php5isapi.dll instead of "C:\Program Files\PHP\php5isapi.dll".
ĂÂ Copy/Pasted from here.
The specified module could not be found.
- Details
- Category: PHP
- Published on Tuesday, 10 February 2009 16:20
- Hits: 459
If you received error like in title while trying to install php 5.2.8, then read this, maybe it wil be helpfull for you too :)
Mostly I followed instructions from here, my problem was that I had installed IIS 5.1 and IIS 6... Have no idea how that happened.
If you start msi instalation of php to change anything, than you will probably have to go to IIS manager and remove " from .php mappings.
Save XML in human readable format
- Details
- Category: PHP
- Published on Monday, 22 September 2008 12:37
- Hits: 610
With using DomDocument class.
Like this:
<?From here.
$sXML = '<root><element><key>a</key><value>b</value></element></root>';
$doc = new DOMDocument();
$doc->preserveWhiteSpace = false;
$doc->formatOutput = true;
$doc->loadXML($sXML);
echo $doc->saveXML();
?>

