Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

/usr/bin/php: fork: Resource temporarily unavailable

I seem to have broken the built in php. Anyone have any idea on how to fix it or how to reinstall php.

I tried installing Entropy PHP 5.3.0-3 but that didn't work.

HELP PLEASE

Macbook Unibody 13', Mac OS X (10.6.2)

Posted on Mar 11, 2010 12:16 PM

Reply
7 replies

Mar 11, 2010 11:58 PM in response to etresoft

Sorry I wasn't very clear, just in a blind rage.

The error I'm getting is "/usr/bin/php: fork: Resource temporarily unavailable". I was attempting to copy a .sh script to the php directory (Zend_Tool stuff to be exact). the guide I was reading suggested finding the directory by typing "which php". This returned /user/etc/php. I was trying to copy the files there but the system was saying the directory doesn't exist. This sis the only thing I can think of which would have broken it.

I tried reinstalling php with Entropy PHP 5.3.0-3 but no success. I doen't really want to reinstall OSX in case I lose data/apps etc. I'm mid way through a masters and doen't want to have to start setting up my laptop from scratch.

Brian

Mar 12, 2010 6:50 AM in response to sinkingfish

sinkingfish wrote:
The error I'm getting is "/usr/bin/php: fork: Resource temporarily unavailable". I was attempting to copy a .sh script to the php directory (Zend_Tool stuff to be exact).


But what did you do? Run the "history" command and it will tell you.

the guide I was reading suggested finding the directory by typing "which php". This returned /user/etc/php.


Are you sure about that? "/user" should not be a valid directory. There is a "/usr", but there is no "etc" inside it. There is a "/etc", but there is no "php" inside it. PHP is at "/usr/bin/php". Did you overwrite your PHP executable with a shell script perhaps? Do you have a Time Machine backup?

I don't think you would have to modify any system directories to install Zend. Can you point me to a web site that says you should?

I was trying to copy the files there but the system was saying the directory doesn't exist. This sis the only thing I can think of which would have broken it.

I tried reinstalling php with Entropy PHP 5.3.0-3 but no success.


Entropy is a well-built package that installs itself into /usr/local, where it won't interfere with other software. If your system PHP is hopelessly scrambled, you should still be able to reconfigure Apache to use the Entropy PHP. There are more instructions on the Entropy site about how to install Entropy PHP. Did you follow those? If you did, but still want to fix and use the system PHP, you will have to undo those changes. If you just want to forge ahead with Entropy, then you should apply those changes.

Mar 12, 2010 7:01 AM in response to etresoft

Thanks for the response.

Sorry I mis typed the path in my post - should have read /usr/bin/php.

I didn't know about the history command. These are the lines were I messed up :

416 /Users/brian/Downloads/ZendFramework-1.10.2/bin/zf.sh
417 zf show version
418 /Users/brian/Downloads/ZendFramework-1.10.2/bin/zf.sh show version
419 which php
420 cd /Users/brian/Downloads/ZendFramework-1.10.2/bin
421 cd . /usr/bin/php
422 cd * /usr/bin/php
423 zf\
424 zf
425 ls -al
426 cd *.php /usr/bin/php
427 cp * /usr/bin/php
428 cp . /usr/bin/php
429 cp *.php /usr/bin/php
430 sudo cp *.php /usr/bin/php
431 sudo cp * /usr/bin/php
432 sudo cp *.php /usr/bin/php
433 sudo cp *.sh /usr/bin/php

I think I may have overwritten the PHP executable like you suggested. I do have a time machine backup from a few days back but have never used it before, will rolling back solve OS issues ? I had a look on my friends computer, he didn't seem to have a php file in /usr/bin either.

Thanks again for looking at this.

Brian

Mar 12, 2010 7:10 AM in response to sinkingfish

sinkingfish wrote:
I think I may have overwritten the PHP executable like you suggested.


That is exactly what you did - a few times. Be careful that sudo command. It can do things like overwrite your PHP executable.

I do have a time machine backup from a few days back but have never used it before, will rolling back solve OS issues ?


Navigate to /usr/bin in the finder with Go > "Go to folder" or shift ⌘ G. Run Time Machine. Find your original "php" and restore only that file.

I had a look on my friends computer, he didn't seem to have a php file in /usr/bin either.


That's odd because everyone else has it.

Now, can you explain just what prompted you to try all of these commands?

/usr/bin/php: fork: Resource temporarily unavailable

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.