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 8363227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:07:36+00:00 2026-06-09T12:07:36+00:00

I have a problem with running the script using scheduled cron jobs. The thing

  • 0

I have a problem with running the script using scheduled cron jobs. The thing is that when I run the php script using the browser it is executed without any problems/failures etc.
But when I try to run it using crons or SSH I get weird errors:

Notice: Undefined index: HTTP_USER_AGENT in /home/loves/public_html/parser/shop_parse_class.php on line 125
PHP Notice: Undefined offset: 0 in /home/loves/public_html/parser/shop_parse_class.php on line 481
PHP Notice: Undefined offset: 1 in /home/loves/public_html/parser/shop_parse_class.php on line 482
PHP Notice: Undefined variable: cat in /home/loves/public_html/parser/shop_parse_class.php on line 538

As you can see from the errors it shows that, for example the option HTTP_USER_AGENT doesn’t exist for the CURL, which is kinda weird. Maybe the problem is with the environment variables, however I have poor knowledge of linux system.

  • 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-09T12:07:37+00:00Added an answer on June 9, 2026 at 12:07 pm

    You should add the -A or --user-agent parameter to the cURL call.
    You can set anything you want as user agent this way.

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

Sidebar

Related Questions

I have a problem, I'm running a script and the PHP line duplicates to
I have a PHP script (running on a Linux server) that ouputs the names
I have a script running watir-webdriver(using Firefox 4.0) that needs to access a web
I have a strange problem here. I am using a directory script running off
I have a script that runs fine in the browser, however fails when run
I have php scripts that I have to run on linux as well as
I am generating new xml file using perl script but I have small problem,
I have a php script that divides a task into multiple parts and runs
I have an R script that runs just fine when I run it from
In a long running Ant script, I have a target that gets called roughly

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.