Jump to content

Linux/PHP vs Windows/PHP


MetalSmith

Recommended Posts

Hi all,

 

I like to write scripts for my Aastra IP phone. 480i.

 

I have done all my scripts with Apache on windows. I thought I would try it on Linux with the AsteriskNOW FreePBX 1.4 load. Phone system software for those that do not know.

 

So my code is below something very simple to display on the screen. Ignore the $textmenu code that works fine. The problem is it does not open a file and do something then write the file.

 

On my Windows / Apache box the screen will display  on the phone and open the file and do whatever. On my Linux box it will display the screen fine but will not open that file.

 

Why would it be ingnoreing those PHP file commands? Any ideas? It file commands work if I run it with php script.php but not when I use my phone to launch that script. Now keep in mind Windows/Apache is fine no problem. I thought maybe it was a php.ini setting on the linux box?

 

<?php

$textmenu = "<AastraIPPhoneTextMenu style = \"numbered\">\n";

$textmenu .= "<Title>------- Test -------</Title>\n";

 

$textmenu .= "<MenuItem>\n";

$textmenu .= "<Prompt>Applications</Prompt>\n";

$textmenu .= "<URI>http://65.205.71.13/xml/menu/menu.php?source=all</URI>\n";

$textmenu .= "</MenuItem>\n";

 

$textmenu .= "<SoftKey index = \"1\">\n";

$textmenu .= "<Label>Select</Label>\n";

$textmenu .= "<URI>SoftKey:Select</URI>\n";

$textmenu .= "</SoftKey>\n";

 

$textmenu .= "<SoftKey index = \"6\">\n";

$textmenu .= "<Label>Exit</Label>\n";

$textmenu .= "<URI>SoftKey:Exit</URI>\n";

$textmenu .= "</SoftKey>\n";

 

$textmenu .= "</AastraIPPhoneTextMenu>\n";

 

echo $textmenu;

 

 

 

$fp=fopen("/var/www/html/aastra/awa-det/conference/test.txt","w+");

fwrite($fp);

fclose($fp);

?>

Link to comment
https://forums.phpfreaks.com/topic/228971-linuxphp-vs-windowsphp/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.