Jump to content

Empty pages


mattVo

Recommended Posts

Hi all,

I'm having a problem that shows up once in a while, where content of my dynamically driven pages doesnt display when I first load up the page. I have to hit refresh and then it'll display. And it's content that is stored on a database.

I suspect the problem is that the page is being displayed before the data from the database has been sent completely.

Is there a solution to this? I've tried output buffering but the problem persists.

 

Thanks all,

Matt

Link to comment
Share on other sites

THanks for the replies!

I'm not using mysql_pconnect, so that's not the problem here.

Where do I access the error log? I'm pretty new to this so bare with me...

Also, I'm not the admin of the server and have limited access to thins. But I can ask the sysop and see what's going on.

 

So here is what's not displaying... A sidebar menu. Seems pretty straight forward to me... The rest of the page displays fine.

Can it be that the server where our database resides has a huge latency?

 

<?php

			//////////////////////////////////////
			// VARIABLES
			//////////////////////////////////////
				$upcomingArtist = '';
			//////////////////////////////////////


			//////////////////////////////////////
			// QUERYs
			//////////////////////////////////////
				$sqlUpcomingArtist = 'SELECT id_artiste, nom FROM artiste WHERE active_ca = 1 ORDER BY nom';
				$queryUpcomingArtist = mysql_query($sqlUpcomingArtist);
			//////////////////////////////////////


			$upcomingArtist .= '<ul style="list-style: none;">';
			while ($rowUpcomingArtist = mysql_fetch_array($queryUpcomingArtist))
			{					
					$upcomingArtist .= '	<li><a href="/artist/'. retireAccents($rowUpcomingArtist['nom']) .'/overview" class="menu">'. $rowUpcomingArtist['nom'] .'</a></li>';				
			}
			$upcomingArtist .= '</ul>';


			echo $upcomingArtist;
		?>

Link to comment
Share on other sites

You want to see the error log which is typically the apache error log.  Usually it's in /var/log/httpd/. Assuming this is a vhost the log name gets configured by the person who sets up the server.

 

On the mysql side you want to have the slow query log turned on, and see if there are issues there. 

 

In regards to network latency, anything is possible but you'd have to rule out a lot of other issues, and I'd expect you'd see some sort of error in the error logs.

Link to comment
Share on other sites

I'll try to find the error logs and look at those.

In the meantime, is there a way to check if data has been sent from the database before displaying the page? When data is there, then display the page?

 

THanks!

Link to comment
Share on other sites

I don't understand your question.  The pages gets buffered and if there are queries, it already won't display until it has data, however there are limits and if things timeout, you may get things that are broken.  It seems like you're looking for a way around trying to actually figure out what your issue is.  There's nothing simpler and more effective initially than the two suggestions I gave you.  *Not* looking into those is like putting your head in the sand.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.