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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:59:52+00:00 2026-06-03T07:59:52+00:00

I am working on a phpwebsocket application. I have to store the instance of

  • 0

I am working on a phpwebsocket application. I have to store the instance of the phpwebsocket every where in my app. I found a solution, that beeing with APC. And it doesn’t work.
The problem is that if I acces a file with apc_store(‘foo’, ‘bar’) from a script php that I run on php console, it won’t work. If I do a http request (using a browser.. ) it actually works, but I realy have to run the phpwebsocket from php console.

In php.ini :

[APC]
extension=php_apc.dll
apc.enabled = 1
apc.enable_cli = 1 
apc.shm_segments = 1
apc.shm_size = 64M
apc.max_file_size = 10M
apc.stat = 1

Thanks.

  • 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-03T07:59:53+00:00Added an answer on June 3, 2026 at 7:59 am

    APC collects and stores cache within its process space. Since console apps start a new process every time, APC cache starts clean and therefore there is no performance gain.
    In case of apache mod, the process space is apache web server itself which stays alive.

    1) how about doing a wget URL on console instead of a standalone console php script? If you need output, use wget -O - URL. APC will work just fine. The restriction here is script does not get any physical file access.

    2)You could do a file_get_contents(URL) from within your console php console script and dump the contents. That way, you can call it from console and even have the advantage of shared APC cache. You also get physical file access here but there is one problem. URL fetching as files are OFF by default for serious security reasons. You may need to turn it ON in php.ini. Carefully verify your case before using it on production network.

    http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen

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

Sidebar

Related Questions

I used to have a small chat app(which was almost working), that uses PHP,
Working on a legacy ASP.NET application we've found that ASP.NET session gets used for
Working with a Lucene index, I have a standard document format that looks something
Working with SSRS and a SQL 2000 source, I have a stored procedure that
Working on a console application using Delphi 7, and have run into a problem.
Working with MySQL database. I have a store table. The store table has at
Working in an application that stores entities in redis as a serialized binary blob.
Working on a mobile app that needs to use a public API for accessing
Working on an html5 app for a touchscreen windows xp computer that will be
Working on a multi-tenant app where most of my models will have a tenant_id

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.