Jump to content

Cannot serve FM databases via PHP


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

Recommended Posts

Hi everyone.

I don't know a lot about PHP or FM Server so be patient with me, if you don't mind.

I didn't configure this server. The person who did no longer works here.

The server failed to serve these pages on a day that a lot of the website files had to be overwritten because of an unknown problem.

We are trying to serve several FM databases on our website.

PHP 5.3 is running on OS 10.6 server (FM 10 server)

I have tried dealing with the FM API files and getting them in the right spot. -???

Currently the Filemaker directory and Filemaker.php reside in /Library/Webserver/***Host name***/

We have the PHP module running in Server admin, but it does not refer to a FM module as far as I know...Only the standard PHP5 module.

I have tried editing the httpd.conf file to add the FMI_Configuration .../libphp5.so file and it broke our server.

However, the regular php5 module was still active in the same file.

I'm sure I'm missing a lot of detail.

What other information can I offer to get help?

Thanks in advance if anyone has any ideas!!!

Link to comment
Share on other sites

What was the initial problem that caused you to try to configure the server? Was it working before this problem?

If the problem involved not serving files that were recently overwritten, then you may want to look into file permissions; make sure the web server can accesses the web files.

If you want to know if the FM API files are in the right spot, create a php file with this code, host it on the server, then access it from a browser:


<?php

error_reporting(E_ALL);

require(Filemaker.php);





If that shows an error, create a PHP info file, and access it.  Look for the 'includes' paths, move the FM PHP API files to one of the includes paths.



<?php phpinfo()

Link to comment
Share on other sites

OK. Working on part 2 of your post now.

Can't really answer the first part.

info.php gives this:

include_path .:/usr/lib/php .:/usr/lib/php

Filemaker directory for php and filemaker.php files are indeed in that location.

This is the web page result i get when putting the code you gave me into a file called test.php:

{rtf1ansiansicpg1252cocoartf1038cocoasubrtf350 {fonttblf0fswissfcharset0 Helvetica;} {colortbl;red255green255blue255;} margl1440margr1440vieww9000viewh8400viewkind0 pardtx720tx1440tx2160tx2880tx3600tx4320tx5040tx5760tx6480tx7200tx7920tx8640qlqnaturalpardirnatural f0fs24 cf0

wow. Sorry. Don't know what happened there.

{rtf1ansiansicpg1252cocoartf1038cocoasubrtf350 {fonttblf0fswissfcharset0 Helvetica;} {colortbl;red255green255blue255;} margl1440margr1440vieww9000viewh8400viewkind0 pardtx720tx1440tx2160tx2880tx3600tx4320tx5040tx5760tx6480tx7200tx7920tx8640qlqnaturalpardirnatural f0fs24 cf0

Link to comment
Share on other sites

I'm not sure about the response you got from your test; that doesn't look familiar or useful to me.

I hadn't tested my code before, I forgot to quote "Filemaker.php". Here is the corrected code to test if FM PHP API is installed and available to PHP:


<?php

error_reporting(E_ALL);

require('Filemaker.php');

echo 'success';



If all is well, this should display only the text 'success', otherwise it should give you some warnings and/or errors.

In the FileMaker Server Admin Console, click "FileMaker Server Overview" on the left, then see if there is a green ball next to "Web Server" and "Database Server", and that "PHP" says "on"; provided they do, continue...

Do you still have the "FMServer_Sample.fp7" file in your /Library/FileMaker Server/Data/Databases/Sample folder? If so, open the FileMaker Server Admin Console, and make sure that database Status is "Normal" (if not, open it via that admin console), then go to http://yourIP:16000/test and click this link: "Test PHP Custom Web Publishing"

Don't know how this might relate, but in some of the PHP files I see "FMStudio v1.0 - do not remove comment, needed for Dreamweaver support." But in my webserver root I have an FMStudio_v2 folder...

Sounds like your solution uses FMStudio: http://www.fmwebschool.com/fmstudio.php

If the issue is with FMStudio config, I'm not familiar with it, and you might have better luck in this forum: http://fmforums.com/forum/forum/113-fmstudio-filemaker-web-devlopment/

Link to comment
Share on other sites

ok, referencing the first part of that response - I saved the file in text editor and it added junk.

I remade it in BBedit Lite with the new code you gave and got:

success

In the FileMaker Server Admin Console, click "FileMaker Server Overview" on the left, then see if there is a green ball next to "Web Server" and "Database Server", and that "PHP" says "on"; provided they do, continue...

YEP

Do you still have the "FMServer_Sample.fp7" file in your /Library/FileMaker Server/Data/Databases/Sample folder? If so, open the FileMaker Server Admin Console, and make sure that database Status is "Normal" (if not, open it via that admin console), then go tohttp://yourIP:16000/test and click this link: "Test PHP Custom Web Publishing"

YEP - all successful

Thanks for your attention to the matter anyway. I know you can't do a whole lot when I know nothing about what I am doing and you can't see my setup. Hopefully it will ring a bell with someone.

Link to comment
Share on other sites

Sounds like everything on the FileMaker side is configured and working correctly.

The only other thing I can think of is a permissions issue like I mentioned before. Whatever user the web server runs as needs to be able to read and execute php files; I'm guessing this got messed up when "website files had to be overwritten".

You may need to run something like: "chmod g+rx /path/to/your/web/files/*" from terminal (CAUTION: don't actually use that command in the terminal - research it more, and figure out what needs to be done, that's just an example).

Link to comment
Share on other sites

I'll look at the permissions. In the meantime, I noticed this:

http://help.filemaker.com/app/answers/detail/a_id/6538/~/installing-php-via-filemaker-server-deployment-wizard

Is the FM PHP API compatible with APACHE 2 at all?

We are running Apache version 2 on )S 10.6 and that web page clearly says that it is only compatible with Apache version 1:

NOTE: In the supported Mac OS X versions, Apache is already installed. Only the version of Apache 1.3.x that is installed as part of Mac OS X and Mac OS X Server is supported.

Am I nuts?

Link to comment
Share on other sites

That looks like out-dated documentation to me. I have FileMaker Server working with the version of Apache pre-installed on OS X (10.6, I think). And so do you! If the "Test PHP Custom Web Publishing" page worked for you, then FileMaker Server custom web publishing is working.

Link to comment
Share on other sites

This topic is 4495 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.