|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #27796 exec()/system()/etc cannot execute Zerolink executables
Submitted: 2004-03-31 06:27 UTC Modified: 2004-09-26 01:00 UTC
From: wjtregaskis at students dot latrobe dot edu dot au Assigned:
Status: No Feedback Package: Documentation problem
PHP Version: 4.3.4 OS: MacOS 10.3.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: wjtregaskis at students dot latrobe dot edu dot au
New email:
PHP Version: OS:


 [2004-03-31 06:27 UTC] wjtregaskis at students dot latrobe dot edu dot au
This isn't a php bug as such, more a warning to other 
Mac php hackers - any CLI apps built with Zerolink 
enabled cannot be launched by any of php's program 
control commands - they all return the result '6'.  The 
solution of course is to rebuild the apps with Zerolink 

This is worth noting somewhere on the php pages, as it's 
an incredibly hard bug to track down - it took me 4 
hours, and that's with the hunch that Zerolink would be 
the culprit (given the myriad of other similar problems 
it causes).


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-31 07:11 UTC]
Please give a short summary of what zero-link is, and why
it is broken.
 [2004-03-31 07:20 UTC] wjtregaskis at students dot latrobe dot edu dot au
Just to clarify, Zerolink is Apple's system for linking 
object files within an executable at runtime.  It's on 
by default in XCode.  The premise is that for large apps 
you can run them immediately after compilation, linking 
on-the-fly only the [small, ideally] fraction of them 
needed.  The side-effect of this is that these apps have 
to be launched in some sort of special environment to 
facilitate this runtime linking, so you can't execute 
them normally.

I guess it would be possible to execute such apps so 
that they do work [by extending the exec code], but I 
don't see a need - it's easy enough to just compile with 
Zerolink off (the "old fashioned way") and it's more the 
fact that this can catch you out and is terrible to 
debug that concerns me.
 [2004-03-31 07:21 UTC] wjtregaskis at students dot latrobe dot edu dot au
P.S.  XCode is Apple's universal GUI IDE.  Zerolink is 
(so far as I've seen) too difficult to allow for in a 
normal makefile, so non-XCode projects are exempt from 
this problem.
 [2004-03-31 07:23 UTC]
So it's something for the docs.
 [2004-04-07 10:06 UTC] wjtregaskis at students dot latrobe dot edu dot au
As an extension of this problem, it's also true the same 
error code (6, ENXIO) is returned if you try to execute 
an application which connects to the WindowServer (under 
Mac OS X).  Only the console & root users may do this, 
which usually [and hopefully] excludes www, which seems 
to be the user that is used when executing via exec().
 [2004-09-17 15:22 UTC]
What do you mean by "CLI apps built with Zerolink 
enabled"? Which part of the documentation should be updated?
 [2004-09-26 01:00 UTC] phpdoc at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 31 00:01:23 2021 UTC