Jump to content

This topic is 7076 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I just got my test server setup with FMSA 7. My next step is to add FX and attempt my first php/FM interface. I'll let you know how it goes. Hopefully by the end of 9/9/05.

Posted

hey thanks for the replies guys!!

Me and another guy in the office managed to get it sorted, it was more a matter of me not really knowing php well enough, and not understanding that it is talking to the web publishing engine (essentially the Advanced part of FMSA.. der) instead of FMS.

that is what i didnt understand, so an IP change here and there and away we went!!

again, appreciated all the same

Posted (edited)

How do you get FX PHP to start on OS X? After installing, I can't seem to find it anywhere. So far, I've had to reinstall it to get it to run.

Is there a daemon? and if so, can someone tell me where they're stored and how they're started on a Mac?

Thanks.

Edited by Guest
Posted

FX is simply a PHP Class. So to use it you include its path in a PHP script then you initiate an instance of it in the script.

For example:

<?php

include ("FX.php");

$myquery = new FX(127.0.0.1,591);

.....

?>

Good Luck.

Garry

Posted

Garry is correct, FX is an interface to php, it is not php itself.

Here's a blurb I wrote to enable php on Mac OS X 10.4

Open the Terminal application in /Applications/Utilities.

Commands to be entered are preceded by a >. Either do an su before doing any of the commands below or add a sudo before every command. My personal beliefs about su vs sudo will remain personal :

Control key sequences are denoted by a ^ followed by the character. For example ^W means to hold down the control key and press W. You can copy and paste from TextEdit into Terminal, be careful not to include the end of line return.

> cd /etc/httpd

> cp httpd.conf httpd.conf.ORIG

> pico httpd.conf

Find the two lines below and remove the # from the beginning. To do this type ^W, enter php, and press return. If you find one of these lines use the left arrow to get to the right of the #, then delete it, then use the down arrow to move to the next line. Repeat by typing ^W again and pressing return until the search goes back to the first line with php.

#LoadModule php4_module libexec/httpd/libphp4.so

#AddModule mod_php4.c

To save the file type ^O and press return. Then type ^X to quit pico and return to the prompt.

Restart the apache web server

> apachectl restart

To verify that php is setup & running OK:

> cd /Library/WebServer/Documents

> pico phpinfo.php

Insert the three lines between the blank lines (copy/paste or just type them):

<?php

phpinfo();

?>

To save the file, type control-O, enter the name phpinfo.php and press return. Then type control-X to quit pico.

In Safari go to this link:

http://localhost/phpinfo.php

You should see a screenfull of info!

Posted

I assume you have downloaded the fx.php classes from iViking.com. How to use it is explained in the documentation folder. The most useful is the fxFunctions.rtf (or .pdf). Looking at the example solution is also helpful to get you started.

Let us know if you need more help.

Posted

Note: security updates to Mac OS X have a tendency to overwrite manually edited changes in the /etc/httpd/httpd.conf file. My php was working a couple of months ago but was disabled when I tried it today...

Posted

This was also true for me, and I'm only on 10.3.9. It was working fine a while ago, now it's not. I don't do much PHP web stuff (yet), so I'm waiting until I upgrade to Tiger, then reapproaching the problem. But if anyone knows how to wap it upside the head, please let us know.

Posted

I haven't found this to be the case... all the updates I have done have respected my (manual) changes to http.conf, including the addition of numerous virtual hosts, and addition of basic authentication.

Posted

highflyr->

One of the security updates was pulled a day after release because of major problems. I suspect this one may have mucked the file. Perhaps you updated the day after when the fixed version came out.

It would be tempting to just have a copy of httpd.conf and replace Apple's whenever they change it, but that could really screw things up since there are no guarantees Apple won't change the location of the server files, etc. I prefer to write little tutorials for myself and just edit the files. IMHO, this is the safest approach, although it does require some familiarity with using the Unix command line.

Posted

Instead of using the built in apache with Mac OS X, I upgraded to Apache 2. I then had better control over the files, system updates, etc.

FX.php sits inside my htdocs folder and said needs to be called in the first line of your PHP code.

FMWebschool.com has some excellent tutorials on PHP and FX.php that help me get going very quickly.

Posted

Hi, folks! Since this has turned into an Apache/PHP install/config discusson, I'll just add that Marc Liyanage has an excellent site and instructions for installing PHP and various other server technologies for Mac OS X on his site...

http://www.entropy.ch

I like his binary installers and can use them to update to newer versions of PHP, et al. He was providing this 'how to' stuff before Apple started packaging it in w/Mac OS X and has packages for different packages for different OS versions and versions of PHP, et. al.

--ST

Posted

Thanks for the advice Steve. I'd originally used Marc's package to install PHP, quite a while ago. I was a bit nervous about running the installer again, since I didn't know if it would create a mess of duplication. But I ran the update, to php 4.3 (yeah, I'm behind the times). And it's working again :)-) All I can say is, "Thank God for installers and the kind souls who build them."

This topic is 7076 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.