Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #7282 > unrolled thread

dll load problem

Started byPhilipp Kraus <philipp.kraus@flashpixx.de>
First post2012-10-12 14:07 +0200
Last post2012-10-13 00:40 +0000
Articles 9 — 4 participants

Back to article view | Back to comp.lang.php


Contents

  dll load problem Philipp Kraus <philipp.kraus@flashpixx.de> - 2012-10-12 14:07 +0200
    Re: dll load problem Jerry Stuckle <jstucklex@attglobal.net> - 2012-10-12 08:57 -0400
      Re: dll load problem Philipp Kraus <philipp.kraus@flashpixx.de> - 2012-10-12 15:12 +0200
        Re: dll load problem The Natural Philosopher <tnp@invalid.invalid> - 2012-10-12 14:50 +0100
          Re: dll load problem Jerry Stuckle <jstucklex@attglobal.net> - 2012-10-12 10:34 -0400
        Re: dll load problem Jerry Stuckle <jstucklex@attglobal.net> - 2012-10-12 10:32 -0400
          Re: dll load problem Philipp Kraus <philipp.kraus@flashpixx.de> - 2012-10-12 17:17 +0200
            Re: dll load problem Jerry Stuckle <jstucklex@attglobal.net> - 2012-10-12 12:51 -0400
    Re: dll load problem Denis McMahon <denismfmcmahon@gmail.com> - 2012-10-13 00:40 +0000

#7282 — dll load problem

FromPhilipp Kraus <philipp.kraus@flashpixx.de>
Date2012-10-12 14:07 +0200
Subjectdll load problem
Message-ID<k590tv$mdg$1@online.de>
Hello,

I run on a shell execution my local git client and get the error:

dyld: lazy symbol binding failed: Symbol not found: _iconv_open
Referenced from: /usr/local/git/bin/git
Expected in: /Applications/MAMP/Library/lib/libiconv.2.dylib

The git client is linked to the system libraries and works, but if I 
run it from my PHP script
I get the error above. The script runs under OSX with PHP 5.4.4.

(How) Can I change the search path of dynamic libraries? I think the 
correct library that should
be use is under /usr/lib/libiconv.2.dylib

Thanks

Phil

[toc] | [next] | [standalone]


#7284

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-10-12 08:57 -0400
Message-ID<k5943n$97u$3@dont-email.me>
In reply to#7282
On 10/12/2012 8:07 AM, Philipp Kraus wrote:
> Hello,
>
> I run on a shell execution my local git client and get the error:
>
> dyld: lazy symbol binding failed: Symbol not found: _iconv_open
> Referenced from: /usr/local/git/bin/git
> Expected in: /Applications/MAMP/Library/lib/libiconv.2.dylib
>
> The git client is linked to the system libraries and works, but if I run
> it from my PHP script
> I get the error above. The script runs under OSX with PHP 5.4.4.
>
> (How) Can I change the search path of dynamic libraries? I think the
> correct library that should
> be use is under /usr/lib/libiconv.2.dylib
>
> Thanks
>
> Phil
>

This isn't a PHP problem.  Ask in an OSX newsgroup.

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

[toc] | [prev] | [next] | [standalone]


#7285

FromPhilipp Kraus <philipp.kraus@flashpixx.de>
Date2012-10-12 15:12 +0200
Message-ID<k594ml$ovv$1@online.de>
In reply to#7284
On 2012-10-12 14:57:19 +0200, Jerry Stuckle said:

> On 10/12/2012 8:07 AM, Philipp Kraus wrote:
>> Hello,
>> 
>> I run on a shell execution my local git client and get the error:
>> 
>> dyld: lazy symbol binding failed: Symbol not found: _iconv_open
>> Referenced from: /usr/local/git/bin/git
>> Expected in: /Applications/MAMP/Library/lib/libiconv.2.dylib
>> 
>> The git client is linked to the system libraries and works, but if I run
>> it from my PHP script
>> I get the error above. The script runs under OSX with PHP 5.4.4.
>> 
>> (How) Can I change the search path of dynamic libraries? I think the
>> correct library that should
>> be use is under /usr/lib/libiconv.2.dylib
>> 
>> Thanks
>> 
>> Phil
>> 
> 
> This isn't a PHP problem.  Ask in an OSX newsgroup.

Are you sure?
Because if I run the command that is used by system / shell_exec
on command line it works, but it does not work on the PHP
function.

Phil

[toc] | [prev] | [next] | [standalone]


