php installation

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


Joined: 08 Jun 2004
Posts: 10

PostPosted: Tue Jun 08, 2004 6:50 am    Post subject: php installation Reply with quote

I have installed abyss web server and added php support as shown in documentation. I have also created a small php script my.php containing:

<?
phpinfo();
?>

i have put it in htdocs directory.
Also in server parameters i have put 8080 as the port number.
Then when i access http://127.0.0.1:8080/my.php , it doesn't work. It says :
Error 500
Internal server error.

Can you please help me?
Thank you,
diviya
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Tue Jun 08, 2004 7:04 am    Post subject: Reply with quote

What are your PHP CGI settings
from the console interface ?
Back to top View user's profile Send private message Visit poster's website
diviya
-


Joined: 08 Jun 2004
Posts: 10

PostPosted: Tue Jun 08, 2004 7:27 am    Post subject: Reply with quote

my cgi parameters are as follows:

cgi interpreter: /usr/local/bin/php extn: php
cgi paths: /cgi-bin
/*.php
/
cgi environment variables:
REDIRECT_STATUS 200
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Tue Jun 08, 2004 7:31 am    Post subject: Reply with quote

remove / in the CGI paths thats your problem , in the
newest version , you don't need the / any more.
Back to top View user's profile Send private message Visit poster's website
diviya
-


Joined: 08 Jun 2004
Posts: 10

PostPosted: Tue Jun 08, 2004 7:34 am    Post subject: Reply with quote

i have removed /, but the error remains the same.
I have also tried putting my.php in cgi-bin directory but then it says file not found.

Thank you,
diviya
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Tue Jun 08, 2004 7:43 am    Post subject: Reply with quote

Can you post a screenshot of the console setting for the PHP
settings , just like the info you provided , did you set the right
PHP path in the Interpreter field ?
Back to top View user's profile Send private message Visit poster's website
diviya
-


Joined: 08 Jun 2004
Posts: 10

PostPosted: Tue Jun 08, 2004 7:53 am    Post subject: Reply with quote

i have added php path using which command.
when i type which php on lunix terminal, it says /usr/local/bin/php

and this is what i have added to the cgi parameters.
Back to top View user's profile Send private message
diviya
-


Joined: 08 Jun 2004
Posts: 10

PostPosted: Tue Jun 08, 2004 7:58 am    Post subject: Reply with quote

i have a screenshot of my cgi parameters, but how should i send it over to you.
how do we attach a file in this forum.

thank you,
diviya[/img]
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Tue Jun 08, 2004 8:08 am    Post subject: Reply with quote

You need to have it hosted on another web host or host it your
self , than use the forum image tags to show the image.
Back to top View user's profile Send private message Visit poster's website
diviya
-


Joined: 08 Jun 2004
Posts: 10

PostPosted: Tue Jun 08, 2004 8:42 am    Post subject: Reply with quote

can i send over the file directly to your mail id?
i don't have any public server avaialble to host it.

thank you,
diviya
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Tue Jun 08, 2004 9:23 am    Post subject: Reply with quote

Send to my e-mail address , trustpunk@hotmail.com
Back to top View user's profile Send private message Visit poster's website
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Tue Jun 08, 2004 11:39 pm    Post subject: Reply with quote

If you want, I can host it for you.

Also, check that directory to actually see if PHP is installed there (/usr/local/bin/php). Make a PHP file with Vim or whatever, and interpret it with the PHP interpreter.
_________________
Bienvenidos!
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
diviya
-


Joined: 08 Jun 2004
Posts: 10

PostPosted: Wed Jun 09, 2004 4:33 am    Post subject: Reply with quote

i executed the following command on linux terminal:
php my.php
and it worked well.
Back to top View user's profile Send private message
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Wed Jun 09, 2004 4:44 am    Post subject: Reply with quote

But have you found exactly where the PHP binary is located?
_________________
Bienvenidos!
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
diviya
-


Joined: 08 Jun 2004
Posts: 10

PostPosted: Wed Jun 09, 2004 4:47 am    Post subject: Reply with quote

yes it is located in /usr/local/bin/php

also When I see the phpinfo using command line php interpreter , I get the following info:

PHP Version => 4.3.4
System => Linux AstLinux01 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686
Build Date => Feb 19 2004 15:51:15
Configure Command => './configure' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-mysql=/usr/local/mysql'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/lib/php.ini
PHP API => 20020918
PHP Extension => 20020429
Zend Extension => 20021010
Debug Build => no
Thread Safety => disabled
Registered PHP Streams => php, http, ftp

Is php version a problem??

Or the way I have configured it ? with-apache & with-mysql that may be a problem??
Back to top View user's profile Send private message
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Wed Jun 09, 2004 4:52 am    Post subject: Reply with quote

Use this:
Code:
<?php
phpinfo();
?>
Depending on your configuration, you may need the "php."
_________________
Bienvenidos!
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Jun 09, 2004 1:27 pm    Post subject: Re: php installation Reply with quote

diviya,

First of all, do not use <?. Use instead <?php as most PHP configuration won't recognize the first opening tag by default.
Second, remove the executable bit from your file my.php using the shell command

Code:
chmod -x my.php


Does it work now?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
diviya
-


Joined: 08 Jun 2004
Posts: 10

PostPosted: Thu Jun 10, 2004 7:12 am    Post subject: Reply with quote

I installed abyss web server on another machine which has red hat linux 9. and it worked fine there . php scripts are working fine. Earlier machine has red hat linux 7.1 with kernel version of 2.4.7-10 with glibc version of glibc-2.2.4-13. Hence though it satisfied all the machine requirements, still there was something missing.

i tried chmod -x my.php on earlier machine but still it did not work. i am still not able to find why it did not work on older machine.

Thank you,
diviya
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Jun 11, 2004 1:56 pm    Post subject: Reply with quote

diviya,

OK, this sound like a problem with the PHP release you had on the old machine. We recommend upgrading PHP. We too had similar problems with the default PHP installation that comes with RH 7.1.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
diviya
-


Joined: 08 Jun 2004
Posts: 10

PostPosted: Mon Jun 14, 2004 4:35 am    Post subject: Reply with quote

Hello,

When I see the phpinfo using command line php interpreter , I get the following info:

I haven't used standard php that comes with RH7.1 . I have downloaded it and installed it myself.

Or the way I have configured it ? with-apache & with-mysql that may be a problem?? Because earlier I was using apache, but now we need to shift to some other web server.

Thank you,
Diviya

PHP Version => 4.3.4
System => Linux AstLinux01 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686
Build Date => Feb 19 2004 15:51:15
Configure Command => './configure' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-mysql=/usr/local/mysql'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/lib/php.ini
PHP API => 20020918
PHP Extension => 20020429
Zend Extension => 20021010
Debug Build => no
Thread Safety => disabled
Registered PHP Streams => php, http, ftp
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Jun 15, 2004 1:07 pm    Post subject: Reply with quote

diviya,

When configuring and compiling PHP yourself, you should pay attention to paths. This is the main reason of failure of PHP when run from Abyss Web Server. Avoid using relative paths in the configuration of PHP.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
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