View previous topic :: View next topic |
Author |
Message |
walkern -
Joined: 30 Mar 2007 Posts: 4
|
Posted: Mon Apr 02, 2007 1:57 pm Post subject: blank output from php |
|
|
Hello,
I'm new to Abyss server, but not php or web servers.
I have followed the instructions for getting php running (I've tried the cgi version and the isapi version) from various websites including this one but I get the same result. I've even tried the Abyss preconfigured php download which has the same effect. I have tried Apache and IIS and they work fine, with the same version of php.
Basically, after configuring php (I've tried cgi/isapi and the fastcgi version), when I visit my basic index.php file (which does a phpinof(), the page is blank. If I do a view/source it outputs the raw php contents. This is subtly different to not having php installed as without php you get the output to the screen.
I've tried setting REDIRECT_STATUS to 200 as well, and modifying cgi_redirect in the php.ini file and still the same.
Anyone got any ideas? It's definitely running php as after starting the server it locks the dlls/exe's in the php directory.
Thanks. |
|
Back to top |
|
 |
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Mon Apr 02, 2007 5:39 pm Post subject: Re: blank output from php |
|
|
walkern wrote: | when I visit my basic index.php file (which does a phpinof(), the page is blank. If I do a view/source it outputs the raw php contents. This is subtly different to not having php installed as without php you get the output to the screen. |
If you see the PHP instructions when you request the source of the displayed page from your browser, this means that you have not associated the php file name extension with the declared interpreter as explained in the instructions (Abyss Web Server has to know which file are to be processed by the PHP interpreter, and it relies on their extensions for that).
If the problem persists, please send your abyss.conf file to support@aprelium.com (do not forget to add a reference to this forum message). _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
walkern -
Joined: 30 Mar 2007 Posts: 4
|
Posted: Mon Apr 02, 2007 10:41 pm Post subject: |
|
|
Hello,
I have set everything up correctly I believe, and php is associated with the php cgi. If I don't associate .php with php executable the contents of the php file is output to the browser window as if it were a text file. My problem is the browser is showing nothing on the screen but when you view source, it is the source code of the php file, which is subtly different. It's as if php is interpreting it according to the extension but not doing anything with it.
I've just tried it on another computer using the same version of php and the same abyss setup, and it seems to work, so it appears to be just the one computer with the problem.
btw, one strange thing that happened twice on this computer (I've tried installing it three times) is although I installed everything each time, on the first two occasions neither the docs were installed nor was .net configured within abyss.
I'll forward the config file to the email you mention tomorrow when I get it. |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Apr 03, 2007 4:26 pm Post subject: |
|
|
walkern wrote: | My problem is the browser is showing nothing on the screen but when you view source, it is the source code of the php file, which is subtly different. It's as if php is interpreting it according to the extension but not doing anything with it. |
When this happens, this either means that:
* Abyss Web Server is not sending the file to PHP because the file extensions associated with PHP does not include that file's extension
* Or PHP is processing the file but is not recognizing the <? character you're using to start PHP statements. To enable <? processing, you'll have to change a parameter in your php.ini file. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
walkern -
Joined: 30 Mar 2007 Posts: 4
|
Posted: Tue Apr 03, 2007 5:21 pm Post subject: |
|
|
omg!
I'm the biggest donkey in the world! i'm going to die of embarrassment, especially as I've reinstalled abyss 4 times and re did php about a dozen.
here is my php, can you spot my error:
Apologies all round. |
|
Back to top |
|
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Tue Apr 03, 2007 11:44 pm Post subject: |
|
|
The error is very simple, your opening php command is wrong. You've got <php, but you need to add a '?' so that it looks like:
<?php _________________ Olly |
|
Back to top |
|
 |
walkern -
Joined: 30 Mar 2007 Posts: 4
|
Posted: Wed Apr 04, 2007 12:39 am Post subject: |
|
|
I know :)
that's why I posted the code. I just missed it for a week ;) |
|
Back to top |
|
 |
|