I installed php5 from OpenCSW but i believe it does not support the expect module.
I tried to run a php script to call expect to do a telnet to a device but i got this error
PHP Warning: fopen(): Unable to find the wrapper "expect" - did you forget to enable it when you configured PHP? in /export/home/php_expect.php on line 5
I will appreciate very much if you can help me configure the expect wrapper into php.
It sounds like you are missing environment for expect in the web service. Your expect may need some additional exported variables before it is called. Maybe it is in the wrong working directory to run.
I learn more each day. Of course, it it cannot make it go as either, it will fail.
Put a wrapper shell script around it to allow you to run a .profile or export VAR=VALUE to restore the env you have where it works (things displayed by set). A wrapper can also log details of the failure using strace/truss/tusc.