0

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.

2 Answers2

0

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.

Kyle Smith
  • 9,683
  • 1
  • 31
  • 32
  • 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 07 '12 at 09:15
-1

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.

Groovy
  • 1