| ★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum5/HTML/002138.html | Nouvelle recherche | Portail wanayoo |
|
|
DevShed Discussion Forums
![]() PHP
![]() Newbie:Can't view file.php in browser
|
| next newest topic | next oldest topic |
| Author | Topic: Newbie:Can't view file.php in browser |
|
mlleong09 Member |
I've successfully install mysql-3.22.32, php4 and apache-1.3.12. Everything went fine. I've type a simple php script and tried to view in my browser(Nestcape) but the file doesn't not appear! Instead there's a dialog box asking me to save the file. I've already uncomment 2 lines in httpd.conf as instructed. Please help me. ------------------ |
|
jgagner Member |
We'll abviosly the server isn't parsing the php file. You sure you installed PHP correctly? |
|
mlleong09 Member |
dear jgagner, I've install php-4.0.0.tar according to the instruction.(The Soothingly Seamless Setup of Apache, SSL, MySQL, and PHP - June 07, 2000 ) Could u guide me the correct way of installation and configuring php? How can i detect that i've install php correctly? [This message has been edited by mlleong09 (edited July 27, 2000).] |
|
dwarf Member |
Did you set the AddType directive in httpd.conf??? It seems that Apache doesn't know that the *.php file is parsable... Check that directive, and tell us what you've found... |
|
mlleong09 Member |
Yes. I've set the AddType directive in the httpd.conf(located in the /usr/local/apache/conf). Below is the statement : AddType application/x-httpd-php .php3 .php |
|
rycamor Member |
What operating system is your server running? And what is the filename and source code of the simple php script you are trying to run? |
|
tigg Member |
Try killing the pid of httpd then starting apache again. ps -alef|grep httpd |
|
aarongb Member |
The default lines in httpd.conf refer to php3, not php4. Additionally, you may have forgotten to restart Apache afer installing PHP, or editing httpd.conf. Use this instead: to test installs, put this in a file called phpinfo.php4 <? |
|
mlleong09 Member |
My OS is Corel Linux. The simple script i'm trying to run is as below : <html><head><title>PHP Test</title></head> <body> <? php echo "Hello<P>"; ?> </body></html> i have save this document as test.php reply for aarongb: the browser display: Should i change back php4 to php3?(already stated in the httpd.conf that those 2 statement is for php4) I'm quite lost, please help me ... reply for tigg: [This message has been edited by mlleong09 (edited July 28, 2000).] |
|
dwarf Member |
Waht about the Action directive?? Or maybe ScriptAlias directive?? Did you set these two??? |
|
mlleong09 Member |
What should i write for the Action directive and script alias? where should i write those statement?(which line / paragraph in httpd.conf). |
|
aarongb Member |
Okay, If you have installed php as an Apache module, use #1 below. if you have installed it as CGI follow #2. 1. make sure the following is uncommented in httpd.conf: 2. And while I'm here, to answer for Tigg, when you run "ps -alef|grep httpd" the very first number that appears is the pid (process ID) for each process. You may have many httpd processes running. Simply do "Kill -TERM nn" nn is the pid derived from the above ps command. Additionally, "/usr/local/apache/bin/apachectl start" works, and I have gotten "/usr/local/apache/bin/apachectl restart" to work occassionally (but not on my latest install from RPM)which lets you avoid the whole "ps..." command. And keep php4, even though you are having some problems, its worth it in the end. We've all run into little undocumented "ass-pains" occassionally. |
|
mlleong09 Member |
I've already uncomment those LoadModule and AddModule, but it still can't solve the problem. Netscape browser still can't view the below script(phpinfo.php) : <? phpinfo() ?> I notice that there is 2 httpd.conf file. one is at etc/apache and the other is at usr/local/apache/conf. which is the file that the system will execute. I notice that the contents is not the same. LoadModule statement is at etc/apache whereas AddType Application is at usr/local/apache/conf. Is it because Corel Linux is a subset of Debian, then the apache won't work? This bother me coz' i've install the same thing(mysql, php4 and apache) to Red Hat Linux and the browser can view the php script. When i type http://localhost/ Red hat pc will display apache test page website and corel linux pc will display the debian GNU Linux. |
|
tigg Member |
the pid is the number at the top of the fourth column when you do the "ps ..." command |
|
mlleong09 Member |
I've read through the Debian website and found out that /usr/local is not under Debian control, therefore any installation should be install under /usr/local/src. The bad news is, i've already install it under /usr/local/src but the php script still didn't workable(can't be browse at the browser). Is anyone out there could share your expertise ? I'm having such a big headache with this installation. I just want to develop php4 scripting under corel linux pc! [This message has been edited by mlleong09 (edited August 01, 2000).] |
|
osnap Junior Member |
Here is how I installed Apache with PHP4, maybe it'll help you some. First uncompress the files. Then: cd apache-xxx in apache dir do: ./configure --prefix=/usr/local/apache Then: cd .. cd php-xxx in php dir do: ./configure --with-mysql=/usr/local/mysql --with-apache=../apache-xxx --enable-track-vars make cp php.ini-dist /usr/local/lib/php.ini cd .. cd apache-xxx ./configure --activate-module=src/modules/php4/libphp4.a --enable-module=php4 --prefix=/usr/local/apache make edit httpd.conf so you have AddType application/x-httpd-php .php start apache with /usr/local/apache/bin/apachectl start then test it and it should work, it did for me. BTW, I don't think it matters where you install php and apache in corel, as long as you tell it when you configure it. And if you need any linux help go to www.linuxnewbie.org because there is a forum like this one there and someone there might can help you with corel more than I can. |
|
mlleong09 Member |
dear osnap, thanks a lot for the full guide of installation but that's also the same that i follow .. AND IT only works in Red hat Linux(as i mention earlier). anyway .. i've figure out how to install all those stuff in Corel Linux(which is under control Debian management). then the installation will succceed! |
All times are MST (US) | next newest topic | next oldest topic |
![]() |
|
Copyright © 1997-2000 ngenuity. All rights reserved.
Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.