logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Help for a Newbie
Author
Minklet



Joined: 29 Jan 2008
Posts: 7

PostPosted: Tue 29 Jan '08 23:08    Post subject: Help for a Newbie Reply with quote

Firstly, I apologise for my lack of knowledge and experience. If I could find the information i needed, I wouldn't ask. I know how irritating people who don't recognise google's search function can be, especially if the answer is staring them in the face.

However, I have spent the good part of the last 2 weeks attempting to get Apache, mySQL and PHP working nicely in order for me to learn how to make dynamic websites. I have a few books and also have been using w3schools.com to learn HTML CSS (of which i already have a passable knowledge) and PHP.

However, the installation guides fall short whenever i try anything. All i want to do is be able to view my pages of code to make sure it is correct.

I've installed Apache fine and can get it working. Also, mySQL seems to work fine. However, when i edit the httpd.conf file to include the LoadModule and AddType lines, it refuses to restart the server. I checked the log files to find this:
Cannot load C:/PHP/php5apache.dll into server: The specified module could not be found.

However, this is the correct path. I have edited the PATH to include the PHP folder and have edited the php.ini file according to instructions. I'm completely lost now, I just cant find any reason why this won't work and its driving me mad.


Sorry for the long post, i'm just trying to express the complete despair I feel after trying to get this working for so long. I've also installed PHP and mySQL onto my Mac, only for my mac to completely die with no good reason.

If anyone can help, I will be massively grateful
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 29 Jan '08 23:26    Post subject: Reply with quote

php5apache.dll is for Apache 1.3.x
php5apache2.dll -> Apache 2.0.x
php5apache2_2.dll -> Apache 2.2.x
Back to top
Minklet



Joined: 29 Jan 2008
Posts: 7

PostPosted: Tue 29 Jan '08 23:31    Post subject: Reply with quote

Thankyou very much, I have edited this and it starts fine.

However, now when entering http://localhost I am greeted by a login dialogue box. I have no username or password set for this and i have no idea what to put.

Again, i apologise for my lack of knowledge
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 29 Jan '08 23:50    Post subject: Reply with quote

Check to see if it is your router that you are getting asking you for the un/pw
(there should be some clue on the login dialog that comes up). This seems to be a common problem for some.


Gregg
Back to top
Minklet



Joined: 29 Jan 2008
Posts: 7

PostPosted: Wed 30 Jan '08 0:02    Post subject: Reply with quote

I've check my router, there are no password settings I can make out.

The box says:

Authentication required.
Enter username and password for "" at http://localhost



This problem didnt occur before I installed PHP and added the module to the httpd.conf

When i entered http://localhost before, it came up with "It Works!"
and i could even open the phpinfo script to test it, which did come up properly. Though trying any other scripts did not.

I have just replaced the httpd.conf with the original again and it is still happening, so I don't know what i have changed
Back to top
Minklet



Joined: 29 Jan 2008
Posts: 7

PostPosted: Wed 30 Jan '08 14:27    Post subject: Reply with quote

Can anyone please help? Really am completely stuck and have no idea where to go. If I wanted to restart the installation, is there a complete list of files i should delete from the prefetch and windows folders?

Does it make a difference that I installed mySQL first? I did not modify the security settings however and did not enter a password.

I think ill reinstall Apache, mySQL and PHP as I just cant think of anything to do.
Back to top
Minklet



Joined: 29 Jan 2008
Posts: 7

PostPosted: Wed 30 Jan '08 16:10    Post subject: Reply with quote

Also, I should add, when i try to locate a specific file i.e. http://localhost/test.php It tells me that the "Page cannot be found"
Back to top
Minklet



Joined: 29 Jan 2008
Posts: 7

PostPosted: Wed 30 Jan '08 16:54    Post subject: Reply with quote

For f***s sake this is the most ludicrously labyrinthine installation of a program i've ever imagined. Ive managed to get past the username and password by adding my listening port to the localhost URL. However, despite being able to use the php info script, it now wont read any other php.

This is a joke, ive been trying to install this for 2 weeks now. How can it possibly be this complex when its a prerequisite to install this if you all you want to do is LEARN.

I found a patch on the apachelounge forum because apparently the dll for php5 supplied with the zip does not work with apache 2.2 Whilst ignoring that this is absolutely rediculous in itself, i followed the instructions to find that the replacement is actually php5apache2.dll and so wont work as it needs to be php5apache2_2.dll Obviously renaming hasnt worked, when i tried to load it apache crashed.

Can one of you please help? I know its irritating having to talk people who are new to things through, but ive exhausted all my options now. I cant think of anything else to do and i wouldnt ask on here if i had an alternative. I cant afford to pay someone to teach me, I don;t have a tutor to go to and all the books and internet resources contradict each other or are less than unhelpful.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Wed 30 Jan '08 20:30    Post subject: Reply with quote

