Jump to content

Fordiman

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Fordiman's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Note: If you write a module in C++ for PHP (using VC6>), make sure you're still using the C naming conventions (/c), as not doing so will cause massive memory leaks and an ultimately failed compile.
  2. I don't know why that happens. I got around it by parsing everything out myself, which was a nice, inflamed pain in the ass. Have you tried building for 5.0.x? It doesn't seem to have that problem.
  3. Everything you just asked to know is readily available in the PHP manual.
  4. UPDATE: I've written the PHP extension to allow for opening resources as files in PHP (called resopen, resread, etc. For not-yourself files, you can even write resources via a simulated stream interface, but that's a memory hog for large files. I may work on self-rewriteing, but I wouldn't count on it.) Additionally, using a bit of code from Back Oriface 2000, I've managed to get PHP to load its DLLs from it's own resources (Resource type: DLLDATA). The next step is to have php bootstrap from win32.res://self/phpscript/1/1033, and to write an fopen wrapper (into php_peres.dll) so that resource files can be accessed with the existing file-handling functions.
  5. I'm currently working on a way to "compile" php scripts in Win32 in the following way. Current target: php_cli.bin - modified, compiled version of php_cli.c that will look in its own windows resources (PHPScript|1|1033) for the script to execute. Default CLI settings (no execution time limit, 32M Ram use) and the php_cli.ini will also be embedded. Optionally, the php(4|5)ts.dll (UPX --best compressed, about 1M in size) can be embedded for total portability. The .bin will be compiled for stealth (Set for Win32 GUI) mode, so Win API calls can be made to produce output without having to have an ugly console window. The "compilation" process is simply insertion of the target script into a copy of the CLI. Future targets: Default script resource to PHPScript|index.php|1033 and compile in an fopen wrapper that allows for embedding and inclusion of multiple PHP scripts (ie: win32.resource://otherfile.php ). Default gzip -9 compression of internal scripts to deter (not so much prevent) end-user tampering. Anyway, any tips anyone can pass my way would be great, especially in using gcc/gpp as my compiler for php under Win32 (I just don't have the cashish for VS).
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.