[SLE] mod_php not interpreting <?php print ("hello, world\n"); ?>
I have SuSE 6.3. I have installed Apache and PHP using yast. The SuSE setup is slightly different from what I read in "MySQL" by Paul DeBois and in some of the README files, but conforms to README.SuSE for Apache. I did not setup the Apache SSL Server. I have entered the following in a file: - - - - - - - - - - - - - - - - - - - - <HTML> <BODY> <?php print ("hello, world\n"); ?> </BODY> </HTML> - - - - - - - - - - - - - - - - - - - - I do not see "hello, world" when I view the file with Netscape or lynx. I have tried several different file names and extensions, .php, .php3, .html and .phtml. The attachment file is the result of ps ax > ps.txt. It looks to me like PHP is running. I don't have a clear understanding of how apache works with the file or how to verify if PHP is running, other than running ps. Any help would be appreciated, I feel like I am drowning in documentation, but must be missing something. -- Regards, Bob Collins Mailto:bcollins@csd.net PID TTY STAT TIME COMMAND 1 ? S 0:11 init 2 ? SW 0:00 [kflushd] 3 ? SW 0:00 [kupdate] 4 ? SW 0:00 [kpiod] 5 ? SW 0:01 [kswapd] 6 ? SW 0:00 [md_thread] 67 ? S 0:00 /usr/sbin/syslogd 71 ? S 0:00 /usr/sbin/klogd -c 1 97 ? S 0:01 /usr/sbin/httpd -f /etc/httpd/httpd.conf -D PERL -D PHP 98 ? SW 0:00 [httpd] 104 ? S 0:00 /usr/sbin/atd 109 ttyS0 S 0:00 /usr/sbin/gpm -t mman -m /dev/mouse 124 ? S 0:00 /usr/sbin/lpd 142 ? S 0:00 sh /usr/bin/safe_mysqld --user=mysql --pid-file=/var/mysql/BCollins.pid --datadir=/var/mysql 154 ? SN 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/mysql --skip-locking --user=mysql --pid-file=/var/mysql/BCollins.pid --datadir=/var/mysql 156 ? SN 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/mysql --skip-locking --user=mysql --pid-file=/var/mysql/BCollins.pid --datadir=/var/mysql 157 ? SN 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/mysql --skip-locking --user=mysql --pid-file=/var/mysql/BCollins.pid --datadir=/var/mysql 162 ? S 0:00 sendmail: accepting connections on port 25 167 ? S 0:00 /usr/sbin/cron 171 ? S 0:00 /usr/sbin/in.identd -e 172 ? S 0:00 /usr/sbin/in.identd -e 173 ? S 0:00 /usr/sbin/in.identd -e 174 ? S 0:00 /usr/sbin/in.identd -e 175 ? S 0:00 /usr/sbin/in.identd -e 176 ? S 0:00 /usr/sbin/in.identd -e 177 ? S 0:00 /usr/sbin/in.identd -e 187 ? S 0:00 /usr/sbin/nscd 188 tty1 S 0:00 login -- root 189 tty2 S 0:00 /sbin/mingetty tty2 190 tty3 S 0:00 /sbin/mingetty tty3 191 tty4 S 0:00 login -- bob 192 tty5 S 0:00 login -- bob 193 tty6 S 0:00 login -- bob 194 ? S 0:00 /usr/sbin/nscd 195 ? S 0:00 /usr/sbin/nscd 196 ? S 0:00 /usr/sbin/nscd 197 ? S 0:00 /usr/sbin/nscd 198 ? S 0:00 /usr/sbin/nscd 199 ? S 0:00 /usr/sbin/nscd 200 tty1 S 0:00 -bash 208 tty6 S 0:00 -bash 216 tty6 S 0:00 sh /usr/X11R6/bin/startx 217 tty6 S 0:00 tee /home/bob/.X.err 226 tty6 S 0:00 xinit /home/bob/.xinitrc -- 227 ? S 0:48 /usr/X11R6/bin/X :0 230 tty6 S 0:04 kwm 243 tty6 S 0:03 kfm -d 249 tty6 S 0:00 kbgndwm 252 tty6 S 0:00 krootwm 255 tty6 S 0:02 kpanel 259 tty6 S 0:00 konsole -restore konsolerc.1 -icon konsole.xpm -miniicon konsole.xpmi -caption Konsole 261 tty6 S 0:04 kmoon 264 pts/0 S 0:00 /bin/bash 265 tty6 S 0:01 /opt/kde/bin/kblankscrn.kss -delay 15 -install -corners iiii -nice 0 270 tty6 S 0:09 /usr/X11R6/bin/xosview.bin 271 tty5 S 0:00 -bash 279 tty5 S 0:02 mc 280 ? S 0:00 cons.saver /dev/tty5 281 pts/1 S 0:00 bash -rcfile .bashrc 282 tty6 S 1:05 /opt/netscape/netscape 283 tty6 S 0:00 [netscape] 336 tty4 S 0:00 -bash 370 pts/0 S 0:00 bash 489 tty6 S 0:01 kedit -caption Text Editor -icon kedit.xpm 490 ? Z 0:00 [cron <defunct>] 511 tty4 R 0:00 ps ax -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Bob Collins wrote:
I have SuSE 6.3. I have installed Apache and PHP using yast. The SuSE setup is slightly different from what I read in "MySQL" by Paul DeBois and in some of the README files, but conforms to README.SuSE for Apache. I did not setup the Apache SSL Server.
I have entered the following in a file: - - - - - - - - - - - - - - - - - - - - <HTML> <BODY>
<?php print ("hello, world\n"); ?>
</BODY> </HTML> - - - - - - - - - - - - - - - - - - - -
I do not see "hello, world" when I view the file with Netscape or lynx. I have tried several different file names and extensions, .php, .php3, .html and .phtml.
The attachment file is the result of ps ax > ps.txt. It looks to me like PHP is running. I don't have a clear understanding of how apache works with the file or how to verify if PHP is running, other than running ps.
Any help would be appreciated, I feel like I am drowning in documentation, but must be missing something.
You can see if php is running by accessing http://localhost/test.php3. That should get you a PHP test page (at least it did on my 6.1). I have little or no experience with PHP, but when I tried your 'hello, world' example, it didn't produce any opening or closing <p> or </p> tags. I don't know if this would make Lynx barf, but my Netscape seemed to cope. Still, you should really include the opening/closing tags... As I said, I'm not sure exactly how PHP works, so take this with a large pinch of salt... do you have to enable some sort of scripting for the directory from which you are trying to run it? You may need to add a handler in /etc/httpd/httpd.conf, but I would have thought SuSE would have done this. Hope that helps a bit... Chris -- __ _ -o)/ / (_)__ __ ____ __ Chris Reeves /\\ /__/ / _ \/ // /\ \/ / ICQ# 22219005 _\_v __/_/_//_/\_,_/ /_/\_\ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (2)
-
bcollins@csd.net
-
chris.reeves@iname.com