Do the PHP files which you are trying to import contain Classes having same name as filename? Eg: If you are importing SamplePhp1.php, it should contain a class "SamplePhp1" for FB/Zend AMF to introspect.
Or is this happening when generating new template? If so, please share your server configs (name, version, PHP version) and any other specifics in your project so that we can repro the issue here.
It happens all of the time. Even when creating a class from a template or the database. And yes, the class name is the same as the file name. One file I created a while ago worked with Flash Builder Beta 1, but I think I was using Fedora 9 at the time.
The SamplePhp1 class that is referenced in the error messages was created by Flash Builder from a template.
My server is Fedora 12 (kernel 126.96.36.199-166.fc12.x86_64). My PHP version is 5.3.2.
The PHP modules loaded are:
Some lessons that I've learned from the way Flex sets up Data Services:
If somewhere in your class you have anything that outputs text, the introspection will fail. Test the class directly in the web browser to verify that this isn't the case.
Also another reason to test the class in the web browser before feeding it to Flex is to know that it's actually working. That it's a Flex problem, not a problem with your class itself.
For whatever reason, if the class is above the webroot at time of introspection, introspection will fail. If you move the class above the webroot after that, it's not a problem. Just at the time of initial introspection that matters. I was planning to file a bug about that.
Regarding the modules, I dont' think any of them matter. As long as you have Zend on your test server (gets installed by FlashBuilder anyway), that's all you need I believe. I don't recall having to specifically do anything else.
Thanks for the thoughts, David.
I have this class working with a Flash Builder project and had no problems with the introspection. However, it's on a Windows XP box that includes Flash Builder, Apache, PHP, etc. Where I have the problem is when I have Flash Builder installed on my Mac and the class installed on my Linux server which has Apache & PHP (which is my primary development environment). I was able to get introspection working a while back when I was using a beta version of Flash Builder and an older version of Fedora. I do remember I had to install some PHP module to get it to work back them, but I'm unable to find the post that described that problem and fix.
Also, the classes that are built from a template are in the correct location, but it still fails introspection.
From your first post, what I can deduce is that Zend is not able to find the required class/php-file you are trying to introspect.
Could you cross check in the amf_config.ini file for directories added (value of amf.directories). This directory when appended to the the webroot directory (also mentioned in amf_config.ini file) should give you the exact location of the directory where your PHP service file - SamplePhp1.php should be located.
Could you cross check on that along with the permisions of that directory and the file.