Jump to content

Recommended Posts

Posted

Hello, Everyone.

 

I am having difficulty configuring my installation of PHP. I have followed Stefan's instructions in the video, and I am getting a 404 error with both http://localhost/'>http://localhost/ and http://127.0.0.1/'>http://127.0.0.1/ . I have also tried appending the "kill.php" file to both instances of the "Go To" command button in my browser. For example, in the address field I have tried to go to the following locations:

 

1. http://localhost

2. http://127.0.0.1

3. http://localhost/kill.php

4. http://127.0.0.1/kill.php

 

The kill.php file is in my htdocs directory where I think it should be, and where I understand from Stefan's instructions it should be.

 

Your help in resolving this error would be greatly appreciated.

 

Kind regards,

theAdmiral

Posted

hmm... htdocs directory, huh?

 

I'm using ArchLinux, and I've never really liked *buntu much, but Apache generally defaults to either /var/www/html/ or /home/httpd/html/ as the default folder in Linux. You are using Apache, I assume?

Posted (edited)

:rolleyes:

 

I am going to have to back up. Is there any reason why the permissions on this installation are so tight? Is there any reason why I should not just chmod 777 on everything in the LAMPP install? Everything is owned by root. Is there any reason why it has to be this way? Any suggestions at this point are most welcome.

 

BTW, the two directory paths that you referenced in the previous message are non-existent on my machine. I did a search for an "html" directory and came up with a dozen hits, most in "lib" and many extending downward. Any suggestions regarding this at this point would be most welcome.

 

Best regards,

theAdmiral

Edited by theAdmiral
Posted

/var/www is generally the root folder for apache in Linux, do you have that one?

 

And chmodding everything to 0777 is a bad practice to get into; it's not such a big deal on a local machine, but if you do that on a public webserver, you're asking to get hacked.

Posted

I changed ownership on /var/www throughout to me. Then I saved "kill.php" to /var/www. However, when I go to http://127.0.0.1 I get an "It works!" message. There is an HTML file in /var/www that has this in it. Should I just delete this file?

 

Also, when I try to go to http://127.0.0.1/kill.php, a dialog box comes up in my browser asking me if I want to open the file, and if so with what program, or if I want to save the file. This, too is a problem I could use some help with.

 

Many thanks,

theAdmiral

Posted (edited)

This is a common issue - it happened to me too. I solved this by completely uninstalling and reinstalling Apache. There is a thread about this issue here.

 

And yes, you can delete the file saying 'it works!'

Edited by monkeysaurus
Posted

/var/www is generally the root folder for apache in Linux, do you have that one?

 

Are you saying that /var/www from the "lampp" directory is supposed to be the default working directory for Apache? Or are you saying /var/www from [bold][underline]my[/underline][/bold] "root" directory is supposed to be the default working directory for Apache?

 

Thanks,

theAdmiral

Posted
I'm not quite sure what you mean by the 'lampp' directory, but it should be from your root directory.

 

Monkeysaurus,

 

Thanks for all of your help in getting LAMPP set up on my machine. As far as I can tell, and after testing a few things, everything works!

 

BTW, there is an "htdocs" directory in LAMPP 1.7 that is the default directory for index files and such, just in case anybody ever asks you.

 

Best regards,

theAdmiral

Posted

Good news, congrats!

 

I just googled for LAMPP - I'd never heard of it before, but apparently it's a port of XAMPP for Linux. (Now renamed..err...XAMPP for Linux!)

 

Hence the confusion - I've learned something too! I've always just used Apache, PHP and MySql seperately in Linux.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...