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

  • Home
  • SEARCH
  • 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 8720043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:56:29+00:00 2026-06-13T06:56:29+00:00

Sorry, this was a bad question that I revised to make it less localized.

  • 0

Sorry, this was a bad question that I revised to make it less localized. I’ve learned to narrow down my questions to the actual cause. If anyone could up-vote the question so I can once again ask questions on stack I would be VERY grateful.

I keep getting an error from this line.

        $file = $files[ rand( 0, count( $files ) ) ];

It throws the timezone undefined, unset array or function already defined.

Notice: Undefined offset: 5 in
/home/public_html/adserve.php on line 15
adserve.php

Shared hosting so no access to the php.ini file.

  • 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-13T06:56:30+00:00Added an answer on June 13, 2026 at 6:56 am

    There are not random errors. The first one pretty much tells you what you need to do to fix it.

    In the second one, if line 15 of your code is this:

    $file = $files[ rand( 0, count( $files ) ) ];
    

    Then your undefined offset problem lies in the fact that the highest index value in a zero-indexed array like you are using will be count - 1.

    Thus your line should be

    $file = $files[ rand( 0, count( $files ) - 1 ) ];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OK sorry for my bad question.well my project is a asp site that a
Bad wording on the question, sorry about that. Will try to explain what I'm
Sorry this bad question but i must ask. I've got a flash site (I
Sorry if this is a a bad question but . . . I want
Sorry for the bad title, I've no idea what to call this question. I
Sorry for the bad question title. Let's say that I have DateRange class that
First : Appologize for my bad english. Sorry for this newbie software question, but
Sorry, this is a bad question. I don't even know what the title should
Sorry for my bad English. Just like what I asked. I have this class
At first sorry my bad English. I want define routing for this url: For

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.