473,386 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Working with php on a new site but after a few clicks site loads only on a mac not pc

14
Hey everyone,

I am working on a new site, ForceFedTV.com and I have gotten reports that the site runs great on mac, but once loaded on a pc, after clicking a few links then going back to the home button, they claim they get all black and nothing else.

I am working with an index script that incorporates php to create something like frames.

If someone can access the site and maybe even try and speculate on this, that would be great,

My script is below,
Tim

<?php


$channels=$_GET['channels']; if (empty($channels)) { $channels='blank'; } changechannels($channels);
$theatre=$_GET['theatre']; if (empty($theatre)) { $theatre='splash'; } changetheatre($theatre);
$info=$_GET['info']; if (empty($info)) { $info='noinfo'; } changeinfo($info);



function changechannels($channels) {

echo '<table align="center" border="0" cellpadding="0" cellspacing="0" width="770">';
echo '<tr>';
echo '<td width="130" align="center" valign="top">';
echo '<table align="center" border="0" cellpadding="0" cellspacing="0" width="130">';
echo '<tr>';
echo '<td width="130" align="center" valign="top">';
include ('main.php');
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td width="130" align="center" valign="top">';

switch ($channels)
{
case 'blank':
include ('blank.php'); break;

case 'tv':
include ('/home/forcefed/public_html/tvfiles/tv.php'); break;

case 'movies':
include ('/home/forcefed/public_html/moviefiles/movies.php'); break;

case 'musicvideos':
include ('/home/forcefed/public_html/musicvideofiles/musicvideos.php'); break;

case 'animation':
include ('/home/forcefed/public_html/animationfiles/animation.php'); break;
}}

function changetheatre($theatre) {
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</td>';
echo '<td width="640" align="center" valign="top">';
echo '<table align="center" border="0" cellpadding="0" cellspacing="0" width="640">';
echo '<tr>';
echo '<td width="640" align="center" valign="top">';

switch ($theatre)
{
case 'splash':
include ('splash.php'); break;

case 'movie':
include ('movie.php'); break;

case 'tv':
include ('tv.php'); break;

case 'musicvideos':
include ('musicvideos.php'); break;

case 'animation':
include ('animation.php'); break;

case 'detroit':
include ('detroit.php'); break;

case 'info':
include ('info.php'); break;

case 'bowlingfortrophies':
include ('/home/forcefed/public_html/tvfiles/bowlingfortrophies/bftpilotep1/bftpilotep1.php'); break;

case 'bftpilotep1':
include ('/home/forcefed/public_html/tvfiles/bowlingfortrophies/bftpilotep1/bftpilotep1.php'); break;

case 'bftpilotep2':
include ('/home/forcefed/public_html/tvfiles/bowlingfortrophies/bftpilotep2/bftpilotep2.php'); break;

case 'buriedman':
include ('/home/forcefed/public_html/moviefiles/buriedman/buriedman.php'); break;

case 'selitoya':
include ('/home/forcefed/public_html/moviefiles/selitoya/selitoya.php'); break;

case 'selitoyatrailer':
include ('/home/forcefed/public_html/moviefiles/selitoyatrailer/selitoyatrailer.php'); break;

case 'endcall':
include ('/home/forcefed/public_html/moviefiles/endcall/endcall.php'); break;

case 'thepaperboy':
include ('/home/forcefed/public_html/moviefiles/thepaperboy/thepaperboy.php'); break;
}}



