I have a client database that was written three years ago (on a FMS15 machine) with an important function to send emails (using 360Works Email plugin) to staffers requesting a Yes or No response as to their availability for an event. The html email had two buttons in it representing a No or a Yes response. Each button had a calculated URL attached that ran a PHP script on the server. Examples of the two URLs attached to the buttons:
http://client_url.com/script_name.php?action=yes&staffid=STA123&eventid=EVNT234 OR
http://client_url.com/script_name.php?action=no&staffid=STA123&eventid=EVNT234
This was working nicely in days of yore. The project has re-started and moved to a FMS17 machine (latest Mac Mini, latest Mojave / FMS17).
Now the buttons produce a ton of "Deprecated" errors like these two lines:
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; FileMaker has a deprecated constructor in /Library/FileMaker Server/HTTPServer/htdocs/httpsRoot/filemaker.php on line 87
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; FileMaker_Error has a deprecated constructor in /Library/FileMaker Server/HTTPServer/htdocs/httpsRoot/FileMaker/Error.php on line 31
The php script is quite simple, it simply repackages the script parameters passed to it and called a FileMaker script that annotated a record in the database with their responses.
I have been considering using the data API to accomplish the same task rather than figuring out how to resurrect the php approach but it escapes me how I would be able to make the buttons in the email work.
Briefly, can the same "html email out - click a response button - update the database on the server" procedure be implemented using the API rather than PHP scripts?
If not, is there a php library file that would not produce the deprecation errors that I need to put on the server? (low expectations here because deprecation IS on the schedule).
Regards,
Ed
It's not listed as deprecated yet...
FileMakerPKB
Are the notices / warnings you getting preventing the application from working? Looking at your warnings I wouldn't worry about it, only use the PHP supported version for FileMaker Server and it will be fine. Most web hosts allow you to pick which version of PHP you are running with.
If you don't want to receive those notices / warnings turn the PHP error reporting settings down.