Hello,
I've been running Drupal for quite some time now, and I've always had a problem that I'm finally frustrated enough to try to fix.
For some reason, my system does not recognize drupal_get_path. I run into errors any time I try to install a module. So, what I end up needing to do is go into the .module file and change anywhere there's drupal_get_path to be the full path to that file it's looking at.
Any ideas how to fix this? Is this a drupal setting, or php?
Thank you for any help you can provide.
- jody
On 8/23/07, Jody Cleveland cleveland@winnefox.org wrote:
Hello,
I've been running Drupal for quite some time now, and I've always had a problem that I'm finally frustrated enough to try to fix.
For some reason, my system does not recognize drupal_get_path. I run into errors any time I try to install a module. So, what I end up needing to do is go into the .module file and change anywhere there's drupal_get_path to be the full path to that file it's looking at.
Any ideas how to fix this? Is this a drupal setting, or php?
Normally drupal_get_path gets the path of an item (module or theme) from the 'system' table of the database. The paths stored in the 'system' table are filled-in whenever you visit the /admin/build/modules or the /admin/build/themes page. So, they are easily updated if you move an item.
It would be interesting to take a look at the 'system' table to see if the paths stored there seem right. Look for paths of modules or themes which are causing you trouble. If they do seem right (for example 'sites/all/modules/nodequeue/smartqueue.module') then the problem could be in how the function works in your environment.
One possible cause of such a problem is a multisite with a shared 'system' table where different sites use their own copies of modules and themes with the same names, which are located in different paths (sites/example.com/modules), and whenever the /admin/build/modules page of one site is visited the shared 'system' table is updated differently.
Thank you for any help you can provide.
- jody
-- [ Drupal support list | http://lists.drupal.org/ ]
On 8/22/07 5:54 PM, "Cog Rusty" cog.rusty@gmail.com wrote:
On 8/23/07, Jody Cleveland cleveland@winnefox.org wrote:
Hello,
I've been running Drupal for quite some time now, and I've always had a problem that I'm finally frustrated enough to try to fix.
For some reason, my system does not recognize drupal_get_path. I run into errors any time I try to install a module. So, what I end up needing to do is go into the .module file and change anywhere there's drupal_get_path to be the full path to that file it's looking at.
Any ideas how to fix this? Is this a drupal setting, or php?
Normally drupal_get_path gets the path of an item (module or theme) from the 'system' table of the database. The paths stored in the 'system' table are filled-in whenever you visit the /admin/build/modules or the /admin/build/themes page. So, they are easily updated if you move an item.
It would be interesting to take a look at the 'system' table to see if the paths stored there seem right. Look for paths of modules or themes which are causing you trouble. If they do seem right (for example 'sites/all/modules/nodequeue/smartqueue.module') then the problem could be in how the function works in your environment.
One possible cause of such a problem is a multisite with a shared 'system' table where different sites use their own copies of modules and themes with the same names, which are located in different paths (sites/example.com/modules), and whenever the /admin/build/modules page of one site is visited the shared 'system' table is updated differently.
Thank you so much for taking the time to help me out with this.
I looked at the system table, and everything seems ok:
themes/engines/phptemplate/phptemplate.engine themes/garland/page.tpl.php themes/engines/phptemplate/phptemplate.engine modules/system/system.module sites/all/modules/actions/actions.module sites/all/modules/adminblock/adminblock.module modules/aggregator/aggregator.module
I also have this issue when trying to install modules that have drupal_get_path in the .install file. And, they won't install without putting in the full path. This instance is a multi-site setup. But, I've also got a sandbox site setup that is not, and it does the same thing. I've also got a personal account with an outside hosting place. That works just fine. So, I believe it may be something other than drupal. I'm completely stumped on this one.
- jody
Just solved it:
On 8/22/07 7:42 PM, "Jody Cleveland" cleveland@winnefox.org wrote:
On 8/22/07 5:54 PM, "Cog Rusty" cog.rusty@gmail.com wrote:
On 8/23/07, Jody Cleveland cleveland@winnefox.org wrote:
Hello,
I've been running Drupal for quite some time now, and I've always had a problem that I'm finally frustrated enough to try to fix.
For some reason, my system does not recognize drupal_get_path. I run into errors any time I try to install a module. So, what I end up needing to do is go into the .module file and change anywhere there's drupal_get_path to be the full path to that file it's looking at.
Any ideas how to fix this? Is this a drupal setting, or php?
Normally drupal_get_path gets the path of an item (module or theme) from the 'system' table of the database. The paths stored in the 'system' table are filled-in whenever you visit the /admin/build/modules or the /admin/build/themes page. So, they are easily updated if you move an item.
It would be interesting to take a look at the 'system' table to see if the paths stored there seem right. Look for paths of modules or themes which are causing you trouble. If they do seem right (for example 'sites/all/modules/nodequeue/smartqueue.module') then the problem could be in how the function works in your environment.
One possible cause of such a problem is a multisite with a shared 'system' table where different sites use their own copies of modules and themes with the same names, which are located in different paths (sites/example.com/modules), and whenever the /admin/build/modules page of one site is visited the shared 'system' table is updated differently.
It was a php setting. In my php.ini setting, I had this:
;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2" ;include_path = ".:/php/includes" include_path = ".:/usr/share/pear"
I changed that to this:
;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2" include_path = ".:/php/includes"
And, now it works just fine. Found the solution here: http://www.newmedialogic.com/taxonomy/term/57
Thank you again for taking the time to help me out with this!
- jody
On 8/23/07, Jody Cleveland cleveland@winnefox.org wrote:
Just solved it:
On 8/22/07 7:42 PM, "Jody Cleveland" cleveland@winnefox.org wrote:
On 8/22/07 5:54 PM, "Cog Rusty" cog.rusty@gmail.com wrote:
On 8/23/07, Jody Cleveland cleveland@winnefox.org wrote:
Hello,
I've been running Drupal for quite some time now, and I've always had a problem that I'm finally frustrated enough to try to fix.
For some reason, my system does not recognize drupal_get_path. I run into errors any time I try to install a module. So, what I end up needing to do is go into the .module file and change anywhere there's drupal_get_path to be the full path to that file it's looking at.
Any ideas how to fix this? Is this a drupal setting, or php?
Normally drupal_get_path gets the path of an item (module or theme) from the 'system' table of the database. The paths stored in the 'system' table are filled-in whenever you visit the /admin/build/modules or the /admin/build/themes page. So, they are easily updated if you move an item.
It would be interesting to take a look at the 'system' table to see if the paths stored there seem right. Look for paths of modules or themes which are causing you trouble. If they do seem right (for example 'sites/all/modules/nodequeue/smartqueue.module') then the problem could be in how the function works in your environment.
One possible cause of such a problem is a multisite with a shared 'system' table where different sites use their own copies of modules and themes with the same names, which are located in different paths (sites/example.com/modules), and whenever the /admin/build/modules page of one site is visited the shared 'system' table is updated differently.
It was a php setting. In my php.ini setting, I had this:
;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2" ;include_path = ".:/php/includes" include_path = ".:/usr/share/pear"
I changed that to this:
;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2" include_path = ".:/php/includes"
And, now it works just fine. Found the solution here: http://www.newmedialogic.com/taxonomy/term/57
Thank you again for taking the time to help me out with this!
- jody
Heh, so much for my theory of shared system tables! At least I learned something new.
[ Drupal support list | http://lists.drupal.org/ ]