Hi!

I just entered a php code in a new block which caused my site pages be blank!

I want to remove the block manually because I cant see any of the pages(for deleting it with the normal way) can somebody refer or tell me what is the way to delete the block?

by the way, the code supposted to display data from my Shoutcast server(for the audio streaming) and was:

$open = fsockopen("ip.number","port"); 
if ($open) { 
fputs($open,"GET /7.html HTTP/1.1\nUser-Agent:Mozilla\n\n"); 
$read = fread($open,1000); 
$text = explode("content-type:text/html",$read); 
$text = explode(",",$text[1]); 
} else { $er="Connection Refused!"; } 
if ($text[1]==1) { $state = "Up";
echo "<font face=verdana size=1> 
 $text[6]
</font>"; } else { $state = "Down";
echo "<font face=verdana size=1>
server is not connected</font>"; } 
if ($er) { echo $er; exit; } 

I dont know why this is is not working and wrecked my whole site...

thank you good people :)

ori

Comments

_rajeev’s picture

As I understand, you are not able to see any pages - not able to access your site as Admin.

To come back to state where this code is disabled, you may try the following :
- use PhpMyAdmin to access your MySQL/Postgres database
- go to Variable table and browse the records, You should spot the code there - edit that record and remove that code
- after removing the new code you added, try accessing the site. It should work.

Accessing DB directly is not preferred, but may give you quick relief.

or’s picture

Do you know a way to search it in phpmyadmin?

_rajeev’s picture

When you are in PhpMyAdmin,
- open your DB
- select the "Variables" table.
- click on browse, it should show first 30 records
- it has two columns : name and value
- change pager settings so you can see all records (should be less than 700 records)
- see if you can spot the code in the value column

I am presuming the code is stored in variables table.

or’s picture

I just need to find a new code right now, at least everything is working. If you have any clue what wrong with the code so be nice. :) last time I putted that code I didn't get that kind of reaction. maybe because my IP and PORT are not activate at the last couple of days so it gets dome kind of error there.

Thanks bud, appreciate your help.

or’s picture

I just need to find a new code right now, at least everything is working. If you have any clue what wrong with the code so be nice. :) last time I putted that code I didn't get that kind of reaction. maybe because my IP and PORT are not activate at the last couple of days so it gets dome kind of error there.

Thanks bud, I appreciate your help.