Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a CentOS virtual server through Vmware. The server runs an httpd daemon which serves an php page with a form. The users complete the form, and by clicking submit the php page calls an expect scripts. If i run the httpd throught the default init.d script i get a "no more ptys" error, but if i run httpd through root terminal the script runs without problems. How can i make the httpd run the expect scripts without having to run the httpd daemon by hand.

share|improve this question

If you are using something like system('expect ...');, I suggest you take a look at PHP's native Expect support. It handles the creation of a PTY, and is less of a mess than shelling out to other files, etc.

share|improve this answer
Thanx! I'm aware of the phps support for expect but in the current setup, i cannot recompile with it.Also the script runs flawlessly if the httpd daemon is run through ssh – Apostolis Apr 7 '12 at 9:15

This exact same behavior was driving me crazy. Disabling SELinux seems to have allowed me to work past this. There's lots I don't know, so unfortunately, I can't offer more than that at this point.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.