blank output from php

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
walkern
-


Joined: 30 Mar 2007
Posts: 4

PostPosted: Mon Apr 02, 2007 1:57 pm    Post subject: blank output from php Reply with quote

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 View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Mon Apr 02, 2007 2:27 pm    Post subject: Reply with quote

Follow the tutorial at www.abyssunderground.co.uk/tutorials-php.php . This should get you up and running in no time if you follow every step and don't miss anything out/change anything.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Mon Apr 02, 2007 5:39 pm    Post subject: Re: blank output from php Reply with quote

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 View user's profile Send private message Send e-mail
walkern
-


Joined: 30 Mar 2007
Posts: 4

PostPosted: Mon Apr 02, 2007 10:41 pm    Post subject: Reply with quote

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 View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Apr 03, 2007 4:26 pm    Post subject: Reply with quote

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 View user's profile Send private message Send e-mail
walkern
-


Joined: 30 Mar 2007
Posts: 4

PostPosted: Tue Apr 03, 2007 5:21 pm    Post subject: Reply with quote

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:

Code:

<php
phpinfo();
?>


Apologies all round.
Back to top View user's profile Send private message
olly86
-


Joined: 25 Apr 2003
Posts: 993
Location: Wiltshire, UK

PostPosted: Tue Apr 03, 2007 11:44 pm    Post subject: Reply with quote

walkern wrote:
Code:

<php
phpinfo();
?>


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 View user's profile Send private message
walkern
-


Joined: 30 Mar 2007
Posts: 4

PostPosted: Wed Apr 04, 2007 12:39 am    Post subject: Reply with quote

I know :)

that's why I posted the code. I just missed it for a week ;)
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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


Powered by phpBB phpBB Group