NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Need help running an integration script


Joined: 08 Jan 2008
Posts: 8
Location: Sweden
Reply with quote
Hi,

I read and followed the instructions on this page howto-use-a-php-script-for-my-editing-t753.html
and yet I am not able to get my own integration script to work with "Take input from"->"selected text"

If I run the script without "Take input from" checked, everything works fine.
I know its not a problem with my script because it contains only <?php echo "test"; ?>, which gets echoed nicely into my log window.

The error I am getting is:
Cannot open file "". The system cannot find the path specified.
It is obviously a setting somewhere that is missing but the question is which one?

Settings for my command:
Shell
@php@ -q "c:\foo\foo.php"
show command in tools
work with editor
-> take input from
-> selected text
redirect to log window
only local files

Thats it.

What am I missing?
View user's profileFind all posts by leihogSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Could you please send me or post there a screenshot with all settings?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 08 Jan 2008
Posts: 8
Location: Sweden
Reply with quote






The other IDE settings are defaults.
View user's profileFind all posts by leihogSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
With those settings PhpED will run addUndefinedMethod.php and send selected text to its input. If no file is opened in the editor, you may get an error. If your script does not read input, it may result in error too.
Please take a look into this forum phped-integration-scripts-f18.html
it's where some good examples posted. They work with editor and return the results into it.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 08 Jan 2008
Posts: 8
Location: Sweden
Reply with quote
This is the script I run with the above settings
Code:

<?php
$f = fopen("php://stdin", "r");
$s = fread($f, 100000); // should be big enough
fclose($f);
echo "\"" . $s . "\"";
?>


This is the error I get when I run the script having first selected a line of text in the active file:




I can't see anything wrong with the script. So it has to be something in the IDE that is causing this.
View user's profileFind all posts by leihogSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
thnx, I'll check it.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Need help running an integration script
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic