View previous topic :: View next topic |
Author |
Message |
diviya -
Joined: 08 Jun 2004 Posts: 10
|
Posted: Tue Jun 08, 2004 6:50 am Post subject: php installation |
|
|
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 |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue Jun 08, 2004 7:04 am Post subject: |
|
|
What are your PHP CGI settings
from the console interface ? |
|
Back to top |
|
 |
diviya -
Joined: 08 Jun 2004 Posts: 10
|
Posted: Tue Jun 08, 2004 7:27 am Post subject: |
|
|
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 |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue Jun 08, 2004 7:31 am Post subject: |
|
|
remove / in the CGI paths thats your problem , in the
newest version , you don't need the / any more. |
|
Back to top |
|
 |
diviya -
Joined: 08 Jun 2004 Posts: 10
|
Posted: Tue Jun 08, 2004 7:34 am Post subject: |
|
|
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 |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue Jun 08, 2004 7:43 am Post subject: |
|
|
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 |
|
 |
diviya -
Joined: 08 Jun 2004 Posts: 10
|
Posted: Tue Jun 08, 2004 7:53 am Post subject: |
|
|
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 |
|
 |
diviya -
Joined: 08 Jun 2004 Posts: 10
|
Posted: Tue Jun 08, 2004 7:58 am Post subject: |
|
|
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 |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue Jun 08, 2004 8:08 am Post subject: |
|
|
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 |
|
 |
diviya -
Joined: 08 Jun 2004 Posts: 10
|
Posted: Tue Jun 08, 2004 8:42 am Post subject: |
|
|
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 |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Tue Jun 08, 2004 11:39 pm Post subject: |
|
|
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 |
 |
 |
diviya -
Joined: 08 Jun 2004 Posts: 10
|
Posted: Wed Jun 09, 2004 4:33 am Post subject: |
|
|
i executed the following command on linux terminal:
php my.php
and it worked well. |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Wed Jun 09, 2004 4:44 am Post subject: |
|
|
But have you found exactly where the PHP binary is located? _________________ Bienvenidos! |
|
Back to top |
 |
 |
diviya -
Joined: 08 Jun 2004 Posts: 10
|
Posted: Wed Jun 09, 2004 4:47 am Post subject: |
|
|
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 |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Wed Jun 09, 2004 4:52 am Post subject: |
|
|
Use this:
Code: | <?php
phpinfo();
?> | Depending on your configuration, you may need the "php." _________________ Bienvenidos! |
|
Back to top |
 |
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed Jun 09, 2004 1:27 pm Post subject: Re: php installation |
|
|
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
Does it work now? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
diviya -
Joined: 08 Jun 2004 Posts: 10
|
Posted: Thu Jun 10, 2004 7:12 am Post subject: |
|
|
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 |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Jun 11, 2004 1:56 pm Post subject: |
|
|
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 |
|
 |
diviya -
Joined: 08 Jun 2004 Posts: 10
|
Posted: Mon Jun 14, 2004 4:35 am Post subject: |
|
|
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 |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Jun 15, 2004 1:07 pm Post subject: |
|
|
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 |
|
 |
|