I have developed a bunch of php scripts and I would like to execute them in a shell without having to go through apache. I can execute most scripts with: >php script.php and it works quite well, however scripts that use curl don't work, even though I have curl installed and php4-curl as well (i am using a debian system). phpinfo will show curl enabled when I run it from a browser through apache but it wont show curl when I run it from a shell. I would highly appreciate some tips. Andre
What about when you run same scripts in a browser environment ? When I exec php from the cli in windows the curl dll always fails to load and halts execution, I never bothered fixing it becuase it doesn't affect production.
Thanks for the reply. It works in the browser environment. However I found that the php.ini in : /etc/php4/cli/php.ini was different from: /etc/php4/apache2/php.ini (both were automatically generated by apt-get the debian installer). Everything is working now. Its probably the same in windows? Just run phphinfo and check what php.ini is used.
I looked further, it's the way that curl is/was compiled (for windows), I can use the source to build libcurl and compile either a dll that works in cli with no errors, or in cgi/apache with no errors, but not both at the same time. On a unix system all the header files are lying around still for both types, giving the php libraries access to every single prototype function that curl has ( on compile ), on windows its different, everything is statically linked which is the reason for one or the other. Glad you got it fixed up though.......