-1

Yesterday, i was searching for techniques to push and pull information into an app that I'm playing with. In my research, I happened to come across the following PHP script:

    <?php 
    $url = 'http://www.example.com'; 
    $output = file_get_contents($url); 
    echo $output; 
    ?>

I tried it out on with a Joomla website that I'd put together a while ago. Was pretty cool. It pulled all of the information and displayed it on the new url. Groovy. I closed the url and removed this php file from the site.

Now...DRAMAS!! Today, I visited the url of my Joomla page today to edit a few minor content items I'd noticed, and...

Database Error: Unable to connect to the Database: Could not connect to database

I've logged into the control panel and tried to look into the database through phpMyAdmin through the control panel...but its coming up blank! I mean, nothing. And the databases are showing 0Mb.

I checked the FTP login and all files and folders seem to be in place as per usual.

Does anyone know what has happened?

Francisco
  • 10,918
  • 6
  • 34
  • 45
cpardon
  • 487
  • 4
  • 24
  • 3
    The file_get_contents certainly can not destroy your database on the remote site; however, the call to the actual URL you used might have arbitrary effects.. – fast Sep 25 '14 at 08:31
  • 1
    Is your mysql server up and running? file_get_contents should have the same effect on your database as visiting the page with your browser. None that is. – Philip G Sep 25 '14 at 08:32
  • @fast Thanks for responding so...fast. Just received a message from Customer Care for the hosting: "We sincerely do apologize for the inconvenience caused. We have checked and there is a reported case about the server where the site is located. The MySql Server is offline. Our System Administrators is already aware about it. And they are doing their very best to resolve this the soonest possible time. Since it is affecting a lot of customers." – cpardon Sep 25 '14 at 08:35
  • @PhilipG I sort of thought that file_get_contents worked that way...sort of like an iframe, right? Seemed harmless. But...the timing of this was way too close to be coincidental. Thanks for you input though. – cpardon Sep 25 '14 at 08:41
  • @fast If I had enough reputation score, I'd vote you guys up 1. I don't seem to have that option yet. – cpardon Sep 25 '14 at 08:42
  • @PhilipG If I had enough reputation score, I'd vote your comment up 1. I don't seem to have that option yet. – cpardon Sep 25 '14 at 08:43

1 Answers1

0

file_get_contents should have the same effect on your database as visiting the page with your browser. None that is.

Philip G
  • 4,098
  • 2
  • 22
  • 41