function changeinfo($info) {
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td width="640" align="center" valign="top">';

switch ($info)
{
case 'noinfo':
include ('noinfo.php'); break;

case 'bowlingfortrophies':
include ('/home/forcefed/public_html/tvfiles/bowlingfortrophies/bftinfo.php'); break;

case 'bftpilotep1':
include ('/home/forcefed/public_html/tvfiles/bowlingfortrophies/bftpilotep1/bftpilotep1info.php'); break;

case 'bftpilotep2':
include ('/home/forcefed/public_html/tvfiles/bowlingfortrophies/bftpilotep2/bftpilotep2info.php'); break;

case 'buriedman':
include ('/home/forcefed/public_html/moviefiles/buriedman/buriedmaninfo.php'); break;

case 'selitoya':
include ('/home/forcefed/public_html/moviefiles/selitoya/selitoyainfo.php'); break;

case 'selitoyatrailerinfo':
include ('/home/forcefed/public_html/moviefiles/selitoyatrailer/selitoyatrailerinfo.php'); break;

case 'endcall':
include ('/home/forcefed/public_html/moviefiles/endcall/endcallinfo.php'); break;

case 'thepaperboy':
include ('/home/forcefed/public_html/moviefiles/thepaperboy/thepaperboyinfo.php'); break;

}}

echo '</td>';
echo '</tr>';
echo '</table>';
echo '</td>';
echo '</tr>';
echo '</table>';

include ('footer.php');
?>
Oct 1 '07 #1
10 1723
Motoma
3,237 Expert 2GB
The most likely cause is that an unexpected value is coming through your switch statements (likely the variable has not been set). You should always have a default statement to handle the case of bad data coming through.
Oct 1 '07 #2
sickboy
14
The most likely cause is that an unexpected value is coming through your switch statements (likely the variable has not been set). You should always have a default statement to handle the case of bad data coming through.
Whats weird though is if you click the home button (which is set to go directly to forcefedtv.com, meaning there is no variables being sent at all) it comes up black on my bosses two computers. Meaning, the background of the page is black, with nothing on it.


I thought at the beginning of the script when I define my variables, that if there is lack of a variable, then it defaults to what I chose in the line

$channels=$_GET['channels']; if (empty($channels)) { $channels='blank'; } changechannels($channels);

Meaning it defaults to case "blank" for this variable.

I have gone through the entire site and have not found any links with incorrect syntax in the url as an example, like this

http://www.forcefedtv.com/index.php?channels=movies&theatre=selitoya&info=se litoya

Maybe my syntax is wrong when using &s? I am not a php programmer so after a few trys, this gave me the result of sending multiple variables to the script.

Could you elaborate on how to implement if bad info is sent along to have a default case for the switch?

Thanks for the reply, any other thoughts?
Oct 1 '07 #3
Motoma
3,237 Expert 2GB
Could you elaborate on how to implement if bad info is sent along to have a default case for the switch?
Expand|Select|Wrap|Line Numbers
  1. switch($a)
  2. {
  3.   case 1:
  4.     echo "one!";
  5.     break;
  6.   case 2:
  7.     echo "two!";
  8.     break;
  9.   default:
  10.     echo "Pick one or two!";
  11.     break;
  12. }
  13.  
Oct 1 '07 #4
sickboy
14
Much obliged, I am testing it out right now.

Are you sure the syntax should not look like this?

default:
include ('blank.php');
break;

I thought thought you use include (''); for each case. Also, I dont need to put case before default?

Tim
Oct 1 '07 #5
sickboy
14
I put in the default script and I am still getting the same issue. I have a friend of mine online and he ha confirmed that this issue is only with IE6. He has not seen the black screen issue on IE7.

Should I try it with your syntax?

Any thoughts?
Oct 1 '07 #6
sickboy
14
My friend also recommended it could be a cashe issue but I dumped the cash on my bosses pc in ie6 and it still gave me the same issue.

What I dont understand is I have used this same script on 3 sites and now it is giving me issues. The only explanation is on this one I am using 3 variables, not just one, so maybe it is to much work for my server?

Aehhh, this is frustrating, spent 2 weeks on this and now problems.

Thanks!
Oct 1 '07 #7
Motoma
3,237 Expert 2GB
You should turn on error messages as I have delineated in this thread.

Most likely what is happening is that a parse error in one of your included files is causing an error. Turn on debugging messages and tell me what errors you get back.
Oct 1 '07 #8
sickboy
14
I get an error of:

Notice: Undefined index: channels in /home/forcefed/public_html/index.php on line 5

When I put your error listing code in. I did notice this only showed up on the hom page, but nothing else.

<?php
error_reporting(E_ALL);
ini_set('display_errors', True);

