NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] PHP not being recognized--problem finding php-cgi


Joined: 03 Feb 2008
Posts: 45
Reply with quote
I have the following in my phpdock.ini file, but when I run PHPDock, it does not render the PHP pages as PHP - it only shows the text. Does anyone know why it is not recognizing my PHP pages as PHP? Thank you.


[MimeTypes]
.php=application/x-httpd-php

[Handlers]
;the below is how I want my app to run - where I want it to run from.
application/x-httpd-php="C:\InnoSetup\my_app_scripts\php\php-cgi.exe"
View user's profileFind all posts by a_edwallSend private message
PHP not being recognized - apparent problem finding php-cgi


Joined: 03 Feb 2008
Posts: 45
Reply with quote
I commented this line out of the .ini file.

;InitialUrl=http://localhost:${HTTPServer:Listen}/index.htm

and the PHP pages are now being reconized and processed as PHP. BUT, the graphics that should be loaded from the main phpdock.exe directory are not being recognized. Geesh! Guess I will move them.

Also, when I commented out:

application/x-httpd-php="C:\InnoSetup\my_app_scripts\php\php-cgi.exe"

and it seemed to run okay. It must be recognizing that file from one of my other direcotries. Better try everything on a virgin machine.

Does that make sense?
View user's profileFind all posts by a_edwallSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
It looks like you commented InitialUrl and made phpdock working with your local apache or IIS server. Check that.
BTW, did you check that C:\InnoSetup\my_app_scripts\php\php-cgi.exe works at all? Try to run it with a script in the command line.

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


Joined: 03 Feb 2008
Posts: 45
Reply with quote
I believe I noticed that that line was added back in automatically, although like this:

InitialUrl=http://localhost:${HTTPServer:Listen}/

without the index.htm at the end.

No, I have no evidence that suggests that phpdock is running via apache. I do have apache and PHP on my computer for other purposes. And I did have a problem with the php.ini file for that conflicting with the php.ini file needed for the PHP used by phpdock. What I had to do was remove php.ini from c:\windows and c:\php, remove the InitFileDir registry key that pointed to either c:\windows or c:\php, and put my main php.ini file in c:\Program Files\Apache Group\Apache. Now my Apache is happy with its php.ini file in c:\Program Files\Apache Group\Apache and phpdock is happy with its own little php.ini file in its little php sub-directory. My current phpdock.ini file is:

Code:

...
[HTTPServer]
DocumentRoot=astrowin_php_scripts
Listen=8001
DirectoryIndex=index.php index.html index.htm

[HTTPClient]
InitialUrl=http://localhost:${HTTPServer:Listen}/
DefaultDocument=.\astrowin_php_scripts\index.html

[MimeTypes]
.php=application/x-httpd-php

[Handlers]
application/x-httpd-php="C:\Program Files\AstroWin PHP Scripts\php\php-cgi.exe"

[Handlers]
application/x-httpd-php=php/php-cgi.exe

Note the additional reference to [Handlers] that was added by phpdock - or something.
Perhaps I do not need

application/x-httpd-php="C:\Program Files\AstroWin PHP Scripts\php\php-cgi.exe"

but only

application/x-httpd-php=php/php-cgi.exe

I should try to see if removing one or the other makes things not work.

I removed both lines and run phpdock.exe.

It automatically added:

[Handlers]
application/x-httpd-php=php/php-cgi.exe

back in.

So I guess my code line:

application/x-httpd-php="C:\Program Files\AstroWin PHP Scripts\php\php-cgi.exe"

is not needed. Good.

Thank you.


Allen
View user's profileFind all posts by a_edwallSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
without the index.htm at the end

It looks like your application has no index.htm file, therefore index.php or index.html from the DirectoryIndex list picked up after index.htm was removed.

Regarding handlers, application/x-httpd-php="C:\Program Files\AstroWin PHP Scripts\php\php-cgi.exe" will not work if there is no php-cgi.exe in that directory. Please make sure if it is there and it works.

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


Joined: 03 Feb 2008
Posts: 45
Reply with quote
>> Please make sure if it is there and it works.

Yes, it is there and it works. I think you missed the point of my solution. In fact, I already said that because of:

application/x-httpd-php=php/php-cgi.exe

being automatically added, I no longer need:

application/x-httpd-php="C:\Program Files\AstroWin PHP Scripts\php\php-cgi.exe"


So as far as I'm concerned, everything seems okay. I post all this stuff so someone else who has the same trouble can see the solution quickly and save the time that I spent trying to find the right pieces of the puzzle.

Thank you for your time.


Allen
View user's profileFind all posts by a_edwallSend private message
[resolved] PHP not being recognized--problem finding php-cgi
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