TinyPortal

Development => Support => Topic started by: knat on May 30, 2007, 09:31:08 AM

Title: [SOLVED]Some articles just stopped working overnight.. and they cant be restored
Post by: knat on May 30, 2007, 09:31:08 AM
So i woke up this morning and i was unable to access my site..

IE says the page is unavailable.. and firefox just shows up blank..

I find out that i can still access forum and admin pages directly..

After more investigation i find thet it is the php article that i vae at the bottom of my frontpage that is causing the trouble... i change the php code inside the article.. and vupti my page is back online... i cange it back to the original code and the page is gone again..

Same thing goes for my Control Panel.. its gone..

But in article manager it is there ??

So i try to make a new php article and put in the same code but that wont show either.. other php articels wors fine..

So only two articles stopped working over night.. was i hacked.. did i have an error in my DB ?

This is the code i use for Control Panel.. any reason it should stop working ??

loadLanguage('controlpanel', $user_info['language']);
echo'
<table border="0" width="100%" id="table1" cellspacing="8" cellpadding="6"  style="border-collapse: collapse">
<tr>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=account"><img border="0" src="usercp/ksysguard.png" width="80" height="80"></a></font></td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=theme"><img border="0" src="usercp/kivio.png" width="80" height="80"></a></font></td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2">
<a href="http://www.gapeindex.dk/index.php?page=6"><img border="0" src="usercp/hand.png" width="80" height="80"></a></font></td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=forumProfile"><img border="0" src="usercp/kuser.png" width="80" height="80"></a></font></td>
</tr>
<tr>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=account">', $txt[account],'</a><br/>',$txt[accounttxt],'</td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=theme">',$txt[layout],'</a><br>',$txt[layouttxt],'</td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="http://www.gapeindex.dk/index.php?page=6">',$txt[rules],'</a><br>',$txt[rulestxt],'</td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=forumProfile">',$txt[personalize],'</a><br>',$txt[personalizetxt],'</td>
</tr>
<tr>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=statPanel"><img border="0" src="usercp/kwalletmanager.png" width="80" height="80"></a></font></td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=showPosts"><img border="0" src="usercp/kedit.png" width="80" height="80"></a></font></td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=notification"><img border="0" src="usercp/mailreminder.png" width="80" height="80"></a></font></td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=editBuddies"><img border="0" src="usercp/kdmconfig.png" width="80" height="80"></a></font></td>
</tr>
<tr>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=statPanel">',$txt[stats],'</a><br>',$txt[statstxt],'</td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=showPosts">',$txt[messages],'</a><br>',$txt[messagestxt],'</td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=notification">',$txt[reminders],'</a><br>',$txt[reminderstxt],'</td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=editBuddies"><b>',$txt[buddies],'</b></a><br>',$txt[buddiestxt],'</td>
</tr>
<tr>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=pmprefs"><img border="0" src="usercp/mail.png" width="80" height="80"></a></font></td>
<td align="center" width="25%" valign="top">
<a href="http://www.gapeindex.dk/?action=profile;sa=subscriptions"><img border="0" src="usercp/messenger.png" width="112" height="80"></a></td>
<td align="center" width="25%" valign="top">
<a href="http://www.gapeindex.dk/index.php/board,33.0.html"><img border="0" src="usercp/help.png" width="80" height="80"></a></td>
<td align="center" width="25%" valign="top">
<a href="', $scripturl, '?action=pm;sa=send;u=1"><img border="0" src="usercp/agent.png" width="80" height="80"></a></td>
</tr>
<tr>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=pmprefs">',$txt[private],'</a><br>',$txt[privatetxt],'</td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="http://www.gapeindex.dk/?action=profile;sa=subscriptions">',$txt[partnership],'</a><br>',$txt[partnershiptxt],'</font></td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="http://www.gapeindex.dk/index.php/board,33.0.html">',$txt[helpme],'</a><br></font>',$txt[helpmetxt],'</td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="', $scripturl, '?action=pm;sa=send;u=1">',$txt[contact],'</a><br></font>',$txt[contacttxt],'</td>
</tr>
<tr>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2">
<a href="http://www.gapeindex.dk/index.php?action=Bookmarks"><img border="0" src="usercp/flag.png" width="80" height="80"></a></font></td>
<td align="center" width="25%" valign="top">
<a href="http://www.gapeindex.dk/index.php?action=.xml;sa=news;limit=10;type=rss2"><img border="0" src="usercp/rss.png" width="80" height="80"></a></td>
<td align="center" width="25%" valign="top">
<a href="', $scripturl, '?action=search"><img border="0" src="usercp/find.png" width="80" height="80"></a></td>
<td align="center" width="25%" valign="top">
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><img border="0" src="usercp/logout.png" width="80" height="80"></a></td>
</tr>
<tr>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="http://www.gapeindex.dk/index.php?action=Bookmarks" target="_self">',$txt[mybookmarks],'</a></font><br>',$txt[mybookmarkstxt],'</td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="http://www.gapeindex.dk/index.php?action=.xml;sa=news;limit=10;type=rss2">',$txt[myfeed],'</a><br>
</font>',$txt[myfeedtxt],'</td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="', $scripturl, '?action=search">',$txt[mysearch],'</a><br>',$txt[mysearchtxt],'</td>
<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '" target="_self">',$txt[mylogoff],'</a><br>',$txt[mylogofftxt],'</td>
</tr>
</table>
';
Title: Re: Some articles just stopped working overnight.. and they cant be restored ? W
Post by: G6Cad on May 30, 2007, 09:52:57 AM
As it seems to be the article thats brings the error, i think it would be better if you post the article in code tags here for the coders to look at.
The code you posted now seem to be ok.

