Forum Moderators: mack

Message Too Old, No Replies

How to run php on Xp

         

apollo23

3:08 pm on Feb 1, 2005 (gmt 0)

10+ Year Member



Hi Guys

Am new to programming but vry interested to know more.

Basically hv volunteer myself to help maintain a new site. However the site was created in php and i cant run them on my Xp machine.

Got myself a php book and they recommended tht php best run on apache instead of IIS server.

So now i am stuck. Any suggestion pls?

Rgs
NOB

claus

3:39 pm on Feb 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



one word: Xampp

- enter that in your favorite search engine and have apache+mysql+php running in no time :)

Btw: Welcome to WebmasterWorld :)

Orbite

7:04 am on Feb 2, 2005 (gmt 0)

10+ Year Member



Another word : EasyPHP

:-)

apollo23

8:40 am on Feb 2, 2005 (gmt 0)

10+ Year Member



Hi Guys

Thank you very much for the prompt reply.

Will try it out these 2 days.

Rgs
NOB

apollo23

3:24 pm on Feb 2, 2005 (gmt 0)

10+ Year Member



Hi claus

Already download and installed xampp earlier..

After i run basic start, cant get the browser to show english text at the start html page(C:\apachefriends\xampp\install\start.html)

Any clue pls?

Thanks

NOB

tbear

9:28 pm on Feb 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've tried 3 ways of running Apache on my computer and all have failed (including the above, when I finally figured out the download instructions).
Well, I'm no idiot, but I guess I am missing something.......
I got along without it before I found it, I'll get along fine without it now.......LOL

coopster

1:57 am on Feb 3, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



There are a couple of options listed in the PHP Server Side Scripting Forum Library [webmasterworld.com].

Installing PHP5 Under Windows XP and Apache [webmasterworld.com]
Installing a new web server: Apache2, PHP5, MySQL4 and PHPmyAdmin [webmasterworld.com]

claus

5:56 pm on Feb 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Apollo23, the default start page should have links like this:

English / Deutsch / Francais / Nederlands

You can also reach it by entering: [localhost...] in your browser.

For me, clicking on English does the trick - it points to this address: [localhost...] - which sets the language to use for this page: [localhost...]

The latter page has the same language options listed in the navigation panel on the left side.

I really don't know why English doesn't work for you. All four languages should really work out of the box. Perhaps your download was corrupted, so that you should try downloading another file and installing again? That's about all i can think of at the moment.

apollo23

11:33 am on Feb 5, 2005 (gmt 0)

10+ Year Member



Hi Claus

Think i didnt word myself correctly.

I got to the page tht shows the languages..but after i click the Enlish option, it report this error message:

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.

--------------------------------------------------------------------------------

Please try the following:

Open the localhost home page, and then look for links to the information you want.
Click the Refresh button, or try again later.

Click Search to look for information on the Internet.
You can also see a list of related sites.


HTTP 500 - Internal server error
Internet Explorer

Rgs
Nob

claus

12:54 pm on Feb 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>> 500 Internal Server Error

At least there's one good thing about this. It means that you have Apache running as a web server, so that part worked just like it should.

Is it the same if you try the other languages listed?

So, what does this mean?

An error 500 usually occurs when there's an error in the programming of the page you're trying to display. It can also occur if the server tries to include a file that isn't there (404 leading to 500), if there's somthing wrong with file permissions (eg. "read only" when "execute" was expected), and all kinds of stuff.

Here's a nice thing about Apache: It keeps an error log by default. Look in the directory

C:\apachefriends\xampp\apache\logs 

(your path to "Xampp" might be another)

There you'll se a simple text file called "error.log". You can open it in notepad. Look at the entries for the time you tried to open that page and see what's causing the error. You can look at the same timestamp in the file "access.log" too, to find more information.

In my experience, the most usual thing giving this error is a missing semicolon (;) somewhere in the file - ie. a programming error. This is hard to track, however. Plus, you really shouldn't have to do that, as the files that come with xampp don't have errors like that. That's what led me to say that your download might have been corrupted.

---

Or, did you download the BETA version [apachefriends.org]?

If that is the case, try downloading version 1.4.10a [prdownloads.sourceforge.net] or version 1.4.11 [prdownloads.sourceforge.net] from sourceforge. If your problem is with 1.4.11, just "downgrade" to 1.4.10a - there'll be no loss of significant features, and it will be easy to upgrade later on, as there's an upgrade package [apachefriends.org] for that if you want to.

Here's the page with install info [apachefriends.org], it also details how to uninstall. Basically it's just selecting "uninstall" from your start menu, in the apachefriends/xampp folder.

I think it's the easiest option to just download and install one of the versions mentioned above.

Hope this helps.

apollo23

4:05 am on Feb 7, 2005 (gmt 0)

10+ Year Member



Hi Claus

Sry to trouble you agn.

Was doing nothing in the office and i d/l the wampp in my office. It works fine.Managed to get to the content in wampp folder.

My question is...sry it sounds stupid. Where shud we put the wrking files and folder? With IIS, we place them in the c:/Inetpub\Wwwroot\my folder right?

