#1
  1. busy...is there any other way?
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Location
    Amersfoort, Netherlands
    Posts
    259
    Rep Power
    14

    running a c++ service on WinXP combined with PHP


    Hi,

    Hope I am in the right place with this, but I am looking all over for the following:

    I work with PHP mainly (only language I know actually) and have worked out a script but have trouble with the performance.

    Now to overcome these problems I'd like to read some data into RAM memory when the server is first booted and use the memorydata in the scripts.

    PHP has little possibilities for caching or similar stuff. The data is stored in a MySQL db and in plain txt files.

    I know it is possible to let PHP and C++ interact and thought of the following:

    write a c++ program which runs as a service on WinXP (the OS used). This program reads the data into memory and PHP interacts with the C++ program to get the data.

    Main issues with this solution for me are:
    - I haven't got a clue on how to write the C++ program
    - I don't know how to let PHP and C++ interact

    So my questions are obvious i guess:
    - Does anyone know where I can get the c++ code (it must be out there) as a template for the thing I need?
    - How do I let PHP and C++ interact?

    Help on this is (very) much appreciated.....it is the last bit of coding/tuning I need done before I can get my app online :D
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2002
    Posts
    361
    Rep Power
    13
    would the mysql HEAP table type solve your problem?

    http://www.mysql.com/doc/en/HEAP.html
    Little more than a playground for the bugs that live beneath us...
  4. #3
  5. busy...is there any other way?
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Location
    Amersfoort, Netherlands
    Posts
    259
    Rep Power
    14
    Nope...since it is not only data from MySQL...
  6. #4
  7. busy...is there any other way?
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Location
    Amersfoort, Netherlands
    Posts
    259
    Rep Power
    14
    I've managed the first part, writing a C++ program en load the data into memory...

    ...now for the second part...how do I reach this data with PHP?

    Thx for any help

IMN logo majestic logo threadwatch logo seochat tools logo