<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — PHP 8 experiences]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=10631</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=10631&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in PHP 8 experiences.]]></description>
		<lastBuildDate>Fri, 24 Jan 2025 18:51:44 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[PHP 8 experiences]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=43514#p43514</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (thomasriemer49)]]></author>
			<pubDate>Fri, 24 Jan 2025 18:51:44 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=43514#p43514</guid>
		</item>
	</channel>
</rss>