#7287

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2012-10-12 14:50 +0100
Message-ID<k59780$hjl$1@news.albasani.net>
In reply to#7285
Philipp Kraus wrote:
> On 2012-10-12 14:57:19 +0200, Jerry Stuckle said:
> 
>> On 10/12/2012 8:07 AM, Philipp Kraus wrote:
>>> Hello,
>>>
>>> I run on a shell execution my local git client and get the error:
>>>
>>> dyld: lazy symbol binding failed: Symbol not found: _iconv_open
>>> Referenced from: /usr/local/git/bin/git
>>> Expected in: /Applications/MAMP/Library/lib/libiconv.2.dylib
>>>
>>> The git client is linked to the system libraries and works, but if I run
>>> it from my PHP script
>>> I get the error above. The script runs under OSX with PHP 5.4.4.
>>>
>>> (How) Can I change the search path of dynamic libraries? I think the
>>> correct library that should
>>> be use is under /usr/lib/libiconv.2.dylib
>>>
>>> Thanks
>>>
>>> Phil
>>>
>>
>> This isn't a PHP problem.  Ask in an OSX newsgroup.
> 
> Are you sure?
> Because if I run the command that is used by system / shell_exec
> on command line it works, but it does not work on the PHP
> function.
> 

Oh don't be bothered with stuckle.  Any problem he can't impress with, 
using  his very limited knowledge, is 'not a php problem'.

In Jerrykins little mind, there is what he thinks he knows, which IS PHP 
or mysql. And what he doesn't know, which is therefore  NOT PHP or Mysql.

By this master stroke of cognitive dissionance and ego primping 
internalisation, Jerry then thinks he knows EVERYTHING about PHP and 
Mysql and, by his definition, he is entiorely correct, which is why he 
does it.

'Being right all the time',  is why Jerry is here.

Just ignore him. He will go back under his bridge and sulk after a few 
violent expostulations at having been caught out again.



> Phil
> 


-- 
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to 
lead are elected by the least capable of producing, and where the 
members of society least likely to sustain themselves or succeed, are 
rewarded with goods and services paid for by the confiscated wealth of a 
diminishing number of producers.

[toc] | [prev] | [next] | [standalone]


#7289

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-10-12 10:34 -0400
Message-ID<k599qr$d5v$2@dont-email.me>
In reply to#7287
On 10/12/2012 9:50 AM, The Natural Philosopher wrote:
> Philipp Kraus wrote:
>> On 2012-10-12 14:57:19 +0200, Jerry Stuckle said:
>>
>>> On 10/12/2012 8:07 AM, Philipp Kraus wrote:
>>>> Hello,
>>>>
>>>> I run on a shell execution my local git client and get the error:
>>>>
>>>> dyld: lazy symbol binding failed: Symbol not found: _iconv_open
>>>> Referenced from: /usr/local/git/bin/git
>>>> Expected in: /Applications/MAMP/Library/lib/libiconv.2.dylib
>>>>
>>>> The git client is linked to the system libraries and works, but if I
>>>> run
>>>> it from my PHP script
>>>> I get the error above. The script runs under OSX with PHP 5.4.4.
>>>>
>>>> (How) Can I change the search path of dynamic libraries? I think the
>>>> correct library that should
>>>> be use is under /usr/lib/libiconv.2.dylib
>>>>
>>>> Thanks
>>>>
>>>> Phil
>>>>
>>>
>>> This isn't a PHP problem.  Ask in an OSX newsgroup.
>>
>> Are you sure?
>> Because if I run the command that is used by system / shell_exec
>> on command line it works, but it does not work on the PHP
>> function.
>>
>
> Oh don't be bothered with stuckle.  Any problem he can't impress with,
> using  his very limited knowledge, is 'not a php problem'.
>
> In Jerrykins little mind, there is what he thinks he knows, which IS PHP
> or mysql. And what he doesn't know, which is therefore  NOT PHP or Mysql.
>
> By this master stroke of cognitive dissionance and ego primping
> internalisation, Jerry then thinks he knows EVERYTHING about PHP and
> Mysql and, by his definition, he is entiorely correct, which is why he
> does it.
>
> 'Being right all the time',  is why Jerry is here.
>
> Just ignore him. He will go back under his bridge and sulk after a few
> violent expostulations at having been caught out again.
>
>

Ah, I knew the troll would speak out.  Go back to school and learn which 
end of the shovel to use.  Then maybe you can get your ditch digging job 
back.

Because once again you've proven you know nothing about programming, and 
you've repeatedly proven you're not the EE you claim to be.

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

[toc] | [prev] | [next] | [standalone]


