<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — PHP 8 experiences]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=10631&amp;type=atom" />
	<updated>2025-01-24T18:51:44Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=10631</id>
		<entry>
			<title type="html"><![CDATA[PHP 8 experiences]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=43514#p43514" />
			<content type="html"><![CDATA[<p>I just recently installed frontaccounting... on a machine that has&nbsp; php 8.3.7 built compiled from source.</p><p>Here&#039;s the things that I encountered.</p><p>1. includes/db/connect_db_mysqli.inc<br />&nbsp; &nbsp; I did not have mysqli setup correctly in the php.ini<br />&nbsp; &nbsp; It took a while to find.... I think it would be helpful to put a <br />&nbsp; &nbsp; try / catch around the mysql_connect call.. <br />e.g.<br /></p><div class="codebox"><pre><code>function db_create_db($connection)
{
        global $db;

try {

        $db = mysqli_connect($connection[&quot;host&quot;], $connection[&quot;dbuser&quot;], $conne\
ction[&quot;dbpassword&quot;], &quot;&quot;,
                !empty($connection[&quot;port&quot;]) ? $connection[&quot;port&quot;] : 3306); // d\
efault port in mysql is 3306

}
catch(Exception $err)
{
        echo $err-&gt;getMessage();
}

}

/// end code</code></pre></div><p>at least then there is a message that shows up when you attempt to install</p><br /><p>2. I ran into the gettext code isssue where the language is set to C</p><p>3. when I installed the restapi - the whole process got a whole lot harder....<br />&nbsp; &nbsp; The system was not returning data at all.....</p><p>&nbsp; &nbsp; It turns out that the function get_magic_quotes_gpc doesn&#039;t exist in php 8.....</p><p>&nbsp; &nbsp; The version of the api has Slim code that you have has that in Slim/Http/Request.php<br />&nbsp; &nbsp; and also its in session-util.inc</p><p>&nbsp; &nbsp; Definitely there should be some code like...<br />&nbsp; &nbsp;if (function_exists(&quot;get_magic_quotes_gpc&quot;))<br />&nbsp; &nbsp; &nbsp; .......<br />&nbsp; &nbsp; The disturbing thing is that the code dies without any kind of logging....... when it hits get_magic_quotes_gpc.<br />&nbsp; &nbsp;<br />4. an observation....<br />&nbsp; &nbsp; &nbsp; it seems like the frontaccount software should ship with the restapi module by default....<br />&nbsp; &nbsp; &nbsp;its difficult to figure out the restapi version stuff... it would make more sense if it just was in one tar ball...<br />&nbsp; &nbsp; &nbsp;I suspect fabridge should also be that....&nbsp; &nbsp; &nbsp;But the obvservation is just my two cents - I&#039;m sure there&#039;s<br />a rational for it to be broken up as it is.</p><p>Cheers,</p>]]></content>
			<author>
				<name><![CDATA[thomasriemer49]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=48722</uri>
			</author>
			<updated>2025-01-24T18:51:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=43514#p43514</id>
		</entry>
</feed>
