Jump to content

PHP5 Upgrade Confusion


MinusMyThoughts

Recommended Posts

Hey, all!I haven't posted in a good long while, but that doesn't mean I haven't missed all of you intensely. :)I've got a problem that I can't seem to figure out. I switched my server from PHP4 to PHP5, and for the most part it went swimmingly, but I'm getting a strange error that I'm not sure how to troubleshoot.Does anyone recognize the cause of this error?

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of xml_set_object(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /u/r/l/index.php on line 221

Looking at line 221 of index.php isn't helpful, I don't think. It's the last line of a block of text that looks like this:

$var =<<<_____EOD	Some text._____EOD;

Is that format unsupported in PHP5?Any help is GREATLY appreciated. Thanks in advance!-Jason

Link to comment
Share on other sites

So, upon fixing one other error with my code that had showed up (a header problem), all warnings ceased.I have no explanations, and no guesses, because this code worked great in PHP4, and is currently working great in PHP5.Odd.Here's the code anyways, just in case you want to look it over.

<?php/* ********************************************************************************************************* * This is the publicly displayed site. Our index page should serve as a shell that * can be manipulated to fit any site needs with very few changes necessary. ********************************************************************************************************* */		include_once('_vars/shared.php');		$tid = $_GET['id'];		if (empty($tid))			$tid = '0';		$title = i_Title($tid);		switch ($_GET['id'])		{			case "1":				$sitename = "Blog";				break;			case "2":				$sitename = "About";				break;			case "3":				$sitename = "Friends";				break;			case "4":				$sitename = "Contact";				break;			default:				break;		}		$menu = b_MenuU($_GET['id']);				$footer =<<<________EOD				<p class="enginePoweredBy">					All content © 2008 The Nate Green Experience, LLC | 					<a class="ennuilink" href="http://ennuidesign.com">Powered by ennui</a>				</p>________EOD;				if ( $_GET['id'] != '1' )			$entry = r_Links(str_replace('&','&',b_entry($_GET['id'],0)));		else			$entry = b_BlogEntry($blogid,$_GET['blog']);		$blogposts = b_BlogSidebar($blogid,$rowdisp);		$newsletter = newsletter();		$photos = flickrParse("4"); // Send number of entries to display.		$data =<<<________EOD				<div class="entrydisplay">					{$entry}				</div>				<div class="sidebar">					<div class="blogposts">						{$blogposts}					</div>					<div class="newsletter">						{$newsletter}					</div>					<div class="photos">						{$photos}					</div>				</div>				<br class="clear" />				<div class="footercontainer">{$footer}				</div>________EOD;// ******************************************************************************************************// Custom Functions for This Site// ******************************************************************************************************		function newsletter() {		global $siteName;		$newsletter =<<<________EOD						<div class="blogtitle">							<span class="blogtitle">The Experience Newsletter</span>						</div>						<div class="newsletter">							<span class="newsletterlead">								If you'd like to hear the latest news about Nate's								upcoming major book release with Avery Publishing,								enter your first name and email address below!							</span>							<form name="form1" method="post" 								action="http://www.1shoppingcart.com/app/contactsave.asp">							<input name="name" type="text" id="name" 								class="newsletterInput" value="First Name" onfocus="name_fix()" /><br />							<input name="email1" type="text" id="email1" 								class="newsletterInput" value="Email Address" onfocus="email_fix()" /><br />							<input type="submit" name="submit" value="Sign Up!" />							<input name="defaultar" type="hidden" id="defaultar" value="311291" />							<input name="merchantid" type="hidden" id="merchantid" value="124788" />							<input name="copyarresponse" type="hidden" id="copyarresponse" value="1" />							<input type="hidden" name="visiblefields" value="name,email1" />							<input type="hidden" name="requiredfields" value="Name" />							<input type="hidden" name="arthankyouurl" value="http://{$siteName}" />							<input type="hidden" name="allowmulti" value="1" />							<input type="hidden" name="custom" value="0" />							</form>						</div>________EOD;		return $newsletter;	}		function flickrParse($numrows) {		$url = "http://api.flickr.com/services/feeds/photos_public.gne";		$user = "?id=22729170@N05〈=en-us&format=rss_200";				$feed = $url.$user;		$feedsrc = "http://flickr.com/thenategreenexperience";				$rss = simplexml_load_file($feed);		$channel = $rss->channel;		foreach($channel->item as $item) {		   echo <<<________EOB		<a href="{$item->link}"><img src="{$item->media->thumbnail->url}" /></a>		<br />________EOB;		} 	}	// ******************************************************************************************************// End Custom Functions for This Site// ******************************************************************************************************	// In order to build the HTML displayed on the public's side of things,	// we declare the doctype and open our HTML and head tags with declarations	// to ensure proper validation through W3C.		$display =<<<________EOD<!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><!--// This site was designed and developed by Ennui Design.	// Contact us: answers@ennuidesign.com	// Or visit us on the web at www.ennuidesign.com for more information. //-->	<head>		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />		<meta name="Keywords" content="Nate,Green,built,for,show,look,better,naked,fitness,writing,networking,entrepreneur,writer,write,written,health,healthy,experience,mens,men's,maximum,wellness,feel,better,diet,exercise,workout,work,out,jason,lengstorf,ennui,design" />		<meta name="Description" content="The blog of up-and-comer Nate Green covers topics ranging from looking good naked to how to get a book deal by age 22, and everything in between!" />		<link rel="stylesheet" href="{$siteCSS}" type="text/css" media="screen,projection" />		<script src="{$siteJS}" language="javascript" type="text/javascript"></script>		<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">		</script>		<script type="text/javascript">			_uacct = "UA-3678049-1";			urchinTracker();		</script>		<link rel="alternate" type="application/rss+xml" 			title="The Nate Green Experience Blog - RSS 2.0" 			href="http://feeds.feedburner.com/TheNateGreenExperience" />		<title>{$title}</title>	</head>	<body>		<div class="mastercontainer">			<div class="headercontainer">				<div class="menucontainer">{$menu}				</div>			</div>			<div class="datacontainer">				{$data}			</div>		</div>	</body></html>________EOD;	print_r($display);?>

Also, this site is live at TheNateGreenExperience.com.Thanks!-Jason

Link to comment
Share on other sites

Yeah that's weird, I don't see any passing by reference going on there at all. PHP might have been confused if there was a problem with quotes, but that should have been a parse error instead of the warning you got. I'm not sure how that came about.

Link to comment
Share on other sites

Im with justsomeguy... that isn't making any sense... maybe an UNEXPECT T_ELSE or T_STRING or something, but seriously not a pass reference thing... Computers are weird. We should ask for the GOD ISO(anyone else wanna help make that?) from LARS...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...