Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8702341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:37:45+00:00 2026-06-13T02:37:45+00:00

I am attempting to run php scripts from a perl script on my goDaddy

  • 0

I am attempting to run php scripts from a perl script on my goDaddy shared hosting. The PHP script I originally wrote exceeds their 120 sec time limit and the mySQL memory limit, so I am breaking the script up into several parts.

I want this to all run as one cron job, so I want to call a single perl script that runs 4-5 php scripts.

This is for my website, run with Drupal 7.

I’ve written a perl script with the following content:

my $command = '/web/cgi-bin/php5 -q $HOME/html/phpscript1.php';
exec ($command) or print STDERR "couldn't exec $command: $!";

Which calls a php scripts containing something like the following:

<?php

define('DRUPAL_ROOT', getcwd());

include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
....
do stuff
....
?>

But when I run this from perl (tried in both my $HOME directory and html directory) I see the following problems when I run the script (where XXXXXX is my godaddy account folder):

<b>Notice</b>:  Undefined index:  SCRIPT_NAME   
<b>/home/content/05/XXXXXXX/html/includes/bootstrap.inc</b> on line <b>1627</b><br />
<br />
<b>Notice</b>:  Undefined index:  REMOTE_ADDR in    
<b>/home/content/05/XXXXXXX/html/includes/bootstrap.inc</b> on line <b>2802</b><br />
<br />
<b>Notice</b>:  Undefined index:  argc in
<b>/home/content/05/XXXXXXX/html/includes/bootstrap.inc</b> on line <b>3290</b><br />

I’ve deduced that these are issues with FastGCI and that I probably need to define/export/point these index/variables to something, but I have been unable to find out what do to after extensive searching.

The PHP script copies images from an external server to my server using CURL

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T02:37:46+00:00Added an answer on June 13, 2026 at 2:37 am

    You’re getting php notices because you’re bootstrapping Drupal in your custom php script, and those variables are not defined on the cli.

    That php script would probably be better implemented as a Drush command. Drush already sets up all the variables Drupal expects to be defined, and gives you a framework for easily running custom code in an instance of Drupal. Even if you didn’t want to bother writing a custom command, you could just use drush’s script command like so:

    drush scr $HOME/html/phpscript1.php
    

    Also, it’s worth pointing out that those are just php notices. It’s unlikely they are causing any issues with your script.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attempting to run a command as root from a php page, is
I'm attempting to run a SSH command from a remote server with PHP's ssh2
As a customer in Plesk, I am attempting to run: php -q /httpdocs/_external/export/test.php From
I'm attempting to run an application on the server, invoking it from PHP using
I'm attempting to run the following command in PHP (on Ubuntu): <?php if (exec(/home/johnboy/ffmpeg/ffmpeg
I'm attempting to run kohana classes in the install.php file but am having no
I am attempting to work locally on a PHP application which I cloned from
I'm getting the following error when attempting to run my build script. /var/lib/jenkins/jobs/IPS (trunk)/workspace/build.xml:62:
In jQuery Mobile, I am attempting to run scripts on a page at load
Say you have a large PHP project and suddenly, when attempting to run it,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.