PDA

View Full Version : Request for PHP(standalone version) with MySQL support on SIX


kk
04-09-1999, 05:08 PM
Hi Administrator,

Somehow I need to run php script on the shell prompt (e.g. php myscript.php3).

I found that there is no MySQL support in the standalone version of PHP on SIX so PHP produced an error message : "Call to unsupported or undefined function mysql_connect()".

Please help.
Thanks,
-kk-
Thai-IMEX.com

Terra
04-09-1999, 05:52 PM
PHP3 at the command line was a Beta project that I needed for specific uses...

It was built for exacting needs at the time, and will have to find some time to recompile a new one - as the module version and command-line version require 2 seperate builds...

I should have this done by Sunday as I have a MySQL upgrade scheduled for Saturday, and that way I can upgrade PHP3 to the new MySQL library routines...

--
Terra
sysAdmin
FutureQuest

Terra
04-09-1999, 07:37 PM
I went ahead and recompiled a new php command-line revision...

It is 3.0.7 with MySQL and I have fixed the zlib libraries as well...

Please test it out...

--
Terra
--Narf!--
FutureQuest

Justin
04-09-1999, 10:00 PM
I have a couple of php problems now with my new site...

On my local setup, my script was working just fine, but on the server it failed to work and gave no indication that it failed - it just didn't add my data to the database.

Anyway, as it turned out, it was a single quote (') causing the problem. In my php3.ini file, there is a setting that I think takes care of this:

magic_quotes_gpc = on

I don't know if that's it for sure, but either way, I can use contractions locally without probs but not on the server unless I double them up. If I have to I can use ereg_replace for each individual field, doubling them up, but there are about 80 fields... and 3 different scripts this would need to be done in...

What I'm wondering is if there's a way that you could configure it to do this automatically (like I have it locally) or if I'm just stuck with some more coding http://www.aota.net/ubb/smile.gif

Problem #2: I have mirrored the FQ directory structure locally so that I don't have to edit paths when I upload - but I can't figure out how to make php's doc root be /big/dom like on the server. Ok, so I'm being lazy, but that's part of the reason I use includes anyway http://www.aota.net/ubb/smile.gif Now I must still go edit all of my include files, removing the /big/dom from the paths, before uploading. This problem is on my end, of course, just wondering how to set that up (I am using 'safe mode'). Setting 'doc_root' in php just borks the whole thing...

Ok, enough griping for one day http://www.aota.net/ubb/smile.gif

Justin

Justin
04-09-1999, 10:51 PM
Just to update, I now know why I didn't get any errors when the query failed - I had assumed (yes, I know what assume stands for http://www.aota.net/ubb/smile.gif) that it would return a 0 or -1 or some numeric value less than 1 on error. As it turns out, it returns a null value... so my checking if ($result > 0) returned true - I would have thought NULL was less than 1, but I guess not... I shold use if ($result == "") to raise an error I guess http://www.aota.net/ubb/biggrin.gif


[This message has been edited by Justin (edited 04-09-99).]