Follow us on Twitter!
Don't judge the unknown - Grindordie
Saturday, April 19, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 26
Guests Online: 25
Members Online: 1

Registered Members: 82835
Newest Member: phanton2043
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

need help with php

deadsun
Member

Your avatar

Posts: 13
Location:
Joined: 04.11.08
Rank:
Newbie
Posted on 26-02-10 21:03
hey I'm just getting it the whole server side scripting thing and I'm working on a couple of websites and I'm trying to start learning PHP and SQL but in order to do that I have to have a server, so I download Apache and set up a LAMP server to start learning. The problem is I have no experience at all with Apache or PHP. So My question is how do I run php scripts? iv goggled and goggled and all it says is to put it in you're root DIR for the web site and open you browser and call the page. the problem is is I don't know how to call it from my computer because I don't know the default host name, and iv messed around in /ect/apache2 folder with the config. files but I keep getting a dead end. Any help or links is greatly appreciated. and also is "/var/www" the sites root DIR?


Author

RE: need help with php

ynori7
Member



Posts: 1486
Location: #valhalla
Joined: 08.10.07
Rank:
God
Posted on 26-02-10 22:41
I'm assuming you're using linux based on your post. On my linux box the location you put your html/php/js etc files is /var/www/htdocs. Judging by where your said you config file is, you're probably on Ubuntu, so it's probably /var/www/http.

Assuming you've got apache configured (you can easily find tutorials for that online), just open your browser and type "http://localhost" and it should display "It Works!" which is the default content of the provided index.html file. You can access other files in your document root for example by typing this url: "http://localhost/testDirectory/testFile.html". You can also say 127.0.0.1 instead of localhost if you really want to.


halls-of-valhalla.org/images/affiliateLogo.png voodoorage.halls-of-valhalla.org/images/smallLogo.png
i537.photobucket.com/albums/ff338/ynori77/archenemysig1.jpg
ynori7 http://halls-of-valhalla.org
Author

RE: need help with php

korg
Admin from hell



Posts: 2798
Location: ENDING YOUR ONLINE EXPERIENCE!
Joined: 01.01.06
Rank:
God
Posted on 27-02-10 03:06
This is clearly covered in the php help manual, Read it if you still have problems. Real cut and dry.


i57.photobucket.com/albums/g215/korg1269/shodan13.jpg

I deal in pain, All life I drain, I dominate, I seal your fate.
O R
Author

RE: need help with php

deadsun
Member

Your avatar

Posts: 13
Location:
Joined: 04.11.08
Rank:
Newbie
Posted on 27-02-10 18:36
Awesome thank you, I got it to work, and I did read about Apache on google I just couldn't get it to load but I see now, and just out of curiosity would anyone suggest learning ASP because I believe PHP can do the same stuff and since its not from Microsoft its probably a lot better and more compatible, but just wondering. and also people cant get access to my root DIR because i have no domain right? I don't want to be sending anything out and not know I'm doing it. and yes good job at gessing the OS I am running Ubuntu Smile




Edited by deadsun on 27-02-10 18:47
Author

RE: need help with php

spyware
Member



Posts: 4192
Location: The Netherlands
Joined: 14.04.07
Rank:
God
Warn Level: 90
Posted on 27-02-10 18:50
deadsun wrote:
Awesome thank you, I got it to work, and I did read about Apache on google I just couldn't get it to load but I see now, and just out of curiosity would anyone suggest learning ASP because I believe PHP can do the same stuff and since its not from Microsoft its probably a lot better and more compatible, but just wondering. and also people cant get access to my root DIR because i have no domain right? I don't want to be sending anything out and not know I'm doing it. and yes good job at gessing the OS I am running Ubuntu Smile


Learn PHP. ASP is a novelty at best. No one will be able to view your Apache server if you haven't forwarded to that port (80) on your router. If you have a router, that is. You can also edit some stuff in Apache to only allow (certain) computers in your network to access it.