re: "Can one of you please help?"

Actually, we are pretty much unable to. We know too much about your "complete despair", "2 weeks effort", "Mac completely died for no reason", and "being a newbie" - and far too little about the exact software you have and how you are trying to install it. Exact version numbers are very important if you are looking for detailed instructions.

For example, you do not mention which version of Apache you are running and where you got it (Apache Lounge or ASF). We hope you have some version of PHP version 5 installed, but refering to "the instructions" and using files which come from "the zip" leave us wondering which of the (hundreds of) PHP installation instructions you are reading, and which of the (dozens of) PHP-related zip files you downloaded.

Learning HTML, CSS, Apache, and PHP is a worthy cause, but it is not like installing some end-user retail software like Adobe PhotoShop, etc. I think you need a better organized approach to your efforts.

The Apache Lounge Forum Rules have some brief advice about how to ask a question successfully. If you are serious about learning all this stuff without the help of a tutor (which is certainly possible for anyone - I did it!) - then Eric Raymond's long but excellent essay"How To Ask Questions The Smart Way" will be well worth your time.

On a more immediate level. You should first:
    * get Apache running and test it thoroughly and completely
    * create several HTML pages in different directories and make sure they are accessable without username/password prompts
    * make sure your Apache web site is accessible from outside your local network.
    * if you have a router-configuration problem, get it figured out before you tackle PHP
We are a little skeptical of "I've check my router, there are no password settings I can make out. " - not much we can do to help you without knowing what kind of router and exactly what you did.

After you are sure that Apache is 100% solid and well tested, you should install PHP version 5 and configure Apache to use it. The instructions in this post are somewhat old, so if you use them be sure to read down to the November 8, 2006 note where the correct module name for Apache 2.2 changed from php5apache2.dll to php5apache2_2.dll.

You cannot simply rename php5apache2.dll to php5apache2_2.dll. That won't work. It is the software contained in the file, not the file name, which matters. You need the correct php5apache2_2.dll. If you install the PHP version 5.2.5 Windows Binary from http://www.php.net/downloads.php the correct php5apache2_2.dll file is included.

Apache must be able to find the file named php5ts.dll in order to run PHP5. Normally this file is in your Windows PATH, so there is no problem.
If, for some reason, it is not in your PATH after installing PHP - you can tell Apache where to find the file with the LoadFile directive:
Code:
LoadFile "C:/PHP/php5ts.dll"
If you do this, be sure to put the LoadFile directive before your LoadModule directive.

Hope this is helpful,
-tom-
Back to top
Minklet



Joined: 29 Jan 2008
Posts: 7

PostPosted: Thu 31 Jan '08 0:11    Post subject: Reply with quote

Very. Thankyou very much for taking the time to write that.

The mood in my previous posts was one of desperation, fuelled by about 8 different forums having no information or even a response. Im happy to work hard at this...I just find it almost impossible to find definitive information, as you say, there are almost as many different versions as there are programmers.

I have since managed to uninstall and reinstall Apache 2.0 and php5 and have them working ok (touch wood). I still have a small problem with the listening port...but thats something i will investigate later. In the meantime I will be learning PHP.


Again, thankyou for your efforts and apologies for sounding like I wanted someone to hand me an installer that did the lot. Although, someone did point me in the direction of a WAMP...some kind of all-in-one thing. I'm assuming though that to get a decent grasp of all of this, I should avoid these and learn how to do it manually.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Thu 31 Jan '08 1:42    Post subject: Reply with quote

It's good to hear that you are up and running, and even better to learn you are not discouraged.

FYI - Apache 2.2 is the current Apache version, and the current release is 2.2.8.
Apache 2.2.8 is available here at Apache Lounge, and also at http://httpd.apache.org/download.cgi.
There are small differences (different compiler, two code changes) between the two, so it is good to be specific about where you got Apache.

Apache 1.3 and Apache 2.0 are the "legacy" Apache versions, usually used by production shops which are reluctant to upgrade.
The current release of Apache 2.0 is 2.0.63 which is available at http://httpd.apache.org/download.cgi. There are no Apache Lounge downloads for Apache 2.0 or Apache 1.3.

There's nothing wrong with your choice of using Apache 2.0, but be sure to say so whenever you post or most folks will just guess that you are using the latest release of Apache 2.2.

As glsmith pointed out, you use php5apache2.dll with Apache 2.0 - but you would use php5apache2_2.dll if you had Apache 2.2 (since November, 2006).

If your goal is to learn about Apache and PHP, you are doing the right thing. WAMP would get you up and running quicker, but you will end up learning more if you use Apache and PHP directly without too much pre-packaging.

Good luck,
-tom-
Back to top


Reply to topic   Topic: Help for a Newbie View previous topic :: View next topic
Post new topic   Forum Index -> Apache