ChompGator Posted September 6, 2008 Share Posted September 6, 2008 Hey, I have a calendar on one of my pages - and Im not sure if anything is wrong with my calendar...but uh - when uploading calendar.php to my server, the page is just blank, doesn't show anything - no calendar errors, no nothing - Would anyone know why that is? Thanks <here is the script> <?php $dbhost=""; // the url of your MySQL Server $dbuser=""; // the username of your MySQL Server $dbpass=""; // the password of your MySQL Server $dbname=""; // the name of your MySQL Database $tblname=""; // the name of your MySQL Database Table $tblDateName=""; // the name of your MySQL Table Date Field $tblContent=""; // the name of your MySQL Table Content Field $tblLink=""; // the name of your MySQL Table Link Field $SQL="SELECT ".$tblDateName.", ".$tblContent.", ".$tblLink." FROM ".$tblname; // Connect to Database and send the query $conID=@mysql_connect($dbhost,$dbuser,$dbpass); @mysql_select_db($dbname, $conID); $sqlID=@mysql_query($SQL); //Calendar Navigation variables $myurl=$_SERVER['PHP_SELF']."?css=".@$_GET['css']; // the links url is this page $yearID=false; // GET variable for the year (set in Active Calendar Class), init false to display current year $monthID=false; // GET variable for the month (set in Active Calendar Class), init false to display current month $dayID=false; // GET variable for the day (set in Active Calendar Class), init false to display current day extract($_GET); //Create a calendar object require_once("../source/activecalendar.php"); $cal=new activeCalendar($yearID,$monthID,$dayID); // Gets all dates from your database and set the calendar events html classes (for the layout) $eventID="event"; // sets the name of the generated HTML class on the event day (css layout) while ($data=@mysql_fetch_array($sqlID, MYSQL_BOTH)){ $mysqlDay=date("j",$data[$tblDateName]); // makes a day out of the database date $mysqlMonth=date("n",$data[$tblDateName]); // makes a month out of the database date $mysqlYear=date("Y",$data[$tblDateName]); // makes a year out of the database date $mysqlContent=$data[$tblContent]; // gets the event content $mysqlLink=$data[$tblLink]; // gets the event link $cal->setEvent($mysqlYear,$mysqlMonth,$mysqlDay,$eventID); // set the event, if you want the whole day to be an event $cal->setEventContent($mysqlYear,$mysqlMonth,$mysqlDay,$mysqlContent,$mysqlLink); // set the event content and link } ?> <?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head><title>Active Calendar Class with MySQL Events</title> <link rel="stylesheet" type="text/css" href="<?php print @$_GET['css'] ?>" /> </head> <body> <center> <?php $cal->enableDatePicker(2002,2010); // this enables the month's datepicker (year range 2002 - 2010) $cal->enableMonthNav($myurl); // this enables the month's navigation controls echo $cal->showMonth(); // this displays the month's view ?> <br /> <a href="../examples.php">Back to examples.php</a> </center> </body> </html> Link to comment https://forums.phpfreaks.com/topic/123046-nothing-to-see-on-this-script/ Share on other sites More sharing options...
PFMaBiSmAd Posted September 6, 2008 Share Posted September 6, 2008 You are probably getting a fatal runtime error and either the error_reporting or display_errors setting is preventing you from seeing the error. Add the following two lines after your <?php tag - ini_set ("display_errors", "1"); error_reporting(E_ALL); Your code also contains several @ to suppress errors. This will prevent all display or logging of the reason why the code is not working. You should not have any @ in your code. If you were having a problem that caused you to put them in, then the problem is still present and you need to find and fix the cause of the problem. Link to comment https://forums.phpfreaks.com/topic/123046-nothing-to-see-on-this-script/#findComment-635378 Share on other sites More sharing options...
ChompGator Posted September 6, 2008 Author Share Posted September 6, 2008 Ok, hey, removed @ symbols, now Im getting two fatal errors: Warning: require_once(../source/activecalendar.php) [function.require-once]: failed to open stream: No such file or directory in D:\hosting\member\264legion\site1\login\admin\activecalendar\indextry.php on line 30 Fatal error: require_once() [function.require]: Failed opening required '../source/activecalendar.php' (include_path='.;C:\php5\pear') in D:\hosting\member\264legion\site1\login\admin\activecalendar\indextry.php on line 30 PHP Warning: require_once(../source/activecalendar.php) [function.require-once]: failed to open stream: No such file or directory in D:\hosting\member\264legion\site1\login\admin\activecalendar\indextry.php on line 30 PHP Fatal error: require_once() [function.require]: Failed opening required '../source/activecalendar.php' (include_path='.;C:\php5\pear') in D:\hosting\member\264legion\site1\login\admin\activecalendar\indextry.php on line 30 If that means anything to anyone let me know, other wise, Ill be troubleshooting, - thanks for the help. Link to comment https://forums.phpfreaks.com/topic/123046-nothing-to-see-on-this-script/#findComment-635410 Share on other sites More sharing options...
BlueSkyIS Posted September 6, 2008 Share Posted September 6, 2008 the first one means require_once(../source/activecalendar.php) No such file or directory in D:\hosting\member\264legion\site1\login\admin\activecalendar\indextry.php on line 30 Link to comment https://forums.phpfreaks.com/topic/123046-nothing-to-see-on-this-script/#findComment-635413 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.