img507.imageshack.us/img507/3580/spynewsig3il1.png
"The chowner of property." - Zeph
[small]
Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term.
- Carl Sagan
“Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor?” - Ebert
[/s
http://bitsofspy.net
Author

RE: need help with php

deadsun
Member

Your avatar

Posts: 13
Location:
Joined: 04.11.08
Rank:
Newbie
Posted on 27-02-10 19:41
That's awesome I need to look into how to do that and start learning more about ports and Apache configuration. I think ill just stick with PHP and move on to SQL because .ASP doesn't sound like being worth my time when I have so much other stuff to learn. but just to make sure i understand you correctly I could connect to my sever from another computer even with out a domain? I'm guessing its something like http://myIpAdress/home.htm, or do you connect to an listing port at the IP address, assuming the configuration is set up to allow the access. also I just ran into a problem for some reason when i run my homepage through Apache it do sent bring up my background, but it dose if I just run the page though. WTF the background is stored in a file called Images and is being called by JavaScript with "Images/back.jpg" as the source. iv tried taking it out of the Images folder and just calling back.jpg as source but still no luck. any suggestions on why it wont work? all the rest works fine including the rest of the JavaScript? Sorry I'm asking so much I'm just really into this right now, its like a new world to explore.





Edited by deadsun on 27-02-10 20:01
Author

RE: need help with php


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 27-02-10 21:16
deadsun wrote:
That's awesome I need to look into how to do that and start learning more about ports and Apache configuration. I think ill just stick with PHP and move on to SQL because .ASP doesn't sound like being worth my time when I have so much other stuff to learn. but just to make sure i understand you correctly I could connect to my sever from another computer even with out a domain? I'm guessing its something like http://myIpAdress/home.htm, or do you connect to an listing port at the IP address, assuming the configuration is set up to allow the access. also I just ran into a problem for some reason when i run my homepage through Apache it do sent bring up my background, but it dose if I just run the page though. WTF the background is stored in a file called Images and is being called by JavaScript with "Images/back.jpg" as the source. iv tried taking it out of the Images folder and just calling back.jpg as source but still no luck. any suggestions on why it wont work? all the rest works fine including the rest of the JavaScript? Sorry I'm asking so much I'm just really into this right now, its like a new world to explore.


To connect to a server without a domain, all I had to do was to log onto my DSL modem-router and set up 'port forwarding'. Basically what that is it that if the router encounters any traffic destined for a port that you specify, it forwards it to your machine. I'll save you the trouble and tell you this outright, if you do it like that, keep your machine on for longer periods because if you don't, your ISP can reassign you a different IP address for your machine after every reboot.

Regarding your other question I'd refer you to the w3schools free tutorials on HTML and PHP.
Author

RE: need help with php

deadsun
Member

Your avatar

Posts: 13
Location:
Joined: 04.11.08
Rank:
Newbie
Posted on 28-02-10 14:39
sweet ill remember that but I don't have a router so it will be a while before I can try that, I have a laptop and my desktop is about 10 years old and wont even turn on for some reason (still working on that), but thanks for all the help, I'm just going to work on PHP for a while.


Author

RE: need help with php


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-02-10 17:08
Also check this for learning PHP: http://w3schools.. . .efault.asp


Author

RE: need help with php

deadsun
Member

Your avatar

Posts: 13
Location:
Joined: 04.11.08
Rank:
Newbie
Posted on 28-02-10 20:52
thanks I love w3schools, the PHP part is easy, but the SQL part is a royal pain to rember lol


Author

RE: need help with php

deadsun
Member

Your avatar

Posts: 13
Location:
Joined: 04.11.08
Rank:
Newbie
Posted on 28-02-10 21:22
cool site now I just need the time to learn all this and I'm good lol


Author

RE: need help with php


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-02-10 23:13
MoshBat wrote:
deadsun wrote:
thanks I love w3schools, the PHP part is easy, but the SQL part is a royal pain to rember lol

So try another tutorial.
http://www.tizag.. . .lTutorial/
I think that was the one I used years ago.


Yeah the tizag one's fantastic as well. I actually think I'd recommend that over w3schools now that I think about it. I remember they had a very helpful walk through of the $_POST and $_SESSION variables that was quite helpful at the time when I read it.
Author

RE: need help with php

spyware
Member



Posts: 4192
Location: The Netherlands
Joined: 14.04.07
Rank:
God
Warn Level: 90
Posted on 28-02-10 23:32
MoshBat wrote:
Personally, I cannot stand w3schools. So God-damn boring.


Interactive demo's... comprehensive reference lists... broad knowledge base...

Sorry Mosh, shit's the best newcomers guide you're going to get.



img507.imageshack.us/img507/3580/spynewsig3il1.png
"The chowner of property." - Zeph
[small]
Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term.
- Carl Sagan
“Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor?” - Ebert
[/s
http://bitsofspy.net
Author

RE: need help with php


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 01-03-10 01:49
MoshBat wrote:
Personally, I cannot stand w3schools. So God-damn boring.

spyware wrote:

Interactive demo's... comprehensive reference lists... broad knowledge base...

Sorry Mosh, shit's the best newcomers guide you're going to get.

MoshBat wrote:
But it is boring.

When you want to learn bad enough, that doesn't matter. w3schools and Tizag are interchangeable to me. They both provide a good foundation to get your feet wet but, when you want to progress beyond an introduction, you'll end up searching elsewhere online.

w3schools is also the more established resource. Tizag is a copycat, which makes it just as good, but no more.

Also, going back up a bit in the thread: If you are more inclined to VB-style syntax, then ASP is the better choice. If the C-style syntax appeals to you (C/C++, etc.), then PHP is the better choice. My preference is obviously PHP (as everyone knows) but, ultimately, the best language for you to choose is the one that has what you expect from a language.

If you don't have enough experience in programming to know which style of syntax appeals to you, then just choose PHP. Out of the two, it is going to be easier to learn and easier to progress beyond when you decide to expand.


Author

RE: need help with php


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 01-03-10 01:54
MoshBat wrote:

I didn't know you needed a walkthrough of those. Personally, I cannot stand w3schools. So God-damn boring.




Like most people I don't know until I learn. So of course I needed a walkthrough the first time I learned it.

Edited by on 01-03-10 02:00
Author

RE: need help with php


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 01-03-10 02:01
t as snide initially.

Edited by on 06-03-10 09:07