Hi everyone, I've been dealing with this "problem?" for 2 days and I think I need somebody else's help.
In short: I'm trying to enable PHP interpreter using the Abyss Console web interface, but when I use the "Browse..." button to [select] the file it just doesn't show on the list, so I can't select it, I can see other files and go directories down/up, but php, php-cgi, php5 files just don't appear.
My system:
OS: Kubuntu 8.04.2 Desktop LTS (Hardy Heron)
kernel: Linux 2.6.24-23-generic #1 SMP Wed Apr 1 21:47:28 UTC 2009
PHP: PHP 5.2.4
Abyss Web Server: X1 (2.6)
This is what I have done and tried:
1.- I have successfully installed Abyss Web Server in /home/sistemas/bin/abyssws/ . The whole directory belongs to my user and group. I also have sudo privileges:
$ ls /home/sistemas/bin/abyssws/
total 1.2M
-rwxr-xr-x 1 sistemas sistemas 1.1M 2007-09-05 10:55 abyssws*
-rwxr-xr-x 1 sistemas sistemas 4.0K 2007-09-05 10:55 autostart-setup*
drwxr-xr-x 2 sistemas sistemas 4.0K 2007-09-05 10:55 console/
drwxr-xr-x 2 sistemas sistemas 4.0K 2007-09-05 10:55 doc/
drwxr-xr-x 2 sistemas sistemas 4.0K 2009-07-14 16:18 htdocs/
-rw-r--r-- 1 sistemas sistemas 582 2007-09-05 10:55 Installation Instructions.html
drwxr-xr-x 2 sistemas sistemas 4.0K 2007-09-05 10:55 kcstore/
drwxr-xr-x 2 sistemas sistemas 4.0K 2009-07-14 14:29 lang/
-rw-r--r-- 1 sistemas sistemas 8.2K 2007-09-05 10:55 license.txt
drwxr-xr-x 2 sistemas sistemas 4.0K 2009-02-24 18:20 log/
-rw------- 1 sistemas sistemas 767 2009-07-15 13:09 persist.data
Then I modified the htdocs/index.html file just adding a link to a phpinfo.php file:
<a href="/phpinfo.php">PHP info</a>
the content of it is just:
<?php
phpinfo();
?>
2.- I have successfully ran the abyssws command for the first time to only create the abyssws.conf file then I hit CTRL+C to stop it, and took notes of the ports opened which were 8000 and 9999
$ ./abyssws --start
Abyss Web Server X1 (v 2.6)
Copyright (C) Aprelium - 2001-2009
-- Default host on port 8000 is up and running (Local URL http://127.0.0.1:8000)
Console local URL: http://127.0.0.1:9999
Signal #2 received. Shutting down the server...
the abyssws.conf file was created OK:
$ ls -lh abyss.conf
-rw------- 1 sistemas sistemas 12K 2009-07-15 15:53 abyss.conf
3.- I have successfully installed the autostart feature using root privileges with the sudo command:
$ sudo ./autostart-setup install
[sudo] password for sistemas: *****
[: 167: Illegal number:
Adding system startup for /etc/init.d/abyssws ...
/etc/rc0.d/K99abyssws -> ../init.d/abyssws
/etc/rc1.d/K99abyssws -> ../init.d/abyssws
/etc/rc6.d/K99abyssws -> ../init.d/abyssws
/etc/rc2.d/S99abyssws -> ../init.d/abyssws
/etc/rc3.d/S99abyssws -> ../init.d/abyssws
/etc/rc4.d/S99abyssws -> ../init.d/abyssws
/etc/rc5.d/S99abyssws -> ../init.d/abyssws
despite the "167 error" it works.
4.- I have successfully installed php-cgi from the official repositories in Kubuntu. I have not mixed repositories from other versions:
$ which php
/usr/bin/php
$ ls /usr/bin/php*
lrwxrwxrwx 1 root root 21 2009-07-13 19:06 /usr/bin/php -> /etc/alternatives/php*
-rwxr-xr-x 1 root root 5.1M 2009-04-17 09:37 /usr/bin/php5*
-rwxr-xr-x 1 root root 5.0M 2009-04-17 09:37 /usr/bin/php5-cgi*
lrwxrwxrwx 1 root root 25 2009-07-15 14:11 /usr/bin/php-cgi -> /etc/alternatives/php-cgi*
$ php -v
PHP 5.2.4-2ubuntu5.6 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 17 2009 14:31:37)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
5.- I have successfully initiated the web server and is listening:
$ /etc/init.d/abyssws start
Starting Abyss Web Server daemon...
$ sudo netstat -l -n -p | grep abyssws
[sudo] password for sistemas:
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 20773/abyssws
tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 20773/abyssws
6.- I have successfully browsed to the default page at
http://localhost:8000/, and I also have logged in to
http://localhost:9999/
Here comes the problem:
I go through "Configure Host", "Scripting Parameters", "Enable Script Execution", "Add Interpreter", "FastCGI (Local - Pipes)", "Browse...", then I navigate to /usr/bin/ but I just can't select any php file because they just don't appear on the list ..... I see many other files but no one related to php. So I have to go back and write the full path to the interpreter, and I have tried all these:
/usr/bin/php
/usr/bin/php-cgi
/usr/bin/php5
/usr/bin/php5-cgi
/etc/alternatives/php
none of them worked. I also tried looking inside these directories as they are in the $PATH environment variable:
$ echo $PATH
/home/sistemas/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
I also marked the [] box to add extensions, and added the associated extensions (php) and the virtual path is set to "/*.php". I also went to "Index files" and added "index.php" to be looked for along with "index.html" and "index.htm". Finally I restarted the web server using the "Restart button".
Abyss restarts OK but when I go to
http://localhost:8000/ and click on the link to the phpinfo.php file the status bar of the web browser just keeps showing "waiting for localhost ..." and I have to hit Esc and go back, so I can see Abyss hasn't crashed.
I read that sometimes "FastCGI (Local - Pipes)" has to be changed to "CGI/ISAPI" or "PHP Style" to "Standard" and here's what happens when trying several combinations:
CGI/ISAPI + Standard:
restarts by itself? YES
localhost shows "Error 500 Internal Server Error" when clicking on the link that redirects to phpinfo.php
CGI/ISAPI + PHP Style:
restarts by itself? NO, I had to kill and restart
then localhost shows "Error 500 Internal Server Error" when clicking on the link that redirects to phpinfo.php
FastCGI (Local - Pipes) + Standard:
restarts by itself? YES
then localhost shows "Waiting for localhost ..." when clicking on the link that redirects to phpinfo.php
FastCGI (Local - Pipes) + PHP Style:
restarts by itself? NO, I had to kill and restart
then localhost shows "Waiting for localhost ..." when clicking on the link that redirects to phpinfo.php
Every time I had to kill Abyss:
This didn't work:
$ sudo /etc/init.d/abyssws stop
Stopping Abyss Web Server daemon...
$
because .....
$ sudo netstat -l -n -p | grep abyssws
[sudo] password for sistemas:
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 7603/abyssws
tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 7603/abyssws
unix 2 [ ACC ] STREAM LISTENING 106910 7603/abyssws /tmp/abws-fcgi-00000000-00000b3300004268
$
that made me go to:
$ ls /tmp/ab*
srw------- 1 sistemas sistemas 0 2009-07-15 11:31 /tmp/abws-fcgi-00000000-00000b3300004268=
srw------- 1 sistemas root 0 2009-07-14 18:21 /tmp/abws-fcgi-00000000-00001597003d6e90=
srw------- 1 sistemas sistemas 0 2009-07-15 13:40 /tmp/abws-fcgi-00000000-000019670000e678=
srw------- 1 sistemas sistemas 0 2009-07-15 13:42 /tmp/abws-fcgi-00000000-00001b2300005208=
so I had to send SIGKILL (-9) because SIGTERM (-15) didn't work on these processes:
~/bin/abyssws/abyssws -d
+ ~/bin/abyssws/abyssws --slave --interactive -d
+ ~/bin/abyssws/abyssws --slave --interactive -d
+ ~/bin/abyssws/abyssws --slave --interactive -d
After killing Abyss I restarted it as usual and then I went to try the every configuration recently applied.
I hope not to bother with this long post, I just wanted to be sure to show you all what I have tried. I also read several other posts here in the forum (about 8 or 10), using PHP keyword in the search box, but none of the solutions offered on them has worked for me.
Thank you all for taking the time to read this, and for your kind guidance.
Suscriptor,
in MEXICO.