#7288

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-10-12 10:32 -0400
Message-ID<k599mu$d5v$1@dont-email.me>
In reply to#7285
On 10/12/2012 9:12 AM, Philipp Kraus wrote:
> On 2012-10-12 14:57:19 +0200, Jerry Stuckle said:
>
>> On 10/12/2012 8:07 AM, Philipp Kraus wrote:
>>> Hello,
>>>
>>> I run on a shell execution my local git client and get the error:
>>>
>>> dyld: lazy symbol binding failed: Symbol not found: _iconv_open
>>> Referenced from: /usr/local/git/bin/git
>>> Expected in: /Applications/MAMP/Library/lib/libiconv.2.dylib
>>>
>>> The git client is linked to the system libraries and works, but if I run
>>> it from my PHP script
>>> I get the error above. The script runs under OSX with PHP 5.4.4.
>>>
>>> (How) Can I change the search path of dynamic libraries? I think the
>>> correct library that should
>>> be use is under /usr/lib/libiconv.2.dylib
>>>
>>> Thanks
>>>
>>> Phil
>>>
>>
>> This isn't a PHP problem.  Ask in an OSX newsgroup.
>
> Are you sure?
> Because if I run the command that is used by system / shell_exec
> on command line it works, but it does not work on the PHP
> function.
>
> Phil
>

Yes, I'm sure.  Library loading is a function of the OS, not PHP.

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

[toc] | [prev] | [next] | [standalone]


#7294

FromPhilipp Kraus <philipp.kraus@flashpixx.de>
Date2012-10-12 17:17 +0200
Message-ID<k59c2d$uhe$1@online.de>
In reply to#7288
On 2012-10-12 16:32:51 +0200, Jerry Stuckle said:

> On 10/12/2012 9:12 AM, Philipp Kraus wrote:
>> On 2012-10-12 14:57:19 +0200, Jerry Stuckle said:
>> 
>>> On 10/12/2012 8:07 AM, Philipp Kraus wrote:
>>>> Hello,
>>>> 
>>>> I run on a shell execution my local git client and get the error:
>>>> 
>>>> dyld: lazy symbol binding failed: Symbol not found: _iconv_open
>>>> Referenced from: /usr/local/git/bin/git
>>>> Expected in: /Applications/MAMP/Library/lib/libiconv.2.dylib
>>>> 
>>>> The git client is linked to the system libraries and works, but if I run
>>>> it from my PHP script
>>>> I get the error above. The script runs under OSX with PHP 5.4.4.
>>>> 
>>>> (How) Can I change the search path of dynamic libraries? I think the
>>>> correct library that should
>>>> be use is under /usr/lib/libiconv.2.dylib
>>>> 
>>>> Thanks
>>>> 
>>>> Phil
>>>> 
>>> 
>>> This isn't a PHP problem.  Ask in an OSX newsgroup.
>> 
>> Are you sure?
>> Because if I run the command that is used by system / shell_exec
>> on command line it works, but it does not work on the PHP
>> function.
>> 
>> Phil
>> 
> 
> Yes, I'm sure.  Library loading is a function of the OS, not PHP.

In this special case you're right, but which library is loaded is depended on
the environment, so I can change library loading with the environment 
configuration.
So this is than a PHP problem. The message points to that the wrong 
library is loaded,
because if I run it from command line another library is loaded, on 
command line it works.
If I run it from PHP also from the script environment, which is defined 
by the php.ini and
the programming part (system, shell_exec, ...), there is an error, so I 
think you are wrong
with your statement, that is _only_ OS function. I think there is a 
problem with the environment
which is shown like the wrong library is loaded.
So I think it is here in the PHP newsgroup correct, because it is a 
problem which library is loaded
within the PHP environment

Phil

[toc] | [prev] | [next] | [standalone]


