Cannot try Aspose.Slides Java for PHP Examples

Hi,


I tried to follow this guide here: Installation|Aspose.Slides for PHP Documentation

I first couldn’t clone the repository from Git - it says the repository is not found, so I manually downloaded it.

Now when I try to run test files, I get this error message: “PHP Fatal error: Class ‘com\aspose\slides\Presentation’ not found”

I already downloaded the Aspose.Slides-for-Java jar file but I don’t know how to include it. I was assuming that the PHP test files would automatically include necessary files properly but unfortunately this wasn’t the case.

I know nothing about Java and all I want to do is to use the Aspose Slides Converter from my PHP application.

Thanks for your help.
Serdar

Resolved.


For newcomers, please keep in mind that you have to put the “aspose.slides-16.7.0.jar” file in tomcat/webapps/JavaBridge/WEB-INF/lib/ folder, and you have to add the “require_once(”…/java/Java.inc") just after the namespace declaration in the PHP file you’re working with (don’t forget to adjust Java.inc relative location).

Hi Serdar,

Its good to know that you have been able to rectify the issue on your end. Please share, if I may help you further in this regard.

Many Thanks,

I am having the exact same issue. I have followed the instructions to a tee and am not able to get the tests to work. I keep getting the fatal error that the class is not found.


I put the aspose.slides.x.x.x.jar file, the license file, and the third party directory in the WEB-INF/lib directory. I’m not sure it is a permissions issue but I cannot access the classes in aspose.slides.x.x.x.

Was there anything else you did to resolve this?

Hi,

Have you
added the “require_once(”…/java/Java.inc") just after
the namespace declaration in the PHP file you’re working with (don’t
forget to adjust Java.inc relative location).

Many Thanks,

I have it included as …/…/java/Java.inc not …/java/Java.inc. That produces an error. What should file permissions be set to?

Running more of the tests and I am getting the error:


PHP Fatal error: Class ‘com\aspose\slides\Presentation’ not found

It’s definitely not finding the class and I have java/Java.inc required.

Hi Brian,

Based on your comments shared over this thread link, can we consider this request to be resolved and close the discussion.

Many Thanks,