$channels=$_GET['channels']; if (empty($channels)) { $channels='blank'; } changechannels($channels);
$theatre=$_GET['theatre']; if (empty($theatre)) { $theatre='splash'; } changetheatre($theatre);
$info=$_GET['info']; if (empty($info)) { $info='noinfo'; } changeinfo($info);



function changechannels($channels) {

echo '<table align="center" border="0" cellpadding="0" cellspacing="0" width="770">';
echo '<tr>';
echo '<td width="130" align="center" valign="top">';
echo '<table align="center" border="0" cellpadding="0" cellspacing="0" width="130">';
echo '<tr>';
echo '<td width="130" align="center" valign="top">';
include ('main.php');
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td width="130" align="center" valign="top">';

switch ($channels)
{
case 'blank':
include ('blank.php'); break;

case 'tv':
include ('/home/forcefed/public_html/tvfiles/tv.php'); break;

case 'movies':
include ('/home/forcefed/public_html/moviefiles/movies.php'); break;

case 'musicvideos':
include ('/home/forcefed/public_html/musicvideofiles/musicvideos.php'); break;

case 'animation':
include ('/home/forcefed/public_html/animationfiles/animation.php'); break;

default:
include ('blank.php');
break;

}}

function changetheatre($theatre) {
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</td>';
echo '<td width="640" align="center" valign="top">';
echo '<table align="center" border="0" cellpadding="0" cellspacing="0" width="640">';
echo '<tr>';
echo '<td width="640" align="center" valign="top">';

switch ($theatre)
{
case 'splash':
include ('splash.php'); break;

case 'movie':
include ('movie.php'); break;

case 'tv':
include ('tv.php'); break;

case 'musicvideos':
include ('musicvideos.php'); break;

case 'animation':
include ('animation.php'); break;

case 'detroit':
include ('detroit.php'); break;

case 'info':
include ('info.php'); break;

case 'bowlingfortrophies':
include ('/home/forcefed/public_html/tvfiles/bowlingfortrophies/bftpilotep1/bftpilotep1.php'); break;

case 'bftpilotep1':
include ('/home/forcefed/public_html/tvfiles/bowlingfortrophies/bftpilotep1/bftpilotep1.php'); break;

case 'bftpilotep2':
include ('/home/forcefed/public_html/tvfiles/bowlingfortrophies/bftpilotep2/bftpilotep2.php'); break;

case 'buriedman':
include ('/home/forcefed/public_html/moviefiles/buriedman/buriedman.php'); break;

case 'selitoya':
include ('/home/forcefed/public_html/moviefiles/selitoya/selitoya.php'); break;

case 'selitoyatrailer':
include ('/home/forcefed/public_html/moviefiles/selitoyatrailer/selitoyatrailer.php'); break;

case 'endcall':
include ('/home/forcefed/public_html/moviefiles/endcall/endcall.php'); break;

case 'thepaperboy':
include ('/home/forcefed/public_html/moviefiles/thepaperboy/thepaperboy.php'); break;

default:
include ('splash.php');
break;
}}



function changeinfo($info) {
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td width="640" align="center" valign="top">';

switch ($info)
{
case 'noinfo':
include ('noinfo.php'); break;

case 'bowlingfortrophies':
include ('/home/forcefed/public_html/tvfiles/bowlingfortrophies/bftinfo.php'); break;

case 'bftpilotep1':
include ('/home/forcefed/public_html/tvfiles/bowlingfortrophies/bftpilotep1/bftpilotep1info.php'); break;

case 'bftpilotep2':
include ('/home/forcefed/public_html/tvfiles/bowlingfortrophies/bftpilotep2/bftpilotep2info.php'); break;

case 'buriedman':
include ('/home/forcefed/public_html/moviefiles/buriedman/buriedmaninfo.php'); break;

case 'selitoya':
include ('/home/forcefed/public_html/moviefiles/selitoya/selitoyainfo.php'); break;

case 'selitoyatrailerinfo':
include ('/home/forcefed/public_html/moviefiles/selitoyatrailer/selitoyatrailerinfo.php'); break;

case 'endcall':
include ('/home/forcefed/public_html/moviefiles/endcall/endcallinfo.php'); break;

case 'thepaperboy':
include ('/home/forcefed/public_html/moviefiles/thepaperboy/thepaperboyinfo.php'); break;

default:
include ('noinfo.php');
break;

}}

