Jump to content

PHP Filter Script quit working

Recommended Posts

The latest update, V2.0 (123), broke the Google Search with suggestions workflow. It was working before the update this morning, but it quit working afterwards. It will display the text for "While waiting", but that is it.


Hi there,


I'm moving this into the Workflow Questions as it's not a bug in Alfred. From what I gather on twitter, you haven't managed to get your own PHP working since the start and recently the Google Suggest workflow has stopped working for you specifically.


As this issue is down to your Mac's configuration, it would be of huge use to whoever helps you (e.g. David), if you could post as much information about your setup as possible including examples of workflows you haven't managed to get working.




Link to comment

I am on a Mac mini with OS 10.8.2 on a 2.5 Ghz Intel Core i5. I am running Alfred V2(123). The workflow that quit working is exported here:




My test workflow is here:




From my iterm2 window, I have this configuration:



--- ~ » which php
--- ~ » php -version
PHP 5.3.15 with Suhosin-Patch (cli) (built: Aug 24 2012 17:45:44) 
Copyright © 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright © 1998-2012 Zend Technologies
--- ~ » 
Not sure what other information you will need. Just let me know.
Link to comment

Ok, so let's start out with something basic. Let's see if we can get a simple workflow with script filter working.


In one of your workflows, create a script filter, set your keyword, using space, argument required. Language will be /bin/bash. Then paste the following into the code box and run the workflow. Please report back and confirm that you were able to see the generated result in Alfred.


cat << CODE
<?xml version="1.0"?>
<items><item uid="test" arg="test" valid="yes" autocomplete=""><title>This is a test result</title><subtitle>This is a generated result</subtitle><icon>icon.png</icon></item></items>
Link to comment

Well then it sounds like something with the xml may be messed up. Why the Google Suggest doesn't work, I have no idea. 


Here's a link to a newer version that definitely works.


As for your other ones.. I noticed your using the workflows.php file I created. Do you have the most recent version? Check out my blog and read documentation on using it. There is also a download button there to be able to grab the latest copy of it

Link to comment

In the new version of the workflows library that I linked you to, try this.. I've cleaned the code up and made some fixes to make it a little easier to work with some of the stuff... So do this..


$w = new Workflows();
$w->result('test', 'test', 'Some title', 'Some subtitle', 'icon.png');
echo $w->toxml();


As mentioned, documentation for the class is on my blog. That should load the class, create a single result item and echo it back into the Alfred results.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...