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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:44:49+00:00 2026-06-12T03:44:49+00:00

Collating some data week by week I serialized an array of the appropriate data

  • 0

Collating some data week by week I serialized an array of the appropriate data and output that to a temporary file using file_put_contents.

Inclusive of some output statements to try and establish what is happening the code looks like this:

    echo "<br/> collate session data <br/>";
    print_r($this->session_Data);
    $serialized_Array = serialize($this->session_Data);
    $file_Name =  'session_Data_' . $this->week_Number;
    echo "file_Name: " . $file_Name; 
    file_put_contents($file_Name, $serialized_Array);

The file name definitely gets updated appropriately and there is definitely data to output.

But this will only ever output the first weeks data to the tmp file.

I get no permission errors I get status 200 OK but no files are created.

Am I missing something here??

  • 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-12T03:44:51+00:00Added an answer on June 12, 2026 at 3:44 am

    You are writing the file in the same directory as the script. In a default configuration the webserver process has only read and execute rights in that directory.

    • create a separate directory for the files, and give the webserver process write permission to that folder.
    • give the webserver process write permission to the folder the script is in. Be aware that this can be a security issue.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a scraper that is collecting some data from elsewhere that I have
Here is my problem.A existed file named data.f,I use collating symbol 48,I want to
I'm trying to persist some data that I get from a form in a
I am collecting some data from database using var query and storing it in
I have a C# winform app that is collecting some data from console-based commands.
Given some sample data.xml file: <?xml version=1.0 encoding=utf-8?> <data> <categories> <category id=google> <name>Google</name> </category>
I'm parsing some data by using PHP and putting it into MySQL. But if
Hi I have an oracle database that stores some data. It contains some non
I am fetching some data having UTF8 collation ( utf8_unicode_ci ) from a MySQL
I have some Linux code that monitors our hardware by collecting temperatures, voltages, and

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.