echo '</td>';
echo '</tr>';
echo '</table>';
echo '</td>';
echo '</tr>';
echo '</table>';

include ('footer.php');
?>
Oct 1 '07 #9
Motoma
3,237 Expert 2GB
When you view the source of your rendered page, is the proper HTML there?
Oct 1 '07 #10
sickboy
14
When you view the source of your rendered page, is the proper HTML there?
As far as I can tell. I have a friend who tested this on his pc with ie6 and thinks it has something to do with the javascript I am running. On my site, I have quite a few videos that use a javascript to run the flash video. Either there is a glitch with that or I am going to have to go with the Flash provided html to run them.

I will post this in the javascript forum, but any thoughts would be great,


<script type="text/javascript" src="http://www.forcefedtv.com/swfobject.js"></script>
</script><div id="fp1" class="flowplayerlp">Flash</div>
<script type="text/javascript">
// <![CDATA[
var fo = new SWFObject("http://www.forcefedtv.com/FlowPlayerLP.swf", "FlowPlayer", "640", "398", "9", "#ffffff", true);
fo.addParam("AllowScriptAccess", "always");
fo.addParam("allowFullScreen", "true");
fo.addVariable("config", "{ progressBarColor1: 0x3333CC, progressBarColor2: 0xFF0000, thumbs: [ { thumbNail: 'http://www.forcefedtv.com/thumbs/1.jpg', time: 12}, { thumbNail: 'http://www.forcefedtv.com/thumbs/2.jpg', time: 45}, { thumbNail: 'http://www.forcefedtv.com/thumbs/3.jpg', time: 79}, { thumbNail: 'http://www.forcefedtv.com/thumbs/4.jpg', time: 145}, { thumbNail: 'http://www.forcefedtv.com/thumbs/5.jpg', time: 228},{ thumbNail: 'http://www.forcefedtv.com/thumbs/6.jpg', time: 363}, { thumbNail: 'http://www.forcefedtv.com/thumbs/7.jpg', time: 447}, { thumbNail: 'http://www.forcefedtv.com/thumbs/8.jpg', time: 466}, { thumbNail: 'http://www.forcefedtv.com/thumbs/9.jpg', time: 593}, { thumbNail: 'http://www.forcefedtv.com/thumbs/10.jpg', time: 908}, { thumbNail: 'http://www.forcefedtv.com/thumbs/11.jpg', time: 1047}, { thumbNail: 'http://www.forcefedtv.com/thumbs/12.jpg', time: 1110}, { thumbNail: 'http://www.forcefedtv.com/thumbs/13.jpg', time: 1124}], showPlayListButtons: false, playList: [ { overlayId: 'play' }, { url: 'http://www.forcefedtv.com/moviefiles/selitoya/selitoya.flv' }], autoBuffering: true, loop: false, initialScale: 'orig', useNativeFullScreen: true }");
fo.write("fp1");
// ]]>
</script>


Thanks!
Tim
Oct 2 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: Josh | last post by:
I was wondering if anyone could point me in the direction for information to solve the following problems with my site (under development). The URL is...
4
by: richard | last post by:
Hi there, I have a problem that is probably very simple but I need a solution quite quickly.. usual stuff... new to .net etc but would appreciate a heads up... I have a user logged in to my...
2
by: Adrian | last post by:
Hi, I am running an ASP.Net application (v1.1.4322) on an NLB cluster of 2 web servers. I have an intermittent problem where sometimes button click events do not get registered upon postback....
3
by: John Kotuby | last post by:
Hi all, Within an IFRAME of a standard site constructed of mostly static HTM type pages, I am calling up one page from a large ASP.NET 3.5 site. I have precompiled the ASP.NET site and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.