NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Deploying PHP Dock Applications


Joined: 03 May 2005
Posts: 3
Reply with quote
Hi All,

I've developed my PHP, I've paid my licence, I've got it working in my machine... can someone please tell me how to distribute the application please??

I've copied the PHPDock directory that was created by the installer onto a disk and moved it to another machine. Starting up the application gives a HTTP 500 Internal Server Error. ANY information appreciated.

If someone could give some guidance on how to compile the application using Inno Setup as described in the case study I would really appreciate it

Many thanks in advance

Tyndyll
View user's profileFind all posts by tyndyllSend private message
A little further down the road...


Joined: 03 May 2005
Posts: 3
Reply with quote
I should have mentioned that it is being compiled on Win2K

Further tests have concluded that if I compile using Inno Setup and make the program path *exactly* the same as the original install path it works fine? Can someone please tell me if there is someway to change this. I've had a look through the phpdock.ini and it seems that the path is dependent on the

application/x-httpd-php="%PATH%"

Am I along the right track? Is there any way to configure Inno Setup to alter this to the users wishes?

Tyndyll
View user's profileFind all posts by tyndyllSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
Hi Tyndyll,

Certainly application/x-httpd-php="%PATH%" is a wrong setting and causes the trouble.
It should be a valid path to php-cgi.exe with filename

If you're using INNO, the following will work fine:

just leave
application/x-httpd-php=SOMEVAL
in phpdock.ini being distributed
then in the INNO script have the following line:
[ini]
Filename: "{app}\phpdock.ini"; Section: "Handlers"; Key: "application/x-httpd-php"; String: """{app}\php\php-cgi.exe"""

(I presumed that php will be installed in phpdock\php subdirectory, but it's up to you Smile, just don't forget to package php and phpdock with your application )

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

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
Feel free to play with the following iss script:

Code:
[setup]
AppName=My PhpDock Based Application
AppVerName=My PhpDock Based Application 1.0
AppVersion=1.0
AppMutex=phpdockmutex
AppPublisher=My Company.
AppPublisherURL=http://www.mycompany.com/
LicenseFile=myapp\license.rtf
OutputBaseFilename="myapp-1.0-win32"
DisableStartupPrompt=yes
DefaultDirName={pf}\mycompany\myapp
DefaultGroupName=mycompany
AppCopyright=Copyright é 2006 My Company.
AllowNoIcons=yes
AlwaysShowGroupOnReadyPage=yes
Compression=lzma/max

[Messages]
BeveledLabel=My PhpDock Based Application 1.0

[Files]
Source: "phpdock\phpdock.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "phpdock\license.txt"; DestDir: "{app}"; Flags: ignoreversion

[Icons]
Name: "{group}\My PhpDock Based Application"; Filename: "{app}\phpdock.exe"; WorkingDir: "{app}";
Name: "{group}\Uninstall My PhpDock Based Application"; Filename: "{uninstallexe}"
Name: "{userdesktop}\My PhpDock Based Application"; Filename: "{app}\phpdock.exe"; WorkingDir: "{app}"

[Run]
Filename: "{app}\phpdock.exe"; Description: "Launch My PhpDock Based Application"; Flags: nowait postinstall skipifsilent

[Files]
Source: "phpdock\phpdock.ini"; DestDir: "{app}";
; php will be installed into php subdirectory
Source: "php\*"; DestDir: "{app}\php"; Flags: recursesubdirs ignoreversion
; myapp will be installed into myapp subdirectory
Source: "myapp\*"; DestDir: "{app}\myapp"; Flags: recursesubdirs ignoreversion

[ini]
Filename: "{app}\phpdock.ini"; Section: "Handlers"; Key: "application/x-httpd-php"; String: """{app}\php\php-cgi.exe"""
Filename: "{app}\phpdock.ini"; Section: "HTTPServer";  Key: "DocumentRoot"; String: "myapp"
Filename: "{app}\phpdock.ini"; Section: "HTTPClient";  Key: "DefaultDocument"; String: ".\myapp\default.html"
; if you have 404 handler it may make sense to enable it:
Filename: "{app}\phpdock.ini"; Section: "ErrorHandlers";  Key: "404"; String: "/myapp/404.php"
Filename: "{app}\php\php.ini"; Section: "Session";  Key: "session.save_path"; String: """{app}\php\sessions"""


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


Joined: 10 Dec 2006
Posts: 37
Reply with quote
And if anyone is using NSIS, here's the equivalent code:

WriteINIStr $INSTDIR\phpdock.ini "Handlers" "application/x-httpd-php" "$INSTDIR\php\php-cgi.exe"
WriteINIStr $INSTDIR\phpdock.ini "HTTPServer" "DocumentRoot" "web"
WriteINIStr $INSTDIR\phpdock.ini "HTTPClient" "DefaultDocument" ".\web\index.php"
WriteINIStr $INSTDIR\php\php.ini "Session" "session.save_path" "$INSTDIR\php\sessions"
View user's profileFind all posts by Andrew PeacockSend private message
Deploying PHP Dock Applications
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