Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By rgracia on
I get the error:
Fatal error: Call to undefined function drupal_current_script_url() in /home/rgracia/public_html/update.php on line 251
After uploading the 7.10 update to my site running 7.9 and attempting to run update.php. I can access the admin area, just can't run update.php to complete the upgrade. What can I do? Can't find anything on google with drupal 7 sites having this issue. Please help!
Comments
Here's the code in that
Here's the code in that block; lines 232 through 255:
Strange. It resolved itself.
Strange. It resolved itself. I did have to delete the files from my server and replace them with the new core, even though Dreamweaver was supposed to replace them anyway during sync.
I'm having the same problem.
I'm having the same problem. Replacing the code with the above didn't work. I'm at a loss on what to do.
katragina I had to
katragina I had to specifically delete the update.php twice and re upload the one included on 7.10, then clear the cache several times and also on my browser. Then it worked. Hope that helps.
Hi! You just have to re
Hi! You just have to re upload the update.php from your original installation file. Then you may be able to proceed with the database update. Hope this works for you
I have exactly the same error
I have exactly the same error and clearing caches or re-uploading the update.php file did not help.
Any other ideas?
Hello, Try to check 2 files,
Hello,
Try to check 2 files,
Install.inc includes/ directory
system.install modules/system directory
try to find the the original from Drupal version and re-upload.
Regards,
Wow! This worked. Thank you
Wow! This worked. Thank you very much!
That worked for me to!
Great suggestion. That worked for me too. Question: I purchased a template that specifically asked me to replace these 2 files with the ones that came with the template. I backed them up anyways just in case and replaced them with those that come with Drupal core. Should I place them back after I've run my maintenance successfully?
Had the same error and couldn't update my databases until....
I opened the file includes/install.inc and checked if the function was defined. It wasn't, so I added the function from Drupal in the file:
function drupal_current_script_url($query = array()) {
$uri = $_SERVER['SCRIPT_NAME'];
$query = array_merge(drupal_get_query_parameters(), $query);
if (!empty($query)) {
$uri .= '?' . drupal_http_build_query($query);
}
return $uri;
}
Then, update.php worked and all my module updates were run in the database and all the errors went away.
It worked for me!
Thanks, it work like a charm!
It worked for me!
Thanks, it work like a charm!
it works
Thanks, your editing works.
I had that problem with a template of TemplateMonster, and now works.
Thank you again!
Thanks, worked for me too
Thanks psimchick, adding drupal_current_script_url to the bottom of includes/install.inc worked for me also.
PS, as with some others, I had originally updated this file from a template from templates.com ...