In your other post you said the index.php file were changed, have you looked so the file is complete with all code needed in it ?
If you are unsure replace it with a backup and see if it helps.

For your questions about DB error ? The only on that can answer that is you i think as it's you that have access there  ;D
Title: Re: Some articles just stopped working overnight.. and they cant be restored ? Wierd
Post by: knat on May 30, 2007, 10:00:43 AM
The code i posted above wont even work in a new article.. it gives me page can not be found.. if i put different code everything is fine.. but this code just stopped working..

About the index.php file.. nothing was changed.. and i installed one from my backup.. no changes..

The article i had on my frontpage i deleted because i panic.. and i did not really need it.. so now i just use a blank article for my frontpage..

But im unable to restore my control panel

This is the link to my control panel with the code i put in the above post.. and all options turned off: http://www.gapeindex.dk/index.php?page=58

Would it not show an error at the least ?? Instead of just page not found.. if i make a new article the result is the same http://www.gapeindex.dk/index.php?page=60
Title: Re: Some articles just stopped working overnight.. and they cant be restored ? W
Post by: G6Cad on May 30, 2007, 11:00:26 AM
You have locked your forum from guest view so i cant see anything from the links you posted.
Title: Re: Some articles just stopped working overnight.. and they cant be restored ? Wierd
Post by: knat on May 30, 2007, 11:06:02 AM
Quote from: G6â„¢ on May 30, 2007, 11:00:26 AM
You have locked your forum from guest view so i cant see anything from the links you posted.


ok its open for guests now..  check it out.. blank in firefox.. page not found in IE :(

I have another code that works just fine.. but that is not using textstrings for translation

http://www.gapeindex.dk/index.php?page=13

Edit: i closed it again.. dont feel safe lol.. also closed for new members  ;D

Hope you see that this is truely strange  :o
Title: Re: Some articles just stopped working overnight.. and they cant be restored ? Wierd
Post by: knat on May 30, 2007, 02:49:11 PM
After some more investigation..

If i remove this line the article works again (but without text ofcourse)


loadLanguage('Controlpanel', $user_info['language']);


But this worked fine yesterday.. what can cause this ? Did my host chage something in the php settings ??

Please help me bring back my controlpanel  :P



EDIT: Yes i got it to work  :)  :)  :D  :)  :)  :2funny:

I added this line to the code


global $user_info, $txt;


But why has it been working for so long and stopped working suddenly ?  :o
Title: Re: Some articles just stopped working overnight.. and they cant be restored ? W
Post by: G6Cad on May 30, 2007, 04:03:00 PM
Can you send me a temp admin account in PM so i can look behind the curtains there ?

It might be that your host have changed some thing.
Title: Re: Some articles just stopped working overnight.. and they cant be restored ? Wierd
Post by: knat on May 30, 2007, 04:12:10 PM
Thanks for offering.. but i fixed the problem by adding that line of code..   ;)

And thanks trying to help me out  ::)  :)

I will mark this topic solved  :)
Title: Re: Some articles just stopped working overnight.. and they cant be restored ? W
Post by: G6Cad on May 30, 2007, 04:13:40 PM
PHU, im glad you solved it, but it doesent explain why it worked yesterday, but no to day  :D
Title: Re: [SOLVED]Some articles just stopped working overnight.. and they cant be restored
Post by: knat on May 30, 2007, 04:21:43 PM
Quote from: G6â„¢ on May 30, 2007, 04:13:40 PM
PHU, im glad you solved it, but it doesent explain why it worked yesterday, but no to day  :D

No and why my social bookmark snippet also stopped working so nobody was able to enter my frontpage.. Bit since everything is fine now i dont want to spend anymore time on it.. already took to much time away from other things i had planned for today..

I did a complet backup of my forum so now my heart can beat normal again.. :D
Title: Re: [SOLVED]Some articles just stopped working overnight.. and they cant be rest
Post by: G6Cad on May 30, 2007, 04:26:21 PM
I know the feeling when you just arrive to a blank page with nothing when you expect a site you have spent hours building up  :D
Title: Re: [SOLVED]Some articles just stopped working overnight.. and they cant be restored
Post by: knat on May 30, 2007, 04:31:04 PM
Yes, it has become a full time job  :) And i enjoy it very much..  :)

I be damned if some scriptkiddie or some hosting technician is going to mess it all up  :tickedoff: