[vox-tech] PHP MySQL Shell Script

Charles McLaughlin vox-tech@lists.lugod.org
Mon, 1 Sep 2003 19:49:41 -0700 (PDT)


Hello,

I'm writing a PHP script that runs at the shell -- not from within HTML.

If I try to connect to a MySQL database from a script running at the
shell, PHP seg faults.  But if I run the same code as a web page through
Apache it works fine.


For instance, if I run my script at the shell like this:

php4 myFile.php  --> it seg faults


But if I view it in a web browser like this:

http:\\127.0.0.1\myFile.php	--> this works

Why would there be a difference if my script runs through Apache?
Any ideas on how to fix this?


Thanks in advance for any help!


Charles