home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 1692
Discussions: 188,402, Posts: 2,243,609, Members: 232,632
Old January 25th, 2005, 12:31 AM   Digg it!   #1 (permalink)
Member
 
Join Date: Jan 2004
Posts: 242
php using linux (debian)

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

engineuity is offline   Reply With Quote
Old January 25th, 2005, 12:33 AM     #2 (permalink)
Real gangstas sip on Yacc
 
jkrohn's Avatar
 
Join Date: Oct 2001
Location: Suckas-ville
Posts: 4,549
Send a message via ICQ to jkrohn Send a message via AIM to jkrohn Send a message via Yahoo to jkrohn
The default HTML root should be
/var/www/html/ or something along those lines.

Jkrohn

jkrohn is offline   Reply With Quote
Old January 25th, 2005, 12:38 AM     #3 (permalink)
Senior Member
 
James T's Avatar
 
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.

James T is offline   Reply With Quote
Old 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
engineuity is offline   Reply With Quote
Old January 25th, 2005, 12:41 AM     #5 (permalink)
Real gangstas sip on Yacc
 
jkrohn's Avatar
 
Join Date: Oct 2001
Location: Suckas-ville
Posts: 4,549
Send a message via ICQ to jkrohn Send a message via AIM to jkrohn Send a message via Yahoo to jkrohn
no, putting http://localhost/ or http://ipaddressofserver/ in a web-browser.

Jkrohn
jkrohn is offline   Reply With Quote
Old January 25th, 2005, 12:44 AM     #6 (permalink)
Senior Member
 
James T's Avatar
 
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.
James T is offline   Reply With Quote
Old January 25th, 2005, 12:47 AM     #7 (permalink)
Real gangstas sip on Yacc
 
jkrohn's Avatar
 
Join Date: Oct 2001
Location: Suckas-ville
Posts: 4,549
Send a message via ICQ to jkrohn Send a message via AIM to jkrohn Send a message via Yahoo to jkrohn
As root try apachectl status
This will tell you if it is running.
apachectl start will start it.

Jkrohn
jkrohn is offline   Reply With Quote
Old 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
engineuity is offline   Reply With Quote
Old 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
engineuity is offline   Reply With Quote
Old January 25th, 2005, 01:10 AM     #10 (permalink)
Senior Member
 
James T's Avatar
 
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.
James T is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian install on NTFS HD? rsteve Linux and Unix 6 February 11th, 2004 11:55 PM
DO LINUX/WINDOWS USERS FAVOR INTEL/AMD ? MegalosSkylaki Applications and Operating Systems 39 January 2nd, 2003 06:21 PM
Linux sande Applications and Operating Systems 18 August 14th, 2002 09:30 PM
thinking of switching to mandrake freem Applications and Operating Systems 34 December 11th, 2001 09:11 PM

Most Active Discussions
Is It Just Me? (2906)
3-days in and no threads about Gaza (161)
Misery Loves Company... (2144)
New Build ( Finally ) (7)
CPU wont boot (7)
Building a gaming computer advice (5)
I think I just killed my computer w.. (24)
RCA 52Inch HDTV wont turn on (5)
Folderchat Weekday thread (444)
Recent Discussions
Futronix has water features? (0)
Laptop proccesor to desktop mob.. (2)
Please help! multiple problems! (4)
RCA 52Inch HDTV wont turn on (5)
New Build ( Finally ) (7)
Common Spyware Solutions (97)
How do you move a hard-drive to.. (4)
What is the best external enclo.. (0)
Partition Magic 7.0 (Unallocate.. (17)
Blackberry Storm, Gears of War .. (1)
Core 2 Quad Q9550 system (3)
COWBOOM Ripoff! Used Laptop w/$.. (4)


All times are GMT -4. The time now is 04:34 AM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28