Thanks agn

Nob

claus

7:57 pm on Feb 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You should put files you publish in the folder "htdocs" - that's the folder that shows up as "localhost" in your browser.

The path could be something like: c:\apachefriends\xampp\htdocs

Youl'll see that there's a few sub folders already. You can just create new subfolders and they will show up in the browser as subfolders to localhost:

...\htdocs\myFolder\ on the PC becomes localhost/myFolder/ in the browser

The XAMPP site has very bad navigation, but there's some extra tips in the readme section (bottom) of this page [apachefriends.org] and also some extra information in the FAQ [apachefriends.org]

apollo23

12:31 am on Feb 8, 2005 (gmt 0)

10+ Year Member



Hi Claus

Thanks for the patience wit me.

Already got wampp installed and i can see the index.php when i click the English tab.

However, when i trace the file to C:\apachefriends\xampp\htdocs\xampp , i cant get it to show on the browser when i double click it.

That goes to the test files i tried to create myself.

Any suggestion pls?

Thanks.

Nob

claus

8:02 am on Feb 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>> when i trace the file to C:\apachefriends\xampp\htdocs\xampp , i cant get it to show on the browser

You'll notice this in the address bar of your browser:

file:///C:/apachefriends/xampp/htdocs/xampp/some-file.php

Meaning that you've opened a local file. You need to use the "localhost" path in the browser, like this:

http://localhost/xampp/some-file.php

Note that "localhost" is equal to "C:\apachefriends\xampp\htdocs\".

Even though this is the same file, the Apache webserver doesn't "see" it unless you use the localhost name. Apache can't "see" your C drive as such, it only "knows" that some part of your file system is localhost, and it needs this part in the URL in order to process the files. You don't need to enter the "http-colon-slash-slash" part of the URL though.

apollo23

11:34 am on Feb 9, 2005 (gmt 0)

10+ Year Member



Hi Claus

Maybe i am not clear with my question.

What i meant was that after tracing the file to the right folder, if we were to double click or right click the file and choose IE to open, it will start isnt it?

However i am not seeing anything.

mincklerstraat

1:02 pm on Feb 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, not really. Browsers are confusing sometimes since they are meant to work both on local files, and to work via http protocol - 'web protocol' - and these are very different things.

When you browse via [localhost...] it's http protocol, meaning your browser asks the server on your own computer to deliver the file via web protocol - i.e., generate a webpage. If you have c:\xampp\htdocs\yourfile.php in the address bar, it's just going to try to open the file without the webserver, and php files are text files. Normally, you won't want to open php files this way with a browser; you'll use a text editor to look at the files themselves, and a browser to try them out to see how the webpage looks (using http protocol, [localhost)....] Try downloading jedit or some good editor with php highlighting to see the file itself.

claus

3:19 pm on Feb 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yep, just like mincklerstraat said - you need to use localhost (and http) to see your files working.

apollo23

2:13 pm on Feb 10, 2005 (gmt 0)

10+ Year Member



Ok Guys

Thanks a million!
:)

NOB

apollo23

5:34 am on Feb 11, 2005 (gmt 0)

10+ Year Member



Sry guys

Since i am learning php + mysql in Zend.com, is there a post here that will teach me how to create my database in xampp?

Tried searching here but was not successful.

Thanks agn

Nob

claus

7:49 am on Feb 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know of a "Getting started with MySQL thread", so here's a small attempt at providing some basic information.


Running MySQL

XAMPP has already installed two databases for you. MySQL is one, the other is SQLite. If MySQL doesn't start automatically with XAMPP you can do one of these two things:

1) Install it as a Windows XP service:
Use the script "mysql_installservice.bat" in your folder "\xampp\mysql\" (just double click it). Then MySQL will start when you start Windows XP, so it's always running.

2) Start and stop it when you need it
Use the scripts "mysql_start.bat" and "mysql_stop.bat" - both are located in your "\xampp\" folder.

If you have done (1) you don't need to do (2). Personally i prefer method (2) but i have tried both and they work nicely. If you don't run Windows XP or Windows 2000 you cannot use method (1).


MySQL Admin tools

In the XAMPP right menu there's an item called PhpMyAdmin [phpmyadmin.net]. Basically this is a tool to edit and create databases. MySQL also comes with a few different tools [dev.mysql.com], some are commandline tools though. Also, the DMOZ has this list of MySQL tools [dmoz.org] - you can use any of these to admin your databases

You might also want to try the MySQL Administrator [mysql.com] and the MySQL Query Browser [mysql.com]. Both are free tools from MySQL.com - they do different things, though, but especially the Administrator is a very powerful tool.


MySQL Manual

There's a nice manual at MySQL.com: English [dev.mysql.com], Other languages [dev.mysql.com]. You might want to start with Chapter 3, the MySQL Tutorial [dev.mysql.com]

apollo23

6:47 pm on Feb 15, 2005 (gmt 0)

10+ Year Member



Hi claus

Sry for replying late..thks agn

Will try to play ard with it and hopefully i can attain 1% of your knowledge in 3 mths time!

Rgs
Nob