HELP! warning: file_get_contents(

Events happening in the community are now at Drupal community events on www.drupal.org.
Tran's picture

I was working on trying to get a remote advertisement on my website and I complete fubarred by website.

Everything, from articles, to galleries to modules, to, well, everything, returns this error:

warning: file_get_contents(

I believe that if I could edit the advertiseement, I might be able to fix it. But there appears to be no way to edit anything.

www.blissfieldadvance.com

FYI I am using OP 1.6

Comments

I don't see the error,

irakli's picture

I don't see the error, anymore. Did you get it fixed?

.............................................
http://twitter.com/inadarei

Thanks Irakli

Tran's picture

I went into the ftp and erased the ad module. I'll reinstall and fix it.

Tran's picture

Each time I add the advertising module through FTP, my site goes down
warning: file_get_contents(

The front page loads fine. Clicking on any link takes you to the page, but instead of the content, I get:
warning: file_get_contents(

Any ideas about how I might fix the problem so I can reinstall the advertising module? I love that mod.

First, have you looked in

Adam S's picture

First, have you looked in your error_log? Often that's a good place to look and even better place to find information to share with developers. My favorite thing to do is take the error code starting from '/sites ...... the in line 393' and copy and paste it into the google toolbar. If anybody else has had this problem and wrote about it, you will find it.

Second, this might be an issue of write and read permissions for the server. What type of server are you using? I'm a noob at Drupal and spent two weeks of my life trying to get OP 1.5 onto a VPS with this problem. I still don't know how to do it but haven't had any problems with HotDrupal (11,000 pages views on Tuesday mostly between 9-10am, integrated with third party OpenX adserver and the Gallery2 image server , yeah!) What type of server are you using?

The problem with OP is that it's Drupal and most of the modules are Drupal. The people who specialize in the modules are not really associated with OP. Have you posted this issue in the advertising.module issue queue?

This also brings up the issue of scope. What should be discussed in GDO OpenPublish? Since advertising and classifieds for example are intricate features to publishing sites should they be discussed here rather than just in their respective module issue queues and in drupal.org forums? Perhaps, we could classify the problems that effect publishing websites and create taxonomy in the OP discussion group. Of course, I think Phase2 has, but I can't see them in the comment reply page. :)

Marine job board with Drupal 7 at http://windwardjobs.com

Cool site. A note about the

Adam S's picture

Cool site.

A note about the classified section:
I dropped the ed_classified module into my site and it worked very well. You might consider using it if you don't have time to create the views and CCK.

Here is a craigslist clone http://aswapathy.com/ads_100303/ . I actually typed the modules so I can learn how it works. I like the idea of variable focus on location which is different than craigslist. For example, you can search for all bicycles in Florida or focus it for just Miami. This classified module has a couple problems for me: the location module is limiting and it uses panels which I'm trying to get away from.

Right now I'm building a classified section with Taxonomy, CCK, views, Google Maps Tool's GeoTaxonomy, Context, and Slide Show Pro. If it ever gets done I'll package it as Feature. My site has been getting real estate listings, I going to help them, and I want to let people reverse geocode (anywhere in the world). The SSP Integration Module works perfect with node relationships so when listing an ad a person can add pictures to a slideshow using only one modal popup. The SSP module has views integration using a node ID passed as an argument so an attached view can be created -- I couldn't figure out how to make a View Slideshow using only one node so i went with SSP. The beauty of an attached view is Views wraps it in a div tag in a configurable .tpl file. So pulling it out and wrapping it into another div and floating it right or left is easy.

Each part works very well independently during testing. I just need to put it together. The whole thing has a lot of potential.

Marine job board with Drupal 7 at http://windwardjobs.com

@midek, is this the module

irakli's picture

@midek,

is this the module you are trying to install http://drupal.org/project/ad ?

The portion of the error message you are pasting here is too short. Can you paste fuller version of the error message, please?

It looks like your hosting provider may have file_get_contents() function disabled and since module is using it - that screws up things. But without seeing full error message, it is hard to say, what is wrong.

.............................................
http://twitter.com/inadarei

That's the module exactly

Tran's picture

That's the module exactly ...
Here's the deal ..
I had it the Ad module installed beautifully. My publisher wanted me to try a remote advertising feature and I stupidly inserted the Java script code into slot where you place the URL of an "external ad."
It didn't work.
But worse, it screwed up the php somehow, so that anytime I clicked a link, I got the error:
warning: file_get_contents(

The story didn't show. The pictures. The modules. Any link that involved processing returned:
warning: file_get_contents(

I tried to delete content. I tried to disable the ad.
But nothing worked.

So, I did something stupid. And I went into my FTP file structure and simply deleted the ad module.

It fixed the problem.
However, whenever I reupload the ad module, I have run into the exact same problem again.

there appears to be no way, that I know of with my extremely limited drupal and php knowledge, to reinstall the ad module.

Somehow, i think my site still thinks parts of the ad module are there. So when I upload the module, it starts functioning again. And, sadly, malfunctioning.

Sometimes if you uninstall a

Adam S's picture

Sometimes if you uninstall a module it leaves configurations about itself in the database, usually in the 'variables' table, that stay there for ever and anon. First, did you go to the uninstall menu tab of the modules page and uninstall the Ad module from the database? If not the database structure will still be intact. Second, did you backup the database before you did this? If that is the case, they you should just restore the database to the state before you added this code. Do you have the backup and migrate module installed? Is makes that process super easy. If you do not have a backup or can not revert the database then you have the option of searching through the database with phpMyAdmin which I'm sure someone will tell you is bad advice if your not totally sure what you're doing. (I love to break stuff to the point that it can't ever be fixed so I enjoy spending hours in phpMyAdmin.) Still, backup and dump your database. Do not even try if you don't fully understand how to restore the database. If that is the case, then don't do anything else until you know how to do that. Backup the database, then go search in the table 'variables' for a little piece of the string of JS code that you put in. Granted that I have never used that module so I wouldn't know for sure that is going on, if you ask this in it's issue queue they might be better equipped to help you through this one since someone might have also done something similar.

EDIT: I just re-read your issue. Because the code to UNINSTALL the module is in the module you will have to place the module code via FTP back into the modules directory. They you need to go to /admin/build/modules and enable it, click save, disable it, click save, and click on the 'UNINSTALL' tab at the top and uninstall it. If the configuration still persists read my message in the first paragraph. If it still persists then download the Schema module and have a look if there are extra tables (Schema module does lie so take what it says with a grain of salt). If tables of the Ads module still exist then they should be deleted, carefully.

Marine job board with Drupal 7 at http://windwardjobs.com

Yes, you should upload the

irakli's picture

Yes, you should upload the module code, make sure it is disabled. Do not enable it if it is disabled, or if it does not disable, you will have to edit its record in the {system} table to manually disable.

Once the module is disabled, go to "uninstall" tab in the modules page and uninstall the module. That cleans up all leftover module data.

After clean uninstall you can try to re-install.

You should check with your provider that they allow file_get_contents() calls though.

.............................................
http://twitter.com/inadarei

Disabling a module From the DB

mareshal's picture

If you are unable to access the /admin/build/modules (if you are facing the WSOD) , you can disable a module from the DB. In the "system" table, set status of the module to 0.

It is not enough to actually delete the module folder, since the module's DB records will still exist. so whenever you re-upload the module, the settings are gonna be like you never deleted it. A thing to do is to actually delete its record in the system table, and clear (empty) the cache table, BUT it is a safer practice to do as iRakli pointed if you can access the /admin/* .

Thank you,
Walid.
www.hibr.me

OpenPublish

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: