Reply to Re: Extension files not loading

Your name:

Reply:


Posted by Jerry Stuckle on 12/08/07 02:59

AnrDaemon wrote:
> Greetings, Jerry Stuckle.
> In reply to Your message dated Wednesday, December 5, 2007, 23:40:35,
>
>>>> Yes, the extensions are there, and the path being searched does depend
>>>> on how I set extension_dir.
>>>> The log file will faithfully reproduce the path I indicate in the line
>>>> reporting the error. For example,
>>>> extension_dir="C:\PHP\ext"
>>>> results in lines of the form:
>>>> "PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\PHP\
>>>> \ext\\php_sybase_ct.dll' - The specified module could not be found.\r
>>>> \n in Unknown on line 0"
>>> Add
>>> LoadFile path/to/SyBaseSharedDlls
>>>
>>> into Your httpd.conf before
>>>
>>> LoadModule php5_module
>>>
>
>> If an Apache module doesn't use those files it is not necessary to load
>> them in the Apache configuration.
>
> But it is the best way I found to ensure I have PROPER versions of DLL's
> loaded into workspace. And shared database libraries are for sure used by
> apache module - PHP handler. Through their extensions, of course, but again,
> You have too few variants to do the job.
>

Again - they are not used by Apache. They are used by the extensions.
A VERY BIG difference.

> 1. Place DLL's into shared folder, i.e. %SystemRoot%. Was recommended (place
> php#ts.dll into C:/Windows directory), but WORST solution.
>

A VERY BAD solution.

> 2. Add PHP location to %PATH% environment variable. Good enough but what if
> You want to use more than one PHP version? I have time while I have shared
> hosting with PHP4 and my local projects was written mainly in PHP5.
> What if You have many versions of the required DLL? I have MySQL installed
> along with PHP and they both have LibMySQL.dll in distro. Apache and PHP both
> have OpenSSL libraries in distro. Which one will be loaded into process?
> Highly depends on situation, but this ambiguity is unwanted and inappropriate.
>

Another VERY BAD solution.

> 3. Load libraries directly ensure that You have loaded what You need exactly.
> Wasting server config but looks less ambigous for me.
>

A third VERY BAD solution.
>
>> The PHP extension will call for them to be loaded.
>
> And in some cases failed with that task... LoadFile is intended to solve such
> issues.
>

LoadFile does nothing to resolve problems caused by extensions. And, in
fact, it can cause more problems.

Third part libraries need to be available when they are needed. That
means they need to be available to the OS. The way to do this is to
include THOSE LIBRARIES in the Windows PATH (that's what it's there
for). For instance, if you want to use MySQL, then the MySQL bin
directory should be in the path. This makes it available to PHP,
command line utilities and even compiled programs which require it. And
no LoadFile command is needed.

You really need to learn how to *correctly* configure a system, instead
of taking the *expedient* way of doing things.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация