Does PHP Load All The Extensions In The PHP.INI..
I am using Windows IIS with PHP5 CGI. When I want to use an extension
in PHP5 under Windows I enable the extension line in PHP.INI. (e.g.
extension=php_sqlite.dll).
Does PHP load all the extensions in the PHP.INI on every invocation of
a request? If I have 20 different extensions not all of them are used
on every page request. Is this inefficient?
Would using dl() be more efficient? And why is it being depracated
under 5?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How Can I Load Load Additional Extensions ?
My OS is Winxp . My web server is apache 2 which is installed as a NT service . My php version is 4.32 , and I extracted it into "c:php" . I run php as a apache module . I want to load Additional extensions .They are php_mbstring.dll, php_xslt.dll and php_domxml.dll . I have made changes to php.ini as follow. extension_dir = "c:phpextensions" extension=php_mbstring.dll extension=php_xslt.dll extension=php_domxml.dll then I restarted apache2 . but it told me that the modules could not be located .
Extensions, (Unable To Load Dynamic Library)
in the php.ini file, I've changed the extension dir: extension_dir="c:program filesPHPextensions" and I have php_sockets.dll in that directory. But adding the line 'extension=php_sockets.dll' to the php.ini file or adding 'dl('php_sockets.dll');' to the top of a .php file result in the same warning: Warning: Unable to load dynamic library 'c:program filesPHPextensionsphp_sockets.dll' - A device attached to the system is not functioning. I assume that it's finding the dll, because changing the directory to something obviously wrong gives a separate warning: 'One of the library files needed to run this application cannot be found.' But I'm not sure what else is going on to foul things up. I found an old, similiar thread (URL) and copied another .dll along with the sockets one to my windowssystem dir (WinME), changed the php.ini line, and came up with similiar results, unfortunately.
Extensions
I have to make the extension of the file "PHP3". I would like to change this to make it parse "PHP" and "PHTML" extensions also. I also would like to know how to designate an opening page to somthing other than "index.html".
Where Are The Extensions?
I've built PHP 5 on Solaris, and included --with-pgsql=<dirwhen i configured it. my test script seems to work, but extension_dir is pointing to an odd place (a directory that does not exist, in fact). I never made a php.ini file, so I assume it's getting set to some default. My question is, did the compile process actually make a php_pgsql.so file? or is support bundled into the executable?
Dll Extensions
I installed php 5.2.2 on my windows machine and apache 2.2.4. after a first configuration apache worked with php. then i installed mysql 5.0 to be able to run a cms on my machine. after some configuration tries php stopped working. apache log (the same of php.exe output) says: [Fri May 18 11:15:00 2007] [notice] Apache/2.2.4 (Win32) PHP/5.2.2 configured -- resuming normal operations [Fri May 18 11:15:00 2007] [notice] Server built: Jan 9 2007 23:17:20 [Fri May 18 11:15:00 2007] [notice] Parent: Created child process 2516 PHP Warning: PHP Startup: Unable to load dynamic library 'C:Program FilesPHPextphp_fdf.dll' - The specified module could not be found.are in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:Program FilesPHPextphp_interbase.dll' - The specified module could not be found.are in Unknown on line 0 Code:
Extensions Arrays
ok I have got variables (here is a example of then):- $type1 = ".jpg"; $type2= ".doc"; $type3 = ""; $type4 = ""; $type5 = ""; up to 10 different types. Here is the problem how would I get the files of those types to b displayed on the screen. As at different times there might b more or less extensions on the screen. Here is some of the coding of which I am planning that I am planning to adopt/change, but I can not work out how 2 get the different types 2 be checked.
Installing Extensions
I'm trying to install php 5.0.4 with Apache2 in directory c:php-5.0.4-Win32 I set extension_dir = "C:php-5.0.4-Win32ext" in php.ini I uncomment extension=php_mysql.dll Restart Apache and I get the error message PHP Startup: Unable to load dynamic library 'C:php-5.0.4-Win32extphp_mysql.dll' -the specified module could not be found but it is there... Am I doing something stupid?
PHP Extensions Win32
I'm trying to get some different extensions loaded and no matter what extension I try it always comes up with an error saying it could not find the module. Even though the pathname is correct. I have php loaded in c:php4 and the extensions c:php4extensions ; Directory in which the loadable extensions (modules) reside. extension_dir = "C:/php4/extenstions/" Here are the two changes I've made, Code:
Getting XML Extensions To Work
I am running PHP v4.3.1 on Apache 1.3.27 on Mandrake 9.1 (kernal 2.4.21- 0.13mdk) I tried running the phpSysInfo script ( http://phpsysinfo.sf.net/ ) and gave me the error "Call to undefined function: xml_parser_create() " And that is supposed to be a function used by the XML extension. I checked my php info ( http://svr2.vrillusions.com/info.php ) and there is no XML secion. I checked the XML section of the manual ( http://www.php.net/manual/en/ref.xml.php ) and said I needed to install expat. There was a precompiled RPM for mandrake so I got that installed, restarted apache and it still doesn't work. It seems like I would have to tell php somehow that I have XML now, but can't figure out how to do that. Any ideas?
Installing Gd Extensions On The IIS 5
I have downloaded the required gd extension file. i don't know how to install these extensions. i have followed the Process which is given in the documentation of these extension. but it is not working and generated errors. any body tell my the installation proccess of the gd extension.
Extensions And Serializer
I have created an extension in PHP. It implements a new serializer for the session manager. Unfortunately, the session extension is initialized first, and fails to see my extension.
CPDF Lib Extensions
I facing some problems with cpdf extension. I have done some PDF generation in the php application running on Windows/Apache Platform using php4.06. it runs fine. Now that I need to port the application over to Linux Redhat 7 platform. As i'm not very familiar with Linux, I face the problem of compiling and installing the cpdf.so extension. Can any experts show me the steps or tell me where to get the cpdf.so extension for php4.
Documenting PHP Extensions.
I've been developing a PHP extension and used ext_skel to generate the stubs for each function that I coded. At the begin of a function there is some meta information about the arguments and the return value. I would like to use that meta information to generate a document about the extension, in order to describe it to the users. Is there any tool out there able to help my in this task?
Problem Of Php Extensions
i want to make my php extensions work. first i run the ext_skel to create a new module named myext. ok ,the i have the mycxt dir, then i modifide the m4 file and ./phpize, make ,make install it all works fine but when i test the module by runining "php myext.php" it returns this: X-Powered-By: PHP/4.2.2 Content-type: text/html <br /> <b>Warning</b>: Unable to load dynamic library '/usr/lib/php4/myext.PHP_SHLIB_SUFFIX' - /usr/lib/php4/myext.PHP_SHLIB_SUFFIX: cannot open shared object file: No such file or directory in <b>/home/backup/php-4.3.4/ext/myext/myext.php</bon line <b>3</b><br /> PHP_SHLIB_SUFFIXFunctions available in the test extension:<br> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/backup/php-4.3.4/ext/myext/myext.php</bon line <b>9</b><br /> <br> Module myext is not compiled into PHP
Printer Extensions
I was wondering if anyone could tell me how to install/find the printer extensions for PHP. I just installed PHP 4.1.1 on Windows 2K, and I am feeling a bit clueless at this point.
Php Extensions With Cygwin
Has anybody managed to build a Php Extension (Loadable Module) under Cygwin. I tried to build the example first_module found on Under windows with Apache 2.0.48, I managed to compile it using cygwin compiler but I have the following message : Warning: dl(): Unable to load dynamic library 'c:phpextensionsfirst_module.dll' I only found tutorials using Visual Studio so any experience feedback about a similar problem would prove to be very usefull.
Creating Extensions
Where can I find any documentation about how you create an extension for PHP ?
Masking Extensions
I've created a script that dynamically generates an image. It is a php file that can be called inside of an image tag. The site that it will be used on mainly does not display images with php extensions. Is there any way I could give it a jpg extension and my server still process it as jpg? See the image below as an example. The site is somehow setup to where the image will change dynamically based on what the filename is. I really need to do it this way, any ideas?
Remove Extensions
Is there any way possible to remove the extension to make a url look from yoursite.com/index.php to yoursite.com/index?
Page Extensions....
I've been looking over some code and notice many use the following format (when doing and include) pagename.inc.php What effect does .inc have on a page that is included versus including a page without it? What am I missing? I did some search on web page extensions via google and couldn't find anything describing this.
Unable To Upload PHP Extensions
I've come across a wierd thing in my PHP configuration. Just yesterday, I upgraded everything I had. Apache to 1.3.22, PHP to 4.1, and MySQL to 3.23.46. Everything went well and I was up and running in no time and even got Zend Optimizer to work. The problem submerged when I started adding PHP extensions. The PHP 4.1 distribution contains a lot of extensions with it. I chose modules like zlib, gd, etc. For some reason I could not get LDAP module or PDF module to work. When Apache loads, I get this message:
Who Is Programming PHP Extensions Under Windows?
I want to programm a DLL for PHP under Windows. I´m using VC6++ and PHP V4.3.10. I made everything discribed in an example. (bindlib_w32, win32build...etc). After compiling my DLL (with the switch /MT) the DLL ist startet with PHP but I get the Error, that my DLL ist compiled with thread-Syferty=0 and PHP with ..=1. Where is my fault?
Compiling PHP Extensions In Visual C++
I'm busy porting a PHP-Extension written by the company I work for from Linux to Win32 (XP). Everything worked fine. I fixed the errors and warnings, copied the dll to the extensions directory, entered the dll as extension into php.ini and this is, where trouble starts. When PHP is called on apache starting up, it throws an error at me saying "Unknown(): Unable to load dynamic library '...' Module not found. Then I browsed through the source code of the extensions, that are included in the php-4.3.6-sources, to figure out, what they are doing different - and at this point, the story gets weird: I compiled the bz2-Project (no errors, no warnings), and replaced php_bz2.dll in the extensions-Folder with the version I just compiled - resulting in the same "Unknown(): ..." Error-Message for php_bz2.dll (of course I checked, that the original indeed works).
Building Php Extensions With Cygwin
Has anybody managed to build a Php Extension (Loadable Module) under Cygwin. I tried to build the example first_module found on http://www.zend.com/zendapi. It compiles and works well under linux. Under windows with Apache 2.0.48 or 1.3.29, I managed to compile it using cygwin compiler but I have the following message : Warning: dl(): Unable to load dynamic library 'c:phpextensionsfirst_module.dll (of course, the file is located in the good path) I only found tutorials using Visual Studio so any experience feedback about a similar problem would prove to be very usefull.
Cannot Use Sybase Extensions In PHP 4.3.3 (Windows)
When trying to connect with a MS Sql database, I get the "cannot find libct.dll" error. I've searched Google and have found a few threads but no resolution. Does anyone know how I can get a hold of these libraries?
Can't Find MySQL Extensions (PHP As CGI)
install of Apache 2, PHP5 as CGI and MySQL 4 on WinXP. Apache and PHP work fine, MySQL works fine in the command line, but I can't have PHP to find the MySQL extensions. I installed phpMyAdmin, and this is how I found out that PHP didn't find the extensions because I got this error message: "PHP Startup: Unable to load dynamic library 'C:/Arquivos de Programas/PHP5/php_mysql.dll'" I googled for this error message, and I didn't find anything useful because it seems that I don't have an extensions folder (?!) I searched for php_mysql.dll on my computer and I didn't find it. Did I forget to install extensions or something? These are the folders of the PHP installation folder: - sessiondata - uploadtemp And these are the files: - IISConfig.exe - install.txt - license.txt - php5ts.dll - php-cgi.exe It seems to me that there are files or folders missing...
Which Is Better: Static Or Dynamic Extensions?
I like the idea of compiling DSO modules for Apache. It allows me to turn on or off things we may or may not need at a given time (like mod_ssl, mod_auth_mysql, mod_auth_ldap, etc.) and also allows me to compile in new versions of modules without having to rebuild Apache from scratch. Now, when I build PHP, I tend to put in a lot of things. Like: ../configure --with-mysql=/usr --with-openssl --with-pdflib=/usr/local --with -bz2 --with-mhash --with-mcrypt ... etc. etc. All of these modules are things that we use, but some of them not very frequently. So I'm trying to learn more about PHP's dynamic extensions. I didn't even know that they existed, until I looked at the php.ini and phpinfo() output of the PHP version that comes with RedHat 9.0. I see that instead of doing things like: ./configure --with-mysql=/usr they do ./configure --with-mysql=shared,/usr So I guess my questions are: 1) Where can I learn more about PHP dynamic extensions? Maybe I'm looking in the wrong places, but the documentation on them seems to be quite light. 2) Can *any* module be compiled as a dynamic extension, just by putting "shared" in the appropriate place in the ./configure command? Or just a few? How can you figure out which ones can, and which ones can't? 3) What are the advantages and disadvantages to making dynamic extensions? I'm guessing that advantage=smaller core PHP and disadvantage=slower initial load time. Is that right? Anything else? 4) Similar to #3, is building dynamic extensions whenever possible considered a Good Thing? Or are most people just still building everything into a single monolithic libphp4.so ?
PHP5 Extensions For Web Hosting
Our company is setting up a php5 hosting environment for some of our clients, and I was wondering which extensions we should/should not support? We're installing from the FreeBSD ports collection.
Php Webservice Extensions On IIS, IIS Returns 404 On Php
I have but one in life. Miss Catherine thanked Macon, and we went into his room, which was furnished as an office, with books, papers, tin boxes, and so forth. Don't mind what Vaninadh says, good gentlemen! What must be done, said Frapples, is this. But never mind her. Of the Inner Temple, I believe? said Miss Clarissa, again glancing at my letter. Oh, very much so! But I wish you'd call me Uriah, if you please. So, with a great weight taken off my mind, I turned into a by-street that was the nearest way to school, and felt, upon the whole, relieved that they were gone; though I still liked them very much, nevertheless. 'A fraud on the Bank of England? I asked. His picture, as a boy, was there.
Eliminating File Extensions
I would like all of my webpages to stop displaying the ".php" or ".html" extensions. How do I do this without rewriting the URLs?
Php Initializes Extensions As Root
I'm having a problem, i've designed an php extension, that uses shared memory iteraction. Altought, Php is initializing the extension as root, leaving the shared memory with wrong permissions, as is created as root process. Is there any way to initialize extensions, not as root?
Linking PHP C++ Extensions With -lstdc++
I am trying to make a simple extension to PHP using C++. (Most of the extensions to PHP are just plain C.) I am working from the PHP documentation and this guide: http://bugs.tutorbuddy.com/phpcpp/phpcpp/index.html http://www.php.net/manual/en/zend.build.php My problem is that the link command that the build system uses doesn't include "-lstdc++" on it, leading to this error when you actually try to use the module: Warning: dl() Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20020429/cppext.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20020429/cppext.so: undefined symbol: __gxx_personality_v0 in /root/php-extension/php-4.3.4/ext/cppext/cppext.php on line 3 I know the issue will be solved if I can just get the link command to have -lstdc++ on it, because when I cut and paste that command to the prompt, add that flag, and install that hand-linked module, it works. My question is how to make that happen. I have tried a number of variations of the PHP_ADD_LIBRARY macro in config.m4 (in my extension directory). None of them work, even if I run ./configure and even re-run phpize. I am using apache 2.0.48, php 4.3.4, and after having these problems initially I have upgrade libtool to 1.5.2, automake to 1.8.2, and autoconf to 2.59. The OS is Redhat 9, with pretty much everything stock, except I removed the apache and php rpms and installed those from source. The autoconf/automake/libtool build systems that I have experience will use a Makefile.am file that is relatively simple and it is easy to figure out where to put additional files as you add them, includes, and linked librarys. There is no Makefile.am in the build system created by phpize; is config.m4 the standard place to add new source files, include directories, and linked libraries ? Finally, is there an example C++ extension to PHP on the web somewhere, that I might examine in order to copy it's build system ?
How To Get .html/.htm Extensions Read As .php
I have a site with a lot of preexsisiting links/pages that are of the .htm, .html extension but they need my basic php functions added to them. Anyone know how i can get them read as .php without having to rename every page and link?
Building Php Extensions With Cygwin
Has anybody managed to build a Php Extension (Loadable Module) under Cygwin. I tried to build the example first_module found on http://www.zend.com/zendapi. It compiles and works well under linux. Under windows with Apache 2.0.48, I managed to compile it using cygwin compiler but I have the following message : Warning: dl(): Unable to load dynamic library 'c:phpextensionsfirst_module.dll (of course, the file is located in the good path) I only found tutorials using Visual Studio so any experience feedback about a similar problem would prove to be very usefull.
Files And Directory Extensions
I'm currently running a website that generates dynamic images for users, for use in their signatures on forums. For example, I have created an image file (using PHP) and the address is http://www.website.com/tags/tag.php?u=Flava (an example). However, it seems that some forums block the ?u=Flava and so doesn't display it correctly - so instead, I would prefer to link to addresses such as http://www.website.com/tags/Flava.php (so that the users username, is in fact the filename). I know this is possible as I have seen it done elsewhere, however I am not too sure how to achieve it.
Extensions From Windows To Linux
Is there any way to get a windows extension located in the php/ext directory of my php to run off the linux side I'm trying to migrate to?
Enable Php Extensions On Shared Server?
I have a very cheap php-enabled linux hosting account. Unfortunately, this host does not have some extensions enabled which I need, namely, the dom-xml and xslt extensions. Assuming that the server admins ignore my pleas, is there a way to locally enable these extensions for my account, with a local copy of php.ini, or local copies of the proper *.so files, or some magic in the .htaccess file?
I Want To Use PHP Includes, But I Want .html File Extensions.
I'm an HTML guy with very little knowledge of anything programming related. However, I want to use PHP includes on a site I'm currently working on, because I want to be able to make site-wide updates often. So, with the little bit of PHP learning I've done, I got includes to work just fine and it's all perfect for what I need it for. The only problem is, all of the pages have to be whatever.php and whatever2.php in order for it to work. Thing is, I'd prefer if all of the pages on this site were whatever.html and whatever2.html. So my question is, is something like this possible, and, if so, how can I make it happen?
Extensions And MySQL.dll On WinXP PHP5
I'm hoping someone will give me the latest info here about PHP policy to enable extensions. [Preferably not - "Move them around under C:Windows until it works ..." ] I've installed PHP5 in C:PHP Meaningful excerpts: from php.ini ; Directory in which the loadable extensions (modules) reside. extension_dir = "./" ..... ;extension=php_msql.dll extension=php_mysql.dll TIA for your advice on this.
Newbie Zend Studio And Extensions
Trying to use Zend Studio 3.5.2 on WinXP, have run into problems. How do you add extension in this environment? Added soap by putting it where it wanted it (c:/php5/*.dll). The various php.ini files have no effect for setting extension dir. Now it is complaining about my_sql not being there when clearly it is. Was making excellent progress with XAMPP and Dreamweaver. But hit brick wall with this product.
MX Looper/Kollection Dreamweaver Extensions
I have a project (a job, in fact) that requires a feature that Dreamweaver doesn't offer (now). I need a tool--or a concrete, functional technique--to create *nested repeat regions* in PHP and MySQL with multiple recordsets. Not "simulated nested repeat regions." Not "horizontal repeat regions." Not "horizontal/vertical repeat regions." Not ASP. Nested repeat regions with more than one recordset. I've googled the hell out of it. Most script snippets are feeble. Tom Muck's products don't handle multiple recordsets (to my knowledge). Interakt sold a Dreamweaver extension called "MX Looper" that seems to fit the bill perfectly. Unfortunately, the product (previously an affordable $30) is now bundled in a larger package called "Kollection" (now sold at $400!!!). I *strongly* suspect that Adobe (the new owner of Interakt) is purposely overpricing the Interakt product line so they can incorporate these features into the new interation of Dreamweaver. I'm all for a beefed-up version of Dreamweaver...especially one that incorporates the Interakt feature set. I'll pay for the upgrade when it comes out. I don't have time to wait that long, however. I also don't have $400 to buy features that I'll later get for the price of the upgrade. The Interakt acquisition (and subsequent overpricing) smells of a marketing ploy...and I'm stuck in the middle of it. Does anyone have a license of the MX Looper Dreamweaver extension they can sell me? A newer version is better, but I'll take an older one. I'd even consider a less-expensive version of "Kollection."
WinXP/IIS Set Up For PHP To Parse .html Extensions
I just installed PHP (4.3.3) on a WinXP (SP1) system using IIS (5.1) as the web server. I am using FrontPage 2002 and would like to be able to debug my PHP scripts locally. Since FP does not handle the .php extension as a web page (edit, display, navigation, etc.), I am trying to set it up to parse files with the .html extension. I have added the .php and .html extensions to the Application Configuration page of IIS and I have also applied some regedit changes suggested by the documentation. All to no avail. The .php extension works, the .html does not.
Ereg - Regexp For NOT Matching Certain Filename Extensions
Is there some way of using ereg to detect when certain filename extensions are supplied and to return false if so, WITHOUT using the ! operator before ereg () ? I have an API that allows as an input a regular expression, enabling the administrator to ensure a file upload matches a certain pattern. For instance, supplying the string '.exe$|.com$|.bat$|.zip$|.doc$' means that the file must end with any of these five extensions. Is there a way that the regexp could be rewritten to say that the file must NOT end with any of these, without changing the ereg to !ereg - I can't do the latter because it's within the class.
PHP Script For Gathering Form Data Without FP Extensions?
Is there a PHP script that I can "infuse" into a feedback or registration form that I have created in Front Page 2000, that I can use on a server without FP extensions that would allow me to gather the data into a hidden folder or be routed to an "MS Access" database? I am fairly new to PHP, but I know I would have to delete all those bothersome "webbot" scripting entries from the form first but can anyone please give me a jump start?
Remove File Extensions From A Directory List
I'm running a small script which lists files in a directory by last modified and with under scores in file names replaced with spaces. I'd also like to remove the file extension, but cant figure out how. I found this code. $ext = substr($value, -4); ....though i'm unsure how to implement it PHP Code:
Displaying A List Of All Modules (extensions) Installed
I just signed up for a web hosting service. They have PHP, but can't tell me which modules (extensions) are installed. Is there a function, or some other easy way, to show all modules (extensions) that are installed? phpinfo() doesn't do this.
Remove File Extensions Before Creating Links
i have some working code here that creats a list of links in the noted directory, but i would like it to remove file extenions. they are all word docs. also is there a way to force it to open in the browser? all computers will be running latest IE6 and maybe IE 7 in the future. Code:
Enabling (PHP5) OpenSSL Extensions When Signing A Certificate
I have been trying to enable/use specific OpenSSL extensions that I use in generating certificates manually, via PHP5 + php5-openssl module/extension. Filling out the "configargs" array with 'x509_extensions' and/or 'req_extensions' fails to generate/sign a certificate with the desired X.509 extensions included in the signed certificate. The extensions in my "openssl.cnf" file work just fine with manual OpenSSL commands. Also, I am not sure that the "configargs" array method of specifying an OpenSSL configuration file works properly. I have looked at the openssl.c code, and see that the signing code appears to use the certificate request extension, rather than a "regular" extension specification, thereby ignoring the 'x509_extension' argument. Actually, I find the entirety of the openssl.c code to be very confusing, but that is besides the point. SO - I want to be able to use OpenSSL extensions, via PHP5-OpenSSL, of ANY type as I can with manual OpenSSL commands (or modified CA.sh scripts) where the REQ or CA commands accept a "-extensions" parameter, but I haven't been able to get this to work yet.
|