Demonic Posted November 7, 2007 Share Posted November 7, 2007 If so how to use it, if not how to possibly use it on a online linux server? Quote Link to comment Share on other sites More sharing options...
aschk Posted November 7, 2007 Share Posted November 7, 2007 That's the PEAR library right? You can just install it in your directory (if it's not available already, on the server) and then use ini_set("include_path", <path here>) to set the path to the PEAR directory. Might be worth outputting ini_get("include_path") to see what you have already. Quote Link to comment Share on other sites More sharing options...
Demonic Posted November 7, 2007 Author Share Posted November 7, 2007 That's the PEAR library right? I don't know? http://pecl.php.net/index.php Quote Link to comment Share on other sites More sharing options...
trq Posted November 7, 2007 Share Posted November 7, 2007 See here. Funny, I found that link by clicking the first Documentation link in the page you linked to. Quote Link to comment Share on other sites More sharing options...
Demonic Posted November 7, 2007 Author Share Posted November 7, 2007 See here. Funny, I found that link by clicking the first Documentation link in the page you linked to. hehe real funny right? Show me where you can upload to your server and use the extensions.(I'm not an idiot thats the first place I looked, trying to be witty right?) Quote Link to comment Share on other sites More sharing options...
trq Posted November 7, 2007 Share Posted November 7, 2007 If you want to upload an extension to your server you can either simply download the extension from pecl (it is simply a repository), compile it locally and then upload the *.so file to your server. Or, do all this (same steps as above) from your server. You do realise that pecl extensions need to be compiled? And that you would normally need root access to the server to be able to install them? Quote Link to comment Share on other sites More sharing options...
aschk Posted November 7, 2007 Share Posted November 7, 2007 Ah yes, Pear USES PECL Quote Link to comment Share on other sites More sharing options...
Demonic Posted November 7, 2007 Author Share Posted November 7, 2007 well vbulletin does it I'm pretty sure, how would you compile extensions?(or is this just C++ Code i could use DevCPP to compile it...) Quote Link to comment Share on other sites More sharing options...
trq Posted November 7, 2007 Share Posted November 7, 2007 OK, we'll get some stuff straight. Extensions are written in C. The mysql extension is one such extension, GD another. Allot of these come bundled within php's source code, others are made available via the PECL repo. Compiling an extension is pretty simple... especially on linux. Once the extensions has been compiled however you then need to place the *.so file within php's extension directory. This is usually located within the /usr/lib directory somewhere and is owned by root. If your using (standard) shared hosting you would need to conact your host and ask them if they could install the extension for you. Some, shared hosts ive heard however allow you to use your own custom environment and thus also allow for your own extesnions to be built. You will normally have shell access to these types of accounts. Sorry, but I don't have allot of experience with shared hosting, I run my own servers. Quote Link to comment Share on other sites More sharing options...
Demonic Posted November 7, 2007 Author Share Posted November 7, 2007 Then what does the dl() function do? http://us2.php.net/dl Quote Link to comment Share on other sites More sharing options...
trq Posted November 7, 2007 Share Posted November 7, 2007 Firstly, as of php5, dl() has been depricated within web envirnments. It should only be available within the cli. But yeah, dl() dynamically loads extensions by name. The extensions need to be within your extensions directory. You would use this to dynamically load extensions which haven't been defined with your php configuration. Quote Link to comment Share on other sites More sharing options...
Demonic Posted November 7, 2007 Author Share Posted November 7, 2007 Firstly, as of php5, dl() has been depricated Where would the source of this information be located, and I guess I'm out of luck I'll do more searching... Quote Link to comment Share on other sites More sharing options...
trq Posted November 7, 2007 Share Posted November 7, 2007 In the manual. The way it works is... Within the php.ini is a directive called extension_dir, here you can list the directory where all dynamically loadable extensions reside. The php.ini file is loaded once when the server starts, so this directory cannot be changed on a per user basis. I have however (as I said earlier) heard of some shared hosting giving you your own environment. I think this is done using php as cgi instead of the normal module way. Do you have access to your own php.ini on the hosting you use? If so... (I'm not 100% sure/don't use shared hosting), you may actually be able to define your own extension_dir. Quote Link to comment Share on other sites More sharing options...
trq Posted November 7, 2007 Share Posted November 7, 2007 OH, and ps. Just because dl() has been depricated it can still be used if turned on within the php.ini. There is however probably good reason it has been made depricated. You'll need to find these reasons yourself as I'm not sure what they are. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.