php5.3

IIS6: PHP Sessions

I have installed PHP to work with IIS6 (with FastCGI). I am capable of viewing a sample test website that shows the PHP info with the following code: <?php phpinfo(); ?> Now that this works I tried to migrate my PHP website to IIS6 and here is a list of the errors/warnings I got: PHP Warning: session_start(): open(C:\WINDOWS\Temp\sess...

does PHP 5.3 change the way file_get_contents works?

I'm having an odd issue with PHP's file_get_contents. In the past, file_get_contents on a remote file returns the text of that file regardless of the HTTP status code returned. If I hit an API and it sends back JSON error information with a status of 500, file_get_contents gives me that JSON (with no indication that an error code was en...

Uncaught exception while using xdebug

I'm not too great with xdebug so forgive me if this is a stupid question. But I installed it on a separate machine and it performed some magic for me like formating my var_dump() output and catching any uncaught exceptions. It also fails to format the stack traces, outputting plain text which is extremely hard to read. As I am learning ...

MySQL connection attempt works fine in 5.2.9 but not in 5.3.0 - Help?

Hi, I'm having trouble making a secondary MySQL connection (to a separate, external DB) in my code. It works fine in PHP 5.2.9 but fails to connect in PHP 5.3.0. I'm aware of (at least some) of the changes needed to make successful MySQL connections in the newer version of PHP, and have succeeded before, so I'm not sure why it isn't wor...

Parse error after upgrading to PHP 5.3

I have a php code that works well in PHP 5.2 but throwing "Parse error: syntax error, unexpected '}'" after upgrading to PHP 5.3. When I use echo/print or heredocs to print all the HTML part of the code, the error is gone. My question is, why this error occurred? Is this mean that in PHP 5.3 we are no longer allowed to put HTML code in...

PHP help with error

Hi, I am working on a Zend project and it has been well over 12 months since I touched Zend, I am getting an error on one of my functions, and I cannot work out why, I think it may be down to the site being originally built in an earlier version of PHP (5.2) and I am now running 5.3. The function looks like this, public function add...

PHP 5.3 now allows redirects after writing content?

I recently made the jump from php 5.2 to 5.3, and I've noticed that it will now allow redirects (ie. headers) after writing content, presumably through some sort of automatic output buffering. I used to think it was annoying the other way... but this makes it much harder to track down errors during development. Is there a way to turn t...

define a closure as method from class

Hi, i'm trying to play with php5.3 and closure. I see here (Listing 7. Closure inside an object : http://www.ibm.com/developerworks/opensource/library/os-php-5.3new2/index.html) that it's possible to use $this in the callback function, but it's not. So I try to give $this as use variable : $self = $this; $foo = function() use($self) {...

What is the best PHP framework for building a website around a heavily relational PostgreSQL database?

First of all, the framework of choice needs to have excellent support for PostgreSQL. I don't care about MySQL because it doesn't have half of the features the application I will be porting requires. (And when I say excellent support, I mean that their approach to database drivers has not been solely trained in MySQL). The ideal framew...

Zend_Soap_AutoDiscover and PHP namespaces

I'm using namespaces in PHP for the first time in an application that provides a web service via Zend_Soap, and I'm running into a problem with the autodiscover feature. I have code something like this: $autodiscoverObj = new Zend_Soap_AutoDiscover(); $autodiscoverObj->setClass('My\\Namespace\\MyClass'); And I'm getting errors like th...

Is there a simple way to emulate friendship in php 5.3

I need some classes to befriend other classes in my system. Lack of this feature made me publicize some methods which shouldn't be public. The consequences of that are that members of my team implement code in a bad and ugly way which causes a mess. Is there a way to define a friendship in php 5.3? (I am aware of http://bugs.php.net/...

what does & do in php

I have this code $myNewClass->cars =& Orders_Car::GetRecords($myNewClass->searchString); ^ what is & doing there. thanks ...

php 5.3.2 + MS SQL (can`t connect)

I allways used php 5.2.3 version ,but now I updated php to 5.3.2 version. I have problem with mssql,I can`t connect to mssql server. I have downloaded a sql server driver for php 1.1 There are a lot of files, i used 'php_sqlsrv_53_ts_vc9' Put it on php/ext directory 'php_sqlsrv_53_ts_vc9' I have added - extension=php_sqlsrv_53_ts_...

difference between object and static methos

whats the difference between static and object methods? where and why are they use differently? when do I use which one of those ...

Should I upgrade my server's PHP to version 5.3?

I have php 5.2.11 on my server. Should I upgrade to the new PHP 5.3.2? Any new features which can save my life? Any suggesstions? ...

What is your favorite new feature in php 5.3?

I'm trying to compile a list of new features found in php 5.3. that I have to check out as time permits. I'd like to do this in the order of usefulness of the features. The question is subjective, that is the point. I want to end up with a list ordered by what the community likes. Such a list would hopefully be useful to many and the I ...

A php namespace called default

<?php namespace default gives me an unexpecected T_DEFAULT, is there any way of working around this? Can I escape the reserved word somehow? My system uses the name of the current module in my site for the namespace so it would be nice to be able to use any string as a namespace. ...

How to import gmail contacts using PHP?

I have to create a tell a friend section in my web site. How to import gmail contacts using php. any body can help me. ...

PHP5.3 non-static variables in scope behaving static

Do PHP5.3 have any known bug issue that makes non static variables in scope behave Static ? I donno why in a if{}Scope I've { echo $_not_static; $_not_static = 5; } First Time it fires E_NOTICE as it should But second time it prints 5. I was Struggling with this for 3+ hours but not getting any hint of a fault from my side. ...

PHP5.3 with FastCGI caching problem accross different requests

I have designed a stylesheet/javascript files bundler and minifier that uses a simple cache mechanism. It simply writes into a file the timestamp of each bundled files and compares those timestamps to prevent rewriting the "master file" again. That way, after an application update (here my website), where CSS or JS files were modified, a...