Sheen Posted September 30, 2009 Share Posted September 30, 2009 Hello, I have a PHP website, and it basically don't work with xampp for some reason, the whole webpage don't show, more information is in this picture: http://i36.tinypic.com/33e1pwp.jpg Quote Link to comment https://forums.phpfreaks.com/topic/176008-help-with-my-website/ Share on other sites More sharing options...
tommyboy123x Posted September 30, 2009 Share Posted September 30, 2009 Try unparsing the PHP code when the xampp code begins; One guess I have is that when the xampp code begins, it tries to start a new "<?php" when it has already been opened. I could tell you a little more if I saw the code / website Quote Link to comment https://forums.phpfreaks.com/topic/176008-help-with-my-website/#findComment-927431 Share on other sites More sharing options...
Sheen Posted September 30, 2009 Author Share Posted September 30, 2009 Ok here it is: <? include "systems/title.php"; include "config.php"; include "functions.php"; include "antisql.php"; include "systems/banneduser.php"; include "systems/checkcookie.php"; if(!$opened == 0){ if ($_GET['header'] == 1){ if (file_exists("systems/system_" . $_GET['do'] . ".php")) { include "systems/system_" . $_GET['do'] . ".php"; } } } ?> <html> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <head> <meta name="keywords" content="gunz, systemgunz, gunz system, sgunz, systemgames, l2 system, lineage, gunbound, cash, mu, wow, warcraft, the duel, grandchase, ragnarok"> <meta http-equiv="Content-Language" content="br"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title><?=$servername?> - <?=$pagetitle?></title> <link rel="stylesheet" type="text/css" href="images/style.css"> <script language="JavaScript" src="functions.js"> </script> </head> <body background="images/bg2.jpg"> <tr> <div align="center"> <? $banners = array('header.png', 'header1.png'); $totalbanners = count($banners); $totalbanners--; $randombanners = rand(0,$totalbanners); $link = array('index.php?do=index'); echo "<a href=\"$link[$randombanners]\"> <img border=\"0\" src=\"images/banners/$banners[$randombanners]\"></a>";?> <table width="920" height="265" id="table1" style="border-collapse: collapse"> <tr> <td background="images/nav_bar.png" width="911" height="28" class="menu" valign="middle"> <p align="center"><a href="index.php?do=index"><?php printf( $_STR[index1] ); ?></a> | <a href="index.php?do=register"><?php printf( $_STR[index2] ); ?></a> | <a href="index.php?do=download"><?php printf( $_STR[index3] ); ?></a> | <a href="index.php?do=ranking&expand=1"><?php printf( $_STR[index4] ); ?></a> | <a href="index.php?do=myclan"><?php printf( $_STR[index5] ); ?></a> | <a href="index.php?do=staff"><?php printf( $_STR[index6] ); ?></a> | <a href="http://www.systemgunz.com/local/" target="_blank" ><?php printf( $_STR[index7] ); ?></a> | <a href="http://www.orkut.com.br/Main#Community.aspx?cmm=57436614" target="_blank" ><?php printf( $_STR[index8] ); ?></a> | <a href="index.php?do=paypal" target="_blank" ><font color="#FFFF00"><?php printf( $_STR[index9] ); ?></font></a> | <a href="index.php?do=cashshop&sub=listallitems&expand=1&page=1"><?php printf( $_STR[index10] ); ?></a> | <a href="index.php?do=regras"><?php printf( $_STR[index12] ); ?></a> </tr> <tr> <td height="163" background="images/main_bg.png"> <table border="0" style="border-collapse: collapse" width="919" height="100%" id="table2"> <? if ($_GET['expand'] == 1){ if (file_exists("systems/system_" . $_GET['do'] . ".php")) { include "systems/system_" . $_GET['do'] . ".php"; $include = "1"; } } ?> <tr> <td width="917" colspan="5" height="26"><table width="100%" border="0"> <tr> <td><center><? include "systems/anuncios/index.txt"; ?></td> </tr> </table></td> </tr> <tr> <td width="10"> </td> <td width="208" valign="top"> <div align="center"> <? include "systems/system_ilogin.php" ?><br> <? include "systems/system_status.php" ?><br> <? include "systems/system_idiomas.php" ?><br> <br><br> </div> </td> <td width="481" valign="top"> <? if($opened == 0){ include "systems/system_offline.php"; }else{ if (isset($_GET['do'])) { $_GET['expand'] = 0; if (file_exists("systems/system_" . $_GET['do'] . ".php")) { include "systems/system_" . $_GET['do'] . ".php"; } }else{ include "systems/system_index.php"; } if(isset($default)){ include $default; } } ?> <td width="206" valign="top"> <p><? include "systems/system_clanranking.php" //Mostra top 7 Rankings do Server?><br> <? include "systems/system_playerranking.php" //Mostra os top 10 players do server?> </p> <p> </p> <p> </td> <td width="12"> </td></tr></table> </td> </tr> <tr> <td background="images/footer.png" height="62"><table width="100%" height="30" border="0"> <tr> <td height="44" ><? include "systems/system_parceiros.php"; ?> <br> <br> </td> </tr> </table> <div align="center"><a href="index.php?do=sejaparceiro">Seja um Parceiro você também!</a></div> </tr> </table> </div> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-9353643-1"); pageTracker._trackPageview(); } catch(err) {}</script> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-8655408-2"); pageTracker._trackPageview(); } catch(err) {}</script> </body> </html> It is long I know Quote Link to comment https://forums.phpfreaks.com/topic/176008-help-with-my-website/#findComment-927439 Share on other sites More sharing options...
mikesta707 Posted September 30, 2009 Share Posted September 30, 2009 try long php tags. IE <?php instead of <? Quote Link to comment https://forums.phpfreaks.com/topic/176008-help-with-my-website/#findComment-927454 Share on other sites More sharing options...
Sheen Posted September 30, 2009 Author Share Posted September 30, 2009 Ok I tried that, now I get this: http://i38.tinypic.com/fxqtsy.jpg It then goes to an object not found error, at the url ends in -> /$url I have never seen that before. Quote Link to comment https://forums.phpfreaks.com/topic/176008-help-with-my-website/#findComment-927471 Share on other sites More sharing options...
tommyboy123x Posted September 30, 2009 Share Posted September 30, 2009 this might sound dumb, but shouldn't "<?=" be "<?" in the title? could you change that to "<?php" ? Quote Link to comment https://forums.phpfreaks.com/topic/176008-help-with-my-website/#findComment-927504 Share on other sites More sharing options...
RussellReal Posted September 30, 2009 Share Posted September 30, 2009 do you have php installed..? btw add me to msn or aim I want to discuss something with you but I might be goin to sleep soon, but add me anyway drop me a message and I'll hit you up later Quote Link to comment https://forums.phpfreaks.com/topic/176008-help-with-my-website/#findComment-927506 Share on other sites More sharing options...
cags Posted September 30, 2009 Share Posted September 30, 2009 If it's xampp, in the xampp/php/php.ini file there is an option called short_open_tag, if that is set to Off your code will cause troubles, you can either change the property in the php.ini file to On. Or alternatively best practice would be to replace all <? with <?php (which I think you've already done), but another short tag style your using is <?= $whatever ?> you will need to change all instances like that to <?php echo $whatever; ?> (don't forget the semi colon). Quote Link to comment https://forums.phpfreaks.com/topic/176008-help-with-my-website/#findComment-927576 Share on other sites More sharing options...
Sheen Posted September 30, 2009 Author Share Posted September 30, 2009 If it's xampp, in the xampp/php/php.ini file there is an option called short_open_tag, if that is set to Off your code will cause troubles, you can either change the property in the php.ini file to On. Or alternatively best practice would be to replace all <? with <?php (which I think you've already done), but another short tag style your using is <?= $whatever ?> you will need to change all instances like that to <?php echo $whatever; ?> (don't forget the semi colon). Ok I have done that, and it fixed a few issues, here is what I have: But the rest of the content is still refusing to show. I am starting to guess xampp was not installed properly, should I try uninstalling and reinstalling? Quote Link to comment https://forums.phpfreaks.com/topic/176008-help-with-my-website/#findComment-927663 Share on other sites More sharing options...
marvelade Posted September 30, 2009 Share Posted September 30, 2009 this might sound dumb, but shouldn't "<?=" be "<?" in the title? could you change that to "<?php" ? it's a short tag for echoing variables <?= $var ?> is the short hand for <?php echo $var; ?> grtz, Marv Quote Link to comment https://forums.phpfreaks.com/topic/176008-help-with-my-website/#findComment-927674 Share on other sites More sharing options...
cags Posted September 30, 2009 Share Posted September 30, 2009 If you have changed values inside the php.ini file you will need to restart Apache to get them to take effect. As you left the URL of your site in your image I took a look at the page, there is still code inside <? ?> short_code_tags, and that code is just being inserted into the HTML file as text (because your server doesn't know to process them). If you view source on your site, you'll see what I mean, that PHP code should never be visible to a visitor of your site. Quote Link to comment https://forums.phpfreaks.com/topic/176008-help-with-my-website/#findComment-927675 Share on other sites More sharing options...
marvelade Posted September 30, 2009 Share Posted September 30, 2009 And chances are, if <? ?> doesn't work, <?= ?> will also not work.... better straighten this out first. Quote Link to comment https://forums.phpfreaks.com/topic/176008-help-with-my-website/#findComment-927676 Share on other sites More sharing options...
Sheen Posted September 30, 2009 Author Share Posted September 30, 2009 If you have changed values inside the php.ini file you will need to restart Apache to get them to take effect. As you left the URL of your site in your image I took a look at the page, there is still code inside <? ?> short_code_tags, and that code is just being inserted into the HTML file as text (because your server doesn't know to process them). If you view source on your site, you'll see what I mean, that PHP code should never be visible to a visitor of your site. Ok I got that working now it just these errors that appear : Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'Recorde'. (severity 16) in C:\xampp\htdocs\GunzSite\systems\system_index.php on line 11 Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\GunzSite\systems\system_index.php on line 11 Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'Recorde'. (severity 16) in C:\xampp\htdocs\GunzSite\systems\system_index.php on line 14 Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\GunzSite\systems\system_index.php on line 14 Warning: mssql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\GunzSite\systems\system_index.php on line 15 Warning: mssql_query() [function.mssql-query]: message: Incorrect syntax near '<'. (severity 15) in C:\xampp\htdocs\GunzSite\systems\system_index.php on line 19 Warning: mssql_query() [function.mssql-query]: Query failed in C:\xampp\htdocs\GunzSite\systems\system_index.php on line 19 On the index page: http://i38.tinypic.com/13z9644.jpg Quote Link to comment https://forums.phpfreaks.com/topic/176008-help-with-my-website/#findComment-927816 Share on other sites More sharing options...
cags Posted September 30, 2009 Share Posted September 30, 2009 Never user mssql so difficult to say for certain. Can we see the PHP lines in question, I'm sure the error will stand out. Quote Link to comment https://forums.phpfreaks.com/topic/176008-help-with-my-website/#findComment-927831 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.