#7297

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-10-12 12:51 -0400
Message-ID<k59hr2$38j$1@dont-email.me>
In reply to#7294
On 10/12/2012 11:17 AM, Philipp Kraus wrote:
> On 2012-10-12 16:32:51 +0200, Jerry Stuckle said:
>
>> On 10/12/2012 9:12 AM, Philipp Kraus wrote:
>>> On 2012-10-12 14:57:19 +0200, Jerry Stuckle said:
>>>
>>>> On 10/12/2012 8:07 AM, Philipp Kraus wrote:
>>>>> Hello,
>>>>>
>>>>> I run on a shell execution my local git client and get the error:
>>>>>
>>>>> dyld: lazy symbol binding failed: Symbol not found: _iconv_open
>>>>> Referenced from: /usr/local/git/bin/git
>>>>> Expected in: /Applications/MAMP/Library/lib/libiconv.2.dylib
>>>>>
>>>>> The git client is linked to the system libraries and works, but if
>>>>> I run
>>>>> it from my PHP script
>>>>> I get the error above. The script runs under OSX with PHP 5.4.4.
>>>>>
>>>>> (How) Can I change the search path of dynamic libraries? I think the
>>>>> correct library that should
>>>>> be use is under /usr/lib/libiconv.2.dylib
>>>>>
>>>>> Thanks
>>>>>
>>>>> Phil
>>>>>
>>>>
>>>> This isn't a PHP problem.  Ask in an OSX newsgroup.
>>>
>>> Are you sure?
>>> Because if I run the command that is used by system / shell_exec
>>> on command line it works, but it does not work on the PHP
>>> function.
>>>
>>> Phil
>>>
>>
>> Yes, I'm sure.  Library loading is a function of the OS, not PHP.
>
> In this special case you're right, but which library is loaded is
> depended on
> the environment, so I can change library loading with the environment
> configuration.
> So this is than a PHP problem. The message points to that the wrong
> library is loaded,
> because if I run it from command line another library is loaded, on
> command line it works.
> If I run it from PHP also from the script environment, which is defined
> by the php.ini and
> the programming part (system, shell_exec, ...), there is an error, so I
> think you are wrong
> with your statement, that is _only_ OS function. I think there is a
> problem with the environment
> which is shown like the wrong library is loaded.
> So I think it is here in the PHP newsgroup correct, because it is a
> problem which library is loaded
> within the PHP environment
>
> Phil
>

The environment is also a function of the OS, not PHP.  And when you 
call git via a shell, you are no longer running under PHP.

Yes, there are differences - for instance, the current directory may be 
different when starting the program from PHP.  And while PHP can set 
some environment variables, nothing should affect a library being loaded 
by an external program (in fact, I'm not sure it can even do that, but I 
don't know OSX that well, either).

But if your system is set up properly the library should be loaded by 
the system.

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

[toc] | [prev] | [next] | [standalone]


#7299

FromDenis McMahon <denismfmcmahon@gmail.com>
Date2012-10-13 00:40 +0000
Message-ID<k5ad95$ngj$1@dont-email.me>
In reply to#7282
On Fri, 12 Oct 2012 14:07:49 +0200, Philipp Kraus wrote:

> Hello,
> 
> I run on a shell execution my local git client and get the error:
> 
> dyld: lazy symbol binding failed: Symbol not found: _iconv_open
> Referenced from: /usr/local/git/bin/git Expected in:
> /Applications/MAMP/Library/lib/libiconv.2.dylib
> 
> The git client is linked to the system libraries and works, but if I run
> it from my PHP script I get the error above. The script runs under OSX
> with PHP 5.4.4.
> 
> (How) Can I change the search path of dynamic libraries? I think the
> correct library that should be use is under /usr/lib/libiconv.2.dylib

This post contains suggested OS shell commands. I have no idea if they'll 
work on your system in the form presented, or if they'll trash your 
system completely. Use these commands at your own risk. I might have 
accidentally slipped a couple of commands in that will erase your hard 
disk, so check all the suggested commands before you run them.

Is it possible you have two versions of the library installed? One that 
has the relevant symbols (in /usr/lib/libiconv.2.dylib) and one that 
doesn't (in /Applications/MAMP/Library/lib/libiconv.2.dylib), and that 
the one that the php shell is picking up isn't the same one as when you 
run git from the OS yourself?

The quick fix - create a link from where it's looking for the library to 
where the library really is:

open a command shell

Check that "/usr/lib/libiconv.2.dylib" exists:

$ ls /usr/lib/libiconv.2.dylib

Check that "/Applications/MAMP/Library/lib/libiconv.2.dylib" doesn't 
exist:

$ls /Applications/MAMP/Library/lib/libiconv.2.dylib

if ("/Applications/MAMP/Library/lib/libiconv.2.dylib" exists):

See if it's the same size, date, md5sum[1] as "/usr/lib/libiconv.2.dylib"

[1] You're expected to know how to do this, if you don't, you shouldn't 
have opened the command shell in the first place!

Decide what to do next yourself. You might decide to copy one version of 
the library over the other one, or delete one and then follow the "else" 
branch below, or do something else - but it's up to you to figure out how 
to solve the problem. I'd probably rename "/Applications/MAMP/Library/lib/
libiconv.2.dylib" to something like "/Applications/MAMP/Library/lib/
libiconv.2.dylib.old" and then create the link below.

else:

Create a symlink from the non-existant file to the existing one:

$ ln -s /usr/lib/libiconv.2.dylib /Applications/MAMP/Library/lib/
libiconv.2.dylib

endif;

Note as these are commands you'd be issuing in the shell, you might need 
to su root or something (I'm not that familiar with OSX) to get the 
permissions needed.

Rgds

Denis McMahon

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web