Hello,

I had about 20 themes in my themes folder that I wasn't using so I decided to delete them. Once I did this, I started getting the following error:

* warning: include_once(./) [function.include-once]: failed to open stream: No such file or directory in /home/cm1967/cmccullough.net/www/html/includes/theme.inc on line 155.
* warning: include_once() [function.include]: Failed opening './' for inclusion (include_path='.:/usr/local/lib/php') in /home/cm1967/cmccullough.net/www/html/includes/theme.inc on line 155.

I went to the file themes.inc to see if I could see what could be causing this error but failed to figure it out. Has anyone seen this before?

Thanks

Comments

quikone’s picture

Have you tried manually running cron? If that doesn't work I would try running update.php

cm1967’s picture

thanks for the reply. how would i run cron?

cm1967’s picture

i ran cron and update.php and now things are actually worse (or appear to be). i'm receiving the same error but just many more lines of the same error.

thanks for the help.

quikone’s picture

Did you delete the themes from your directory? I wonder if the database still reflects the themes that are not actually there. Do you know how to run webmin or better yet phpmyadmin?

cm1967’s picture

hmmm.....i do know how to run webmin but i don't think i can do that on my host. i'm not hosting the site on a local machine, it's on my host. i may have to email the host and ask if i'm allowed to run this.

oh, and yes, i just deleted the themes from the directory. is there a different way that i should have done this?

thanks for the help. it's really appreciated.

cm1967’s picture

thankfully, i'm just in the beginning stages of building the site. i could, if needed, just do a reinstall. i don't want to have to do that but it's an option. screwing stuff up is all a part of learning...... :)

quikone’s picture

I am kinda new at this as well, but a few kind people on this site have taught me a little. You could try to re-add the themes. i would see if they will let you add phpmyadmin. It is a very useful tool. Look again at the installation instructions for Drupal. I tells you how to add I would start by looking here if you go this route. Or possibly someone has an easier solution. http://hostlibrary.com/phpMyAdminInstallationTutorialcpanelsharedhosting

cm1967’s picture

i tried reinstalling the themes but that didn't solve the issue. i really messed this one up. what i hate most is that i have no idea what i did that caused this.

quikone’s picture

Have you tried to re-install the theme that you are currently using? If not, try to switch to another theme if possible, if not I would look in to PHPMYAdmin.

mattyoung’s picture

What theme are you using? It looks like it's a derive theme and you have deleted its base parent theme. Take a look at your theme's .info file and see if it has a base parent theme and put that theme back.

cm1967’s picture

okay. i'll give that a shot.

thanks!

cm1967’s picture

here's the .info file on the theme that i am using. doesn't look like it has a base parent theme.

; $Id: a3_atlantis.info,v 1.1.2.6 2008/08/23 20:58:56 johnforsythe Exp $
name = A3 Atlantis
description = Tableless, multi-column, fixed width theme.
core = 6.x
engine = phptemplate
stylesheets[all][] = style.css
; Information added by drupal.org packaging script on 2008-08-23
version = "6.x-1.2"
core = "6.x"
project = "a3_atlantis"
datestamp = "1219526102"

actually, now that i think about it, i tried some other themes once this happened but still received the same error.

thanks.

iex’s picture

I'm having the same problem ... after running cron there are less identical errors displayed, but they still exist
still can't figure out wtf

iex’s picture

i couldn't find the solution, so i just deleted all tables from the databese, then deleted drupal from the host and then uploaded it and installed again. little work here is lost, but now everything works fine

gbrussel’s picture

If you were storing them in the "themes" directory that Drupal comes packaged with, then I can see where you might have gone wrong. If you were using the "sites/all/themes" folder, then I'm stumped.

In the default "themes" folder (same directory level as "sites"), there's a handy folder called "engines", with a subfolder "phptemplate" which includes a file called "phptemplate.engine". If you mistakenly deleted this folder/file, then yes, you'd be getting the errors you're seeing. That error on line 155 is trying to load the theme engine, as so:

<?php
153.  if (isset($theme->engine)) {
154.    // Include the engine.
155.    include_once './'. $theme->owner;
156.
157.    $theme_engine = $theme->engine;
158.    if (function_exists($theme_engine .'_init')) {
159.      foreach ($base_theme as $base) {
160.        call_user_func($theme_engine .'_init', $base);
161.      }
162.      call_user_func($theme_engine .'_init', $theme);
163.    }
164.  }
?>

If it can't find the engine...whoops :)

cm1967’s picture

ha! that was the issue, gbrussel.

thanks!

krisvlo’s picture

Wow, this was a stressy period! I experienced the exact same problem that was explained AND resolved here. Than you very much for that!
I've learned some things trying to find a solution:

  • My hosting provider offer phpMyAdmin, so that's good. However it means there's another thing to go and dig deeper in. My employer and girlfriend will probably not be very happy...
  • I need scheduled backups, which I have now...
  • 'cleaning up' can be dangerous if not done with care...
jfox77’s picture

Wow, thanks gbrussel! I had copied my site from one server to another and was getting the same type of error messages.

* warning: include_once(./) [function.include-once]: failed to open stream: No such file or directory in /home/cm1967/cmccullough.net/www/html/includes/theme.inc on line 155.
* warning: include_once() [function.include]: Failed opening './' for inclusion (include_path='.:/usr/local/lib/php') in /home/cm1967/cmccullough.net/www/html/includes/theme.inc on line 155.

It turns out when I copied the site the entire "themes" directory that's supposed to be at the root was missing. I copied the directory over and cleared my cache and it worked!

Ali.Ahk’s picture

I solved the problem by coping engines directory to Drupal themes. After that clearing all caches and then I see problem has been fixed ...
I got this information on Drupal Persian support team

shenpig’s picture

it works here the links.
--------------------------------
nike shox, air max

ignaciomacosta’s picture

The problem appears when delete sub folder´s the theme folder, including the ENGINE folder. To fix this you need to download the drupal installer to your pc and unzip. Then, search the Theme folder and compress in zip. then, in the file manager on your site, load the .zip theme in the theme folder the web, and descompress. the theme folder be restored.
sorry for my english.

timmay’s picture

This was exactly the problem, and the fix. Really had me scratching my head. It's so nice to find a solution that simply works for once.
Thanks gbrussel!

Bahson’s picture

getting the same error of D7 when I enable the new custom theme, any walk arounds?