Compatibility modern linux OS (php version 8.x.x., etc)

Hi, we have setup a dedicated VPS to test “Aspose.BarCode for PHP via Java” as a previous step for setting up a licensed and full production server for a Document digitization company, if the test works as we expect/need.
¿Does Aspose.BarCode support php 8.x.x versions? ¿Are there any updated installation steps for installing it on a Ubuntu 22.04 (or similar) modern server? We are having a tough time as it is demanding the installation of obsolete versions that are no longer on the repositories.
Many thanks in advance.

@sostenible,

Generally Aspose.BarCode for PHP via Java supports up to PHP7 as per the System Requirements document. But one can use the API on PHP 8.x.x. See the reference thread and follow the guidelines for your reference.

Thanks it seems that thread is just what we were looking for. However, the .zip file cannot be downloaded it says only for thread owner and developers ¿How can we get hold of it? I believe this should be public in order to allow effective testing of the tool. Thanks.

@sostenible,

Since you are not the owner of the (other) thread, so you cannot download the attachments. However, you may try what @John.He asked in the post. Do you still find any issue after accommodating the recommendations?

Please note, we cannot provide such updated files(attachments) publicly to the users due to copyright issues.

Hi Amjad, thank you for your reply. We had to do many things, including converting your run-bridge.bat file to a run-bridge.sh file, changing the corresponding variables, etc.

We now have something running on port 8999, however not sure if it will work as it should (our programmer is still to make the corresponding tests).

So far, we get on http://IPADDRESS:8080/barcode/ the following:

PHP/Java Bridge settings

The PHP/Java Bridge web application contains two servlets. The PhpJavaServlet handles requests from remote PHP scripts running in Apache/IIS or from the command line. The second servlet PhpCGIServlet can handle requests from internet clients directly.

The following shows the settings of the PhpJavaServlet and the PhpCGIServlet.

PhpJavaServlet

The PhpJavaServlet handles requests from PHP clients.

Apache/IIS/console::PHP <--> PhpJavaServlet
It listens for PHP/Java Bridge protocol requests on the local interface or on all available network interfaces and invokes Java methods or procedures. The following example accesses the bridge listening on the local interface:
<?phprequire_once("http://localhost:8080/JavaBridge/java/Java.inc");$System = java("java.lang.System");echo $System->getProperties();?>

Option Value Description
servlet_log_level 3 The request log level.

PhpCGIServlet

The PhpCGIServlet runs PHP scripts within the J2EE/Servlet engine.

internet browser <--> PhpCGIServlet <--> php-cgi <--> PhpJavaServlet

It starts a PHP FastCGI server, if possible and necessary. Requests for PHP scripts are delegated to the FastCGI server. If the PHP code contains Java calls, the PHP/Java Bridge protocol requests are delegated back to the current VM, to an instance of the PhpJavaServlet.

Option Value Description
php_exec php-cgi The name and location of your system_php_exec. For example /opt/PHP/bin/php-cgi. Default is /usr/bin/php-cgi or c:/Program Files/PHP/php-cgi.exe or a php-cgi from the PATH.
prefer_system_php_exec Off Ignore a local WEB-INF/cgi/php-cgi-ARCH-OS executable from the web archive and use the specified php_exec. Default is Off.
php_include_java Off Shall the server add <?php include_once("java/Java.inc");?> at the top of each PHP script? Default is Off.

The settings were taken from the [WEB-INF/web.xml](file:///var/lib/tomcat9/webapps/barcode/WEB-INF/web.xml).

And we get on http://IPADDRESS:8080/barcode/vendor/aspose/barcode/examples/php_side/BarcodeGeneratorExamples.php the following:

port number is 8999 java_inc_path is http://localhost:8999/JavaBridge/java/Java.inc libs_root is …/…/lib/ set license value path_to_license_file from ini file lic/Aspose.BarCode.PHP.Java.lic

Do you think this is ok? Should we start again from scratch? If so, are there any specific instructions we can follow? He have been trying to find our way using these links, and a few other issues that we tried to solve by ourselves:

@sostenible,

Could you please refer to and try the java.inc from php-java bridge.
files1.zip (15.3 KB)