How to fix session_start() errors in PHP

I’m not doing .net for now — I’ve gotten interested in PHP, so I’m learning PHP while working on it. There are a shocking number of baffling things in the beginner stage; good thing I was mentally prepared. Last night I ran into a problem: in PHP, session_start() always threw an error: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:wwwrootEZineTest.php:1) in D:wwwrootEZineTest.php on line 1 I searched all over the web and found three explanations and fixes for it:

Backend Server

Security error accessing url when httpService reads XML

When you use httpService in Flex to read XML from a different domain (such as http://xml.weather.yahoo.com/forecastrss), you get a Security error accessing url error. But in the debug folder (bin-debug by default) it reads just fine. This is really annoying — I’m sure plenty of people have been tripped up by this security issue. Why does it only work in the debug folder? It turns out the bin-debug folder works only because [系统盘]:Documents and Settings[用户名]Application DataMacromediaFlash Player#SecurityFlashPlayerTrustflexbuilder.cfg sets it as trusted automatically. At actual runtime, it’s blocked by security. In other words, what we need to do is solve the security-block problem. So how do we fix it?

Flash

The ASP file clearly exists, yet it shows a 404 error—can IIS not display ASP?

Ran into this weird problem today — guess I’ve been living under a rock… ASP files wouldn’t load… showing a 404 error, but non-ASP files like logo.jpg opened just fine. Any file that was .asp gave ...

Backend Server

TypeError: Error #1009: Cannot access a property or method of a null object reference when loading a movie in AS3

A problem I ran into today: I have an swf file that I need to load into a main file, but I kept hitting the following issue: after calling loadSwf(“xxxx.swf”), it throws TypeError: Error #1009: Cannot access a property or method of a null object reference. The loading code looks like this: private function loadMainSwf(url):void { var urlR:URLRequest=new URLRequest(url); containtLoader.unload(); containtLoader.load(urlR); containtLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,loadHandler); containtLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadCompHandler); } private function loadHandler(e:ProgressEvent):void { gLoad=e.target.bytesLoaded; gAll=e.target.bytesTotal; per=Math.floor(gLoad / gAll * 100); percent=per + “%”; perString.text=percent; } private function loadCompHandler(e:Event):void { containtLoader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,loadHandler); containtLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE,loadCompHandler); addChild(containtLoader); }

Flash
12