I just tried to add a block containing a php script, but I messed up the path name, and now I'm getting this error:
Fatal error: (null)(): Failed opening required 'http://www.mysite.com/calendarix/cal_config.inc.php' (include_path='.:/usr/local/lib/php') in /usr/www/users/mysite/drupal/includes/common.inc(1150) : eval()'d code on line 2
and I can't get into the admin page or anything else. Before I go making things worse because I don't really know what I'm doing (I do know what I did wrong as far as the path name goes though), I thought I should ask for help. How do I undo this? Is there a file where I can just fix the path name and reupload it, or have I thoroughly messed up my database now, and need to reinstall?
Thanks!
Comments
Empty/edit the block via database
PHP code for the block is contained in the table 'boxes'. You can edit / delete the code there.
--
When your problem is solved, please post a follow-up to the thread you started.
thanks ... still can't get php code to work
I tried creating an empty calendarix/cal_config.inc.php file within the drupal directory, but that didn't work. So I went into the boxes table and deleted the row that had the bad php code, and that worked. But then I went back in and created the block again and put in the php code with what I thought was the correct path name, but now I'm getting the same error message:
Fatal error: (null)(): Failed opening required ' /usr/www/users/srcnyc/calendarix/cal_config.inc.php' (include_path='.:/usr/local/lib/php') in /usr/www/users/srcnyc/drupal/includes/common.inc(1150) : eval()'d code on line 2
I know the php code works; I've used it on other pages. How do I get drupal to find the file in the calendarix directory? I can't move or copy the calendarix directory into the drupal directory; I'm using that database elsewhere on my site.
If I can't get this to work, is there a good calendar drupal plugin? Ideally, I'd like something where visitors can post events on the calendar, and then I can also display the day's or week's events in a block on the front page.
Thanks again!
shot in the dark
is it possible you have you an extra space that shouldn't be there at the beginning of the file location?
' /usr/www/users/srcnyc/calendarix/cal_config.inc.php'
^- here
'/usr/www/users/srcnyc/calendarix/cal_config.inc.php'
^- without space
eureka!
HEY, THAT WAS IT!!!!
Thank you so much! It's sort of working now, but at least it's not breaking the whole site! It's pulling the data from the main calendar enough to know that there are 33 events on the calendar for May, and you can switch from month to month, but none of the days are clickable and the mouseover, which is supposed to make a list of the day's events pop up, isn't working. But I'll figure it out ... thanks again!
In case you're curious, you can see it here (at least once the cache refreshes): http://www.letsdoitontheroad.com/drupal
THANKS AGAIN!!!
lol, it's always the little things
lol, it's always the little things that make the biggest mess. I tried your site, but it gave me an error about a missing .css file.
if you want the popup stuff to work, you might need to get drupal to insert the javascript instead of your calendar program.
dummy file
or you could create an empty file named 'calendarix/cal_config.inc.php' and the site should work again. After you fix your mistake, remove the empty file.