Results 1 to 7 of 7

Thread: Apache Binary files missing on Mac

  1. #1
    Join Date
    Mar 2010
    Posts
    182

    Apache Binary files missing on Mac

    Hello,
    I installed MAMP on my mac (leopard). I also installed the library ImageMagick-6.4.3. This library allows to process images from the command line. To use it, I go through a PHP script that runs a command on the shell.
    I have a very strange desire to run tests: If I pass a PHP command "ls" I have returned the contents of the script directory.
    I have already performed the following tests:
    Relocation of ImageMagick (via MacPorts and hand )
    Group editing of binary ImageMagick
    binary modification of the Apache Group
    Change PATH in the ~ /. profile and / etc / profile

    But still the binaries of Apache are missing. If you know what exactly is this behavior then please help me with this.

  2. #2
    Join Date
    Nov 2009
    Posts
    333

    Re: Apache Binary files missing on Mac

    Hi,
    "ls" is not a program, it is only a shell builtin. It is normal that we can still access it. The PHP module does not find the program "convert" because he does not know the path. The posting of PATH by a PHP script could convince you. Keep in mind that when a program is executed through the server, it is not the name of the user logged on the current session. It should therefore be set correctly to the server in order to achieve the path of the desired program.

  3. #3
    Join Date
    Dec 2009
    Posts
    178

    Re: Apache Binary files missing on Mac

    Hello,
    Even i do have a similar kind of a problem with my apache and mac operating system. I have noticed that the Path that is displayed in my phpinfo does not contain a link to the folders that contain my binary and its dependencies. So I attempted to change the PATH files directly in "profile . But this manip occurs only in the terminal. Would you have any info on the "server configuration"? Any help will be appreciated.

  4. #4
    Join Date
    Mar 2010
    Posts
    182

    Re: Apache Binary files missing on Mac

    Hello,
    I did new tests, and confirm that the concern comes right from my PATH. I'm changing the whole set of files that work with bash, or anything that the server does not want to look elsewhere than in following paths: / usr / bin: / bin: / usr / sbin: / sbin. I tested my 2 servers: apache and apache using the default MAMP both give me the same concern despite two different bundle and two different users.

  5. #5
    Join Date
    Nov 2009
    Posts
    359

    Re: Apache Binary files missing on Mac

    Hello,
    If everything is to the contrary. The web server is launched with this environment variable. In the best case he returns to PHP unchanged. At worst, it is changing according to its setting. Similarly between PHP and bash launched in the script. It is therefore necessary to solve the problem by making the necessary settings throughout the chain. Given the many possibilities, it will not be easy to answer point-blank. I guess you understand.

  6. #6
    Join Date
    Nov 2009
    Posts
    343

    Re: Apache Binary files missing on Mac

    Hello,
    The server allows outsiders to run programs on the machine. For obvious question of safety, the environment that is "lent" must be partitioned and reduced to the minimum necessary. There is no question of giving them the same access to a local user or an administrator, without having very explicitly authorized. The external programs used are copied to the folder specified by the Directive safe_mode_exec_dir in php.ini . But disabling the Safe Mode is not a good thing. Besides the Safe Mode is removed from PHP 6.0.0. To use ImageMagick, it should consider the use of ad hoc PHP modules, such as Imagick.

  7. #7
    Join Date
    Nov 2009
    Posts
    335

    Re: Apache Binary files missing on Mac

    Hello,
    I understand the implications of disabling the safe mode. But on a local machine, I have little risk. I already tried to install the libraries and Imagick MagickWand, but without success on Mac OSX. It may be related to MAMP which seems to be very limited if you want to compile additional modules. I did my install Image Magick via MacPorts, and I tried to install the Imagick via PECL for PHP 5 on MAMP I will be seeking a more equal MAMP flexible, or even start on a clean install of AMP by hand.

Similar Threads

  1. Replies: 4
    Last Post: 05-05-2012, 05:59 PM
  2. Apache not executing .php files, directly downloads it
    By Roakman in forum Technology & Internet
    Replies: 4
    Last Post: 27-12-2010, 02:40 AM
  3. Java Source Code From Compiled Binary CLASS Files
    By Layton in forum Windows Software
    Replies: 4
    Last Post: 20-03-2010, 08:54 PM
  4. Unable to copy files to Apache server
    By Azzan in forum Networking & Security
    Replies: 4
    Last Post: 08-04-2009, 01:04 PM
  5. Reading and editing values of binary files
    By Rivita in forum Software Development
    Replies: 1
    Last Post: 26-11-2008, 07:03 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,644,559.19922 seconds with 17 queries