I want to use semaphore functions. The installation instructions reads
Support for this functions are not enabled by default. To enable System V semaphore support compile PHP with the option --enable-sysvsem . To enable the System V shared memory support compile PHP with the option --enable-sysvshm . To enable the System V messages support compile PHP with the option --enable-sysvmsg .
But I'm running XAMPP for Linux. Does this mean it's impossible for me to use semaphore functions? I'd also like to know exactly why one has to recompile all of PHP instead of, say, tweaking a php.ini setting or adding a new module.
You'll most likely have to recompile. Unless you can find it has a plug in but something called System V Shared memory im going to assume wouldn't come as a plugin :(
In fact, a quick google came up with this http://www.php.net/manual/en/sem.installation.php , so no sorry :(
No not at all, you only need to get a version of XAMPP that has the extension available. Alternatively you can compile PHP yourself.
Because the modules sources are part of PHP sources. You then compile everything into the PHP binary and not into a shared library file. It's just the design of the module. For tweaking your php.ini as you coin it, you would need an external library file, see the PHP
ext
directory.if u cant enable an option look at your cofiguration file (in this case php.conf or php.ini on windows). this will help u see the option if if its installed. if its not installed get a version of XAMPP with this feature installed or you have to recompile
Unless you use a pre-compiled binary for your system, PHP compiles everything that you specify for your system. For example, if you need MySQL support but not MSSQL support for databases PHP will not compile the MSSQL libraries required for that type of database connection. You could compile PHP with all options to have all the libraries, but usually you will not need all of them.
In short, the system doesn't have the compiled library for PHP to load.
If you need to recompile depends on if you can find pre-compiled binaries for your system. I am not sure about XAMPP for linux.
ServerFault of the same type of question:
How to --enable-dom without recompiling PHP?