January 25th, 2005, 12:31 AM
|
#1 (permalink)
| | Member
Join Date: Jan 2004
Posts: 242
|
i apt-got apache php4 and mysql (going to have to do a school project of creating a db). but first i have to learn php and mysql. ive started out very basic using php for echo and $variables but i dont know how much that will help me out when interfacing with the database. anyways i cant seem to figure out how to view my php pages. on my school network, i need to save the php files in a specific folder that apache recognises. im assuming its the same on my linux comp? if so what is the folder that i am supposed to write to OR how do i point apache to the folder i would like to write to? (i have no knowledge of apache...is this important since i only intend on using php and mysql) seems like im rambling now so any help would be greatly appreciated. thanks |
| |
January 25th, 2005, 12:33 AM
|
#2 (permalink)
| | Real gangstas sip on Yacc
Join Date: Oct 2001 Location: Suckas-ville
Posts: 4,549
|
The default HTML root should be
/var/www/html/ or something along those lines.
Jkrohn |
| |
January 25th, 2005, 12:38 AM
|
#3 (permalink)
| | Senior Member
Join Date: Jul 2004 Location: New Zealand
Posts: 582
|
Have you opened the ports, started the httpd daemon, tried pointing your web browser at your box? apache has a default web page that pops up pre your custom ones. |
| |
January 25th, 2005, 12:40 AM
|
#4 (permalink)
| | Member
Join Date: Jan 2004
Posts: 242
|
pointing at my box as in /home/blah/blah.php as a webpage? if so then yes i tried that. i dont know how to start the httpd daemon and i dont know how to work around apache. does it need to be started up first like the mysql server |
| |
January 25th, 2005, 12:41 AM
|
#5 (permalink)
| | Real gangstas sip on Yacc
Join Date: Oct 2001 Location: Suckas-ville
Posts: 4,549
| |
| |
January 25th, 2005, 12:44 AM
|
#6 (permalink)
| | Senior Member
Join Date: Jul 2004 Location: New Zealand
Posts: 582
|
debian, hmmm somewhere in your /etc/rc.d or debian equivalent there should be a script that lets you start the server. if you 'grep -R httpd *' in the correct directory it should tell you which one. When you run it it'll show up in 'ps -ax | grep http' then point with your web browser and 'http://127.0.0.1/'. If you have a firewall configured you may need to open port 80, however for the 127 address this is normally not an issue (testing only). apache will log, probably to /var/log/apache/error_log and access_log. Might also show up in /var/log/syslog or /var/log/messages if it dies trying to start. |
| |
January 25th, 2005, 12:47 AM
|
#7 (permalink)
| | Real gangstas sip on Yacc
Join Date: Oct 2001 Location: Suckas-ville
Posts: 4,549
|
As root try apachectl status
This will tell you if it is running.
apachectl start will start it.
Jkrohn |
| |
January 25th, 2005, 01:07 AM
|
#8 (permalink)
| | Member
Join Date: Jan 2004
Posts: 242
|
ok i found the apache folders and i read in httpd.conf that the document root is in /var/www/
I also found that for a user directory you need a public_html/ in your user directory. tried putting the php file in both but mozilla still doesnt know how to open it . it acts like a download. i also chmoded the permissions to 777 but still wont open as a page |
| |
January 25th, 2005, 01:09 AM
|
#9 (permalink)
| | Member
Join Date: Jan 2004
Posts: 242
|
for $apachectl status i get Not Found ther requested server-status not found on the server ---------------Apache/1.3.33 Server at localhost Port 80
then tried apachectl start and it says its already running |
| |
January 25th, 2005, 01:10 AM
|
#10 (permalink)
| | Senior Member
Join Date: Jul 2004 Location: New Zealand
Posts: 582
|
jkrohn, good point about apachectl.
engineuity. You do NOT need to put the files in your public dir when it's your own machine. That's something ISPs do. There should be an /var/www/httpd/index.html file, or the like. Put a test.html file next to it and open http://localhost/test.html to test. |
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | |
Posting Rules
| You may post new threads You may post replies You may not post attachments You may not edit your posts HTML code is Off | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |