A better version of this can be found here:
http://unknown.network32.net/tutorial.basic-server
Often people suggest that you use pre-built packages to install PHP, MySQL, and Apache. And this is fine, and often a good idea.
However, if you're like me... you want cutting edge technology so you can have everything up to date. These packages, on the other hand, are usually behind, and make it hard to control your own server.
So here I will post essentially two guides - one for IIS (Internet Information Services), and another for Apache. While Apache is more powerful than IIS, I would recommend that *for some of you* IIS might be easier to use and configure. I personally use it because I know that if it works on IIS it will work on Apache. (whereas Apache has features IIS does not.)
To quickly jump to a section, click one of these:
- Installing PWS (http://www.simplemachines.org/community/index.php?topic=2859.msg32094#msg32094)
- Installing IIS (http://www.simplemachines.org/community/index.php?topic=2859.msg32096#msg32096)
- Installing Apache (http://www.simplemachines.org/community/index.php?topic=2859.msg32101#msg32101) (recommended if you are experienced.)
- Installing and Configuring PHP (http://www.simplemachines.org/community/index.php?topic=2859.msg32105#msg32105)
- Configuring PHP with IIS/PWS/Apache (http://www.simplemachines.org/community/index.php?topic=2859.msg32213#msg32213)
- Installing MySQL (http://www.simplemachines.org/community/index.php?topic=2859.msg32215#msg32215)
- Testing and Upgrading (http://www.simplemachines.org/community/index.php?topic=2859.msg32216#msg32216)
After you've done all that, you might want to:
- Learn something about MySQL (http://www.simplemachines.org/community/index.php?topic=5292.0)
-[Unknown]
To install PHP and MySQL using IIS you will need one of the following versions of Windows:
- Windows 95, 98, ME, NT. (using PWS, which is a stripped down version of IIS.)
- Windows 2000 Professional, 2000 Server, XP Professional, 2003 Server.
Installing PWS
If you are using Windows 95, ME, or NT... you will need the NT Option Pack. This "option pack" includes Personal Web Server - PWS - which will allow you to host yourself. It can be found here:
http://www.microsoft.com/ntserver/nts/downloads/recommended/NT4OptPk/default.asp
You will need to download this and run setup.
On Windows 98, it is included on the installation CD. Insert your Windows 98 CD, and choose "Browse This CD." Go into the folder "add-ons" and then "pws". Now run setup.exe.
If you do not have your CD, you can download the option pack above, but beware it can be a long and annoying download.
You may also want to pursue this knowledge base article:
http://support.microsoft.com/support/kb/articles/Q246/0/81.ASP
Now that you have the setup started....
Go into the setup and click "Custom". Now make sure Transaction Server and Personal Web Server are checked...which should be default... and click continue.
I would recommend using C:\Inetpub\wwwroot as your "WWW Service" directory, but it's really up to you.
And now you should be done. Skip down past the IIS and Apache tutorials to "Installing and Configuring PHP (http://www.simplemachines.org/community/index.php?topic=2859.msg32105#msg32105)".
-[Unknown]
Installing IIS
Installing IIS is remarkably easy. Don't sweat it.
First, go to Start -> Control Panel. Now select "Add or Remove Programs". On the left, select Add/Remove Windows Components. After it loads, scroll down to and highlight Internet Information Services (IIS) and click Details...
Make sure Common Files, Internet Information Services Snap-In, and World Wide Web Service are selected. Now click install and wait, all should be fine in moments.
If you have Windows XP Home Edition
This gets tricky for the Home edition. You'll have to have an install disk for XP Professional or one of the other OS's that do include IIS. And here's a guide on how to do it:
http://www.developersdex.com/asp/message.asp?p=577&ID=%3C3c3c9b9d%2E518663173%40news%3E
But I do not recommend this. If you are using Home, you most likely should just go ahead and use Apache. It's better anyway.
Now that you're done - skip to "Installing and Configuring PHP (http://www.simplemachines.org/community/index.php?topic=2859.msg32105#msg32105)".
-[Unknown]
Installing Apache
First off, download the appropriate version from here:
http://httpd.apache.org/download.cgi
I would recommend Apache 1.3.* instead of Apache 2.0.* only because I've heard 1.3 is more stable - for PHP at least. I am not sure though, so take your chances if you want. You can always uninstall, right? But, this is probably the file you want:
http://apache.towardex.com/httpd/binaries/win32/apache_1.3.29-win32-x86-no_src.exe
Once you have the installer up and running, click:
Next >, accept (do read it, please.), Next >, Next >..
Now type in a domain, I would recommend you use the default (hopefully?) or just something you know won't be a real domain. Like "localdomain". Server name might best be "localhost.localdomain". Email can be whatever you want. I also recommend STRONGLY that you run it as a service for best testing.
Now select Complete and continue. Keep hitting Next and then Install. Now hit Finish after a couple minutes or seconds.
Now open Internet Explorer or your favorite browser and type this into the location bar:
http://localhost/
If all was successful, it should show a test page with an Apache icon.
-[Unknown]
Installing PHP
This isn't really too hard. There's not *that* much you have to do. So go here:
http://www.php.net/downloads.php
Now get the zip file for the latest PHP 4 for Windows. PHP 5 is also available, but as of writing it's a bit too bleeding edge.
I recommend, personally, that you unzip it to C:\Program Files\. However, most people just extract it to C:\. It's your choice.
Rename the "php-4.x.x-Win32" folder to just PHP. That will make life easier ;). Less typing ;).
Configuring through php.ini
(if you're using NT or 2000, change "C:\WINDOWS" below to "C:\WINNT")
While the installer will do some of this for you, it's not as complete as the zip file and really botches up the whole process imho. So we're gonna go and do it manually. Bare with me, it's easy.
Okay, so go into your PHP folder - whereever you put it - and look for php.ini-recommended. That's the one both I and they recommend ;). Rename it to php.ini, and copy it into the C:\WINDOWS directory. Now open Notepad, and tell it to open that file. (you will have to select all.... or if Windows is still configured by defaults, just double click the file.)
You'll have to use Find a lot here.
------ This part is for IIS/PWS only!! ------
So hit Ctrl-F and type in ; cgi.force_redirect = 1. When you find it, change it to cgi.force_redirect = 0. Make sure that's the whole line. This makes it so PHP won't make sure Apache is running when it executes php.exe - basically, it's very important for IIS/PWS. (you're removing the semicolon ;).)
Now scroll to the top again and continue.
------ Alright, the rest is for everyone again. ------
Now press Ctrl-F and type extension_dir = "./". When you find it, change it to extension_dir = "./extensions/". Next find ;upload_tmp_dir = and change it to upload_tmp_dir = C:\WINDOWS\Temp
Press Ctrl-F again and this time type session.save_path = /tmp and change it to session.save_path = C:\WINDOWS\Temp.
Scroll back to the top again, and hit Ctrl-F. This time search for display_errors = Off and change it to display_errors = On
Okay, we're done editing php.ini. Yea.
This last part differs from most instructions - so I'll tell you both, and you can decide. I suggest that you copy "php4ts.dll" from the PHP directory into the "sapi" directory, but the PHP manual says to copy it into C:\WINDOWS\system32. (system on 95, 98, and ME.) Windows will find it in both places, so it's really your choice - I prefer not to "pollute" my system32 directory.
Now, this part is important only if you're using NTFS. You probably are if you are on 2000 or XP. Go to the folder C:\WINDOWS\Temp and right click on it, and select Properties. If you don't see a Security tab, close it and go to Tools -> Folder Options in the menu. Go to the View tab, and uncheck the "Use simple file sharing" checkbox at the bottom of the list. Now go to Properties again.
On the security tab, click Add... and type Everyone in the box. Select them in the list, and make sure they have Modify, Read, and Write permissions. You probably have to do this to the PHP folder too, but not in all cases. (so try it if you have problems later.)
-[Unknown]
Whatever you're using... copy the file php4ts.dll from the PHP installation directory into PHP\sapi. Then...
Configuring PHP - PWS
Open up the folder you put PHP in, and look in the "sapi" directory. See the two .reg files in there? Pick one, and open it with Notepad. It will say [PUT PATH HERE] - change this to C:\\Progra~1\\PHP or C:\\PHP. (or where ever, just double up the slashes.)
Now save and double click the file. Confirm it, and then open the Personal Web Manager (it should have installed a shortcut..) in which you should click Advanced, and then select <Home>, Edit Properties..., and check Execute and Scripts.
Configuring PHP - IIS
In IIS 6 (2003 Server), you will need to go to Web Service Extensions, right click the open area, and select Add...
Name it PHP or something, and add C:\Program Files\PHP\sapi\php4isapi.dll...
Check "Set extension status to Allowed" and click OK.
Open up Internet Services Manager (2000) or Internet Information Services (XP, 2003.) from the Administrative Tools menu under Control Panel. (it's in other places too.) Right click on Default Web Site and open up Properties. Click on the Home Directory tab, and change Execute Permissions to "Scripts only". Next, select Configuration... click Add, and type the path to sapi\php4isapi.dll - like "C:\Program Files\PHP\sapi\php4isapi.dll". (you can also browse for it.) In extension, put .php and make sure both Script Engine and Check that file exists are checked. Click OK several times and you should be set.
Configuring PHP - Apache
Go into the folder C:\Program Files\Apache Group\Apache\conf (or where ever you installed Apache.) and open up httpd.conf. Search for #LoadModule mime_magic_module modules/mod_mime_magic.so and add just above it LoadModule php4_module "C:/Program Files/PHP/sapi/php4apache.dll". Next search for AddModule mod_setenvif.c and add below it AddModule mod_php4.c. Next, search for AddType application/x-tar .tgz and add below it AddType application/x-httpd-php .php
-[Unknown]
Installing MySQL
This one's easy, folks. First off, go to MySQL AB's website:
http://www.mysql.com/downloads/mysql-4.0.html#windows (you may have to scroll down to find the Windows download.)
Pick the one with the installer, and let 'er rip. It's just a bunch of clicking next... and you're done. It'll setup a WinMySQLAdmin program, but you can close it and remove it from the Startup folder if you want.
Now we should be ready for... testing!
-[Unknown]
Testing the whole deal out.
Before testing it or anything, you'll most likely have to restart.... so do that first.
Open up Notepad, and type in:
<?php
phpinfo();
?>
Now save it, using the filename for your specific server - in IIS and PWS, this is "C:\Inetpub\wwwroot\phpinfo.php" (unless you changed it..) and on Apache it's "C:\Program Files\Apache Group\Apache\htdocs\phpinfo.php". Remember the quotes, those are important!
Now that you've done that, open up a new window in your favorite web browser. Type in the location bar:
http://localhost/phpinfo.php
If everything went well, you should get a screen with a PHP logo and other fun stuff.
Upgrading to new versions
This is easy - don't worry. For PWS, don't worry - they never plan to release a new version :P. For IIS, it's easy... just upgrade to a new version of Windows.
For Apache, just install the new version over your old. I would check the httpd.conf file to make sure it didn't undo anything, though. PHP is just as easy - just extract the zip, and copy it's contents into your PHP directory - and remember to fix permissions if you're on NTFS. MySQL is as simple as downloading the installer again and clicking Next a few times.
Happy goings!
-[Unknown]
alright!!!
well after going through your tut for IIS and making shure everything was right and it still failed to be accessable from the net I installed Apache over php and mysql and so far everything works great!
I would like to add one thing so .php files can be directory indexs too with out a .htaccess file in each directory
in httpd.conf find
<IfModule mod_dir.c>
DirectoryIndex index.html
</IfModule>
and add DirectoryIndex index.php so it looks like this!
<IfModule mod_dir.c>
DirectoryIndex index.html
DirectoryIndex index.php
</IfModule>
thats my one cent!! ;D
thanks [Unknown]!
oh one other thing how can I make Apache add the trailling forward slash so something like
http://aquilo.homeip.net/community
will still go to
http://aquilo.homeip.net/community/
thanks again!!
Personally, I wouldn't bother using IIS at all.
Quote from: Aquilo on November 17, 2003, 05:42:19 AM
well after going through your tut for IIS and making shure everything was right and it still failed to be accessable from the net I installed Apache over php and mysql and so far everything works great!
More is required for over the internet, but it should work locally.
Glad you got it working.
zoki, for the purposes of a personal server for testing, IIS can be easier.
-[Unknown]
thanx :-* i will try it when ive got some time to spare :)
I have to hand it to you Unknown, you're doing a great job with these, and at least getting some content in here while I'm busy doing my other things. I wanted to thank you for that :)
or use
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.htm
</IfModule>
some how the php doesnt seem to work :(
This what i see and not the phpinfo :(
<?php
phpinfo();
?>
Does anyone know what i am doeing wrong??
*acf
ps: i am running windows 2000 pro.
Quote from: </Acf> on November 23, 2003, 01:18:45 PM
some how the php doesnt seem to work :(
This what i see and not the phpinfo :(
<?php
phpinfo();
?>
Does anyone know what i am doeing wrong??
*acf
ps: i am running windows 2000 pro.
Did you configure using IIS or Apache?
-[Unknown]
oeps sorry forgot to put that in my post.
Apache. :)
Admittedly, I haven't tested that yet.... most of that was from the PHP manual somewhere. Although it made sense.
Apache 1 or 2? Did you remember to add AddType? Have you restarted Apache (probably your whole computer..) since you changed the conf file?
-[Unknown]
Quote from: [Unknown] on November 23, 2003, 02:17:09 PM
Admittedly, I haven't tested that yet.... most of that was from the PHP manual somewhere. Although it made sense.
Apache 1 or 2? Did you remember to add AddType? Have you restarted Apache (probably your whole computer..) since you changed the conf file?
-[Unknown]
I have rebooted my pc and now it works like a dream thanx [unknown] :) you are the greatest! :-*
if you open the file with the browser over the webserver you see the php code?
A note on configuring PHP - Apache from php.net:
If you would like to use PHP as a module in Apache, be sure to copy php4ts.dll to the windows/system (for Windows 9x/Me), winnt/system32 (for Windows NT/2000) or windows/system32 (for Windows XP) directory, overwriting any older file.
Quote from: Curbow 5 on November 27, 2003, 02:01:15 PM
A note on configuring PHP - Apache from php.net:
If you would like to use PHP as a module in Apache, be sure to copy php4ts.dll to the windows/system (for Windows 9x/Me), winnt/system32 (for Windows NT/2000) or windows/system32 (for Windows XP) directory, overwriting any older file.
Oops, totally forgot that step. Actually, you can copy it into the PHP directory in the sapi directory, which is what I've always done. Sorry, I did it instinctively... I'll add it to the guide.
Thanks.
-[Unknown]
I followed this manually with IIS on Windows 2000 Pro, PHP, and MySQL. Everything was done step by step. I rebooted, then placed the phpinfo script in the wwwroot directory and attempt to browse to it. http://localhost/phpinfo.php and it says, PAGE CANNOT BE DISPLAYED. I have verified the PHP file is indeed in the wwwroot directory. I just can not access it.. Any suggestions?
I goto localhost and I get the IIS screen so I know the webserver is indeed running.
FIXXED: The reason why is because I was not using PHP as the script executable.
Hi Unknown or anyone else who might be able to help. I followed this tutorial word for word but am having troubles. I got Apache installed and it tested fine. Got MySQL installed and PHP. Rebooted and tried to test with the phpinfo file and I get "page cannot be displayed error" . In addition if I type in http://localhost/ i get nothing now where as before I got the Apache welcome stuff. Im using WinXP Pro, Apache 1.3.29, PHP 4.3.4, etc.. can someone help get me going. Please!!!
EDIT: ok, when trying to start Apache using the .exe found in the Apache directory I get an error saying it cannot add the module: mod_php4.c
Here's what my httpd.conf looks like:
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule php4_module C:/Program Files/PHP/sapi/php4apache.dll
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule status_module modules/mod_status.so
#LoadModule info_module modules/mod_info.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule rewrite_module modules/mod_rewrite.so
#LoadModule anon_auth_module modules/mod_auth_anon.so
#LoadModule dbm_auth_module modules/mod_auth_dbm.so
#LoadModule digest_auth_module modules/mod_auth_digest.so
#LoadModule digest_module modules/mod_digest.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule headers_module modules/mod_headers.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule unique_id_module modules/mod_unique_id.so
#
# Reconstruction of the complete module list from all available modules
# (static and shared ones) to achieve correct module execution order.
#
# The modules listed below, without a corresponding LoadModule directive,
# are static bound into the standard Apache binary distribution for Windows.
#
# Note: The order in which modules are loaded is important. Don't change
# the order below without expert advice.
#
# [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE, UPDATE THIS TOO!]
ClearModuleList
#AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.c
#AddModule mod_mime_magic.c
AddModule mod_mime.c
AddModule mod_negotiation.c
#AddModule mod_status.c
#AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_isapi.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
#AddModule mod_speling.c
AddModule mod_userdir.c
AddModule mod_alias.c
#AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
#AddModule mod_auth_anon.c
#AddModule mod_auth_dbm.c
#AddModule mod_auth_digest.c
#AddModule mod_digest.c
#AddModule mod_proxy.c
#AddModule mod_cern_meta.c
#AddModule mod_expires.c
#AddModule mod_headers.c
#AddModule mod_usertrack.c
#AddModule mod_unique_id.c
AddModule mod_so.c
AddModule mod_setenvif.c
AddModule mod_php4.c
Did you forget to add LoadModule?
(LoadModule php4_module "C:/Program Files/PHP/sapi/php4apache.dll" should be near that block of LoadModules.)
-[Unknown]
I did that... I highlighted it for you to see. Any other suggestions?
Thanks
Jeff
Thanks [Unknown], although i had the LoadModule command in there for some reason I had the # sign in front like the others so it wasn't executing. Got it now and it works!! :D
Hi, [Unknown]!
this is my first post here and also my first step learning php. I came after i read u'r post @ www.emuforums.com. Hope i'll be accepted here :)
Okay, i had this problem after installing IIS and PHP. I only get HTTP 500 internal server error when opening php files. In second check i seems that i misread u'r guide and do the steps for PWS ( merging the reg files), and i don't know how to fix it. How?
thx in advance
Hmmm... this might not be good... well...
Try just doing the steps for IIS.... and, if that doesn't work, I'll tell you what to remove with RegEdit... (fun... :/)
Of course you'll be accepted here!
-[Unknown]
err... i've already continuing with the IIS step, but it's still th same 500 error :(
Hmm... well, try opening RegEdit... (Start -> Run -> type "regedit") browsing to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map
... and, deleting anything in there. (like ".php")
If that doesn't solve the problem, please tell me what operating system you're on...
-[Unknown]
still error.
i'm runnin' on win XP Pro
What happens if you try to run PHP from the command line?
Start -> Run -> type "cmd"... then type "echo. | c:\progra~1\php\php.exe"..
-[Unknown]
it says:
Content-type: text/html
X-Powered-By: PHP.4.3.4
Are you using ISAPI? Try using the CGI version... that is, where you put this:
"C:\Program Files\PHP\sapi\php4isapi.dll"
Change it to:
"C:\Program Files\PHP\php.exe"
-[Unknown]
Now the error page changes, and shows:
Security Alert! The PHP CGI cannot be accessed directly.
This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.
For more information as to why this behaviour exists, see the manual page for CGI security.
For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.
EDIT: WHOOPPPSS.. after reading once more the error page and the manual page, i think the problem is from the cgi redirect options, go check it, and RIGHT, i haven't deleted the semicolon.
{Slamming head to the nearest wall} :P
i think u should add a more specific instructions to delete the semicolon [Unknown].
Okay, thx alot. U'r help is very much appreciated.
{searching for a thumb smiley, but can't find any so decided to use: ;D}
Quote from: remura on December 24, 2003, 08:19:36 AM
i think u should add a more specific instructions to delete the semicolon [Unknown].
Actually, I think I must've forgotten a step because ISAPI should work.....
*later*
Alright, I've added two things I forgot that will make ISAPI work better under IIS:
QuoteThis last part differs from most instructions - so I'll tell you both, and you can decide. I suggest that you copy "php4ts.dll" from the PHP directory into the "sapi" directory, but the PHP manual says to copy it into C:\WINDOWS\system32. (system on 95, 98, and ME.) Windows will find it in both places, so it's really your choice - I prefer not to "polute" my system32 directory.
QuoteRename it to php.ini, and copy it into the C:\WINDOWS directory.
-[Unknown]
copied php4ts.dll to both sapi and windows/system32 directory, also copied php.ini to c:/windows.
reverted back to ISAPI, still don't work.
{i must admitted that i just realised that i copied the wrong files, PHP4ts.lib instead of the dll before this, but it's fixed now, no change :( }
What so the diff between ISAPi and the CGI one, BTW?
ISAPI is faster... not a huge difference, I guess.
You probably have to restart IIS. Yuo can do this by going to Start -> Run, and typing cmd... then, typing:
net stop w3svc & net start w3svc
Then try it.
-[Unknown]
i even had restarted my comp, and it's still don't fix. I guess i have to use CGI. I had a semester test for next week anyway, so i have to forget the php lesson for awhile
No that i have installed a server, i would like to know how yo configure it.
Because i don't know how to do the mysql config, like setting a root password and makking db's and things like that.
It would be cool if you could creat a tutorial for that :)
*acf :)
SET PASSWORD FOR root = PASSWORD('pass');
-[Unknown]
that did work :) thanx
Hello,
This is my first post here and my first time running apache, php, mysql.
I followered your tutorial Uknown but something odd is happening. Everytime i try to go to http://Localhost/phpinfo,php it tried to download the file.
im running apache on windows xp pro.
Would you like me to post my php.ini and my http.config file?
first thing is restart your apache server... coz if you've updated your http.config since your last restart, then it wont have made the changes...
next, make sure you've made the necesary changes in http.config.
If you've made teh changes it -should- know what to do with the php files
if not, yeah post the parts you edited or something...
*edit*
also, if you've chosen Apache2... then there are several things that wont work... so if you have (doesnt sound like it tho) then let me know, I'll tell you the config changes you need (it uses different files).
ive restart the server and computer twice. the only thing i did different was put the php4apache.dll in the php folder ebcause for some reason it wouldnt see it when it was in teh sapi folder.
here the php and http in text format. they should work i hope. I followered exactly what he told me to do.
im using apache 1.3
in the http file...
LoadModule php4_module "C:/php/php4apache.dll"
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule status_module modules/mod_status.so
I dont think order would matter..
but the guide says that should be:
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule php4_module "C:/php/sapi/php4apache.dll"
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule status_module modules/mod_status.so
Also, put the php4apache.dll in the sapi drive... it -should- work with this code (note the change of dir)
next, another order thing:
AddModule mod_so.c
addModule mod_php4.c
AddModule mod_setenvif.c
should be
AddModule mod_so.c
AddModule mod_setenvif.c
addModule mod_php4.c
Next, make sure you have Apache running as a service... assuming you installed it that way...
Control Panel --> Administrative Tools --> Services
Restart the "apache" service...
now this -should- work perfectly, only problem I can think of would be if you have installed another copy of apache which is the service thats running... (to test this, try adding some crapblah; line to the http file... and see if it causes an error when trying to start the service... if not, you're probably got another copy installed somewhere).
- hope it helps (also note, I'm not even remotely a pro or anything... so all of this is just conjecture... hope it helps tho :))
Quote from: Typical98 on February 08, 2004, 08:09:45 AM
ive restart the server and computer twice. the only thing i did different was put the php4apache.dll in the php folder ebcause for some reason it wouldnt see it when it was in teh sapi folder.
here the php and http in text format. they should work i hope. I followered exactly what he told me to do.
im using apache 1.3
You seem to have word wrapped the php.ini file you attached - this is not a good thing. If you drop a line that's long down, it might very well stop working.
In addition, because people like GUI stuff, I've attached a really dumb script to restart a service... it can be used with MySQL, Apache, IIS (aka w3svc), as well as any other service.
-[Unknown]
im sorry, what do you mean by word wrapped the php.ini file?
thanks for both your help. I did the changed that was said to do and its still tryuing to dl the file. Its probably the word wrap thing but i dont now what you mean by that.
Thank
-Typ
I have reformatted the files, hopefully they should work now.
I recommend you try a different editor than you currently use - one that won't wrap things. I use ConTEXT. (http://www.fixedsys.com/context/)
Please note; these files are only/may only be useful for Typical98. They are not "quick fix" configuration files that will work for anyone.
-[Unknown]
im using notpad to edit these things. The link for your context doesnt work. ill look it up on goodle. Ill edit this post to let ya now if it worked or not.
edit: hmmm it says that line 2 on the http.conf is invalid.
i got context and i opened the files you send me in notepad and copy and pasted it into context and used that to save
im asuming its something in this line'
<br />
<b>Warning</b>: ob_start(): output handler 'ob_gzhandler' cannot be used twice in <b>/home/simple/security/Sources/Display.php</b> on line <b>756</b>#
# Based upon the NCSA server configuration files originally by Rob McCool.
Please try downloading the files again; I seem to have made some typo PHP didn't agree with, but it should be fixed.
-[Unknown]
error on line 500, invalid command ' combined'
Search for this:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
And notice that on the next line you have this:
combined
Change those two lines to this:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
-[Unknown]
Same problem here ::)
I try to go to http://Localhost/phpinfo.php it tried to download the file.
well it starts up, but it still trys to download the file lol
Quote from: Typical98 on February 08, 2004, 05:04:36 PM
well it starts up, but it still trys to download the file lol
I can start and stop the server without any problem but it keep downloading the phpinfo.php file. ::)
in php folder am i suppose to click on something to start it liek mysql and apache or anything like that?
/me does it, and gets it to load perfectly.
/me does it with 1.3.* as well, and it works perfectly too....
Hmm...
Please make sure you're trying this version:
http://unknown.network32.net/tutorial.basic-server
I don't think I made any big changes to it, but still...
-[Unknown]
try it 67.68.32.250/phpinfo.php
QuotePlease make sure you're trying this version:
http://unknown.network32.net/tutorial.basic-server
I tried that link and still the same problem. :-\
graaa this is so weird. I just wnet over the turotiral for a third time and it still doesnt work.
lol im getting frustrated
Well, the first problem I see is this:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
phpinfo();
?>
</body>
</html>
I'm going to guess you did this with Dreamweaver, no? The code I quoted was for the *source* not just the text on the page... Dreamweaver's not that smart.
Apache is also sending this content type:
Content-Type: application/x-http-php
It shouldn't be if PHP is installed properly... can you try this...?
Start -> Run -> type cmd (Windows 2000, 2003) or command -> OK -> type echo "<?php echo 1;?>" | "c:\php\php.exe".
-[Unknown]
If it continues to do this, you might try using Apache 2.0.
/me is starting to worry that he's going to have to set up a virtual machine to get to the root of this problem.
-[Unknown]
says
Contect-type:text/html
x-pwered-br PHP/4.3.4
"1"
dont worry about the virtual machine. i dont wont to waste your time. In an house *i have a match to go to * ill uninstal everything and do it again.
Quote from: Typical98 on February 08, 2004, 05:46:21 PM
says
Contect-type:text/html
x-pwered-br PHP/4.3.4
"1"
Same message here, I'm running Apache 2.0 ?
this fixed the problem :P
I added "AddType application/x-httpd-php .php" to httpd and it works :)
ommmmmmg i forgot the d
Hmmm.... lesson of the day: always copy and paste ;).
-[Unknown]
*sigh* what an intertesting fix ^.^
Copy and paste is always the right thing to do in these instances *nods* we told you to copy the istructions exactly ;) :P
well, good that its woring now :)
i did copy and paste ;)
hehe
Is it hard to install perl on Apache server?
Perl is easy, but it's beyond the scope of my tutorial. But, just go here:
http://www.activestate.com/Products/ActivePerl/
And click on download ;).
-[Unknown]
I need perl to test my gtchat addons in my local server :)
Thanks [Unknown] .
done i installed perl MSWin32 and i was able to run gtchat in my local server. ;D
Quote from: babylonking on February 09, 2004, 10:17:13 AM
done i installed perl MSWin32 and i was able to run gtchat in my local server. ;D
Wait a minute, GTChat works on Windows now? Since when?
-[Unknown]
Check the english board
http://www.gtchat.org/cgi-bin/board/Blah.pl
Also check the new GTchat96 feature but is not released yet
http://www.gtchat.org/cgi-bin/board/Blah.pl?,v=display,b=g96n,m=1075405865
Quote from: Tyris on February 08, 2004, 07:26:13 AM
first thing is restart your apache server... coz if you've updated your http.config since your last restart, then it wont have made the changes...
next, make sure you've made the necesary changes in http.config.
If you've made teh changes it -should- know what to do with the php files
if not, yeah post the parts you edited or something...
*edit*
also, if you've chosen Apache2... then there are several things that wont work... so if you have (doesnt sound like it tho) then let me know, I'll tell you the config changes you need (it uses different files).
I'm running Apache2 and it's attempting to download the file instead of displaying it. What changes need to be made?
Sounds like you haven't edited the conf file completely; you might want to look over this tutorial instead, if you haven't:
http://unknown.network32.net/tutorial.basic-server
If it doesn't work, attaching your configuration files might help.
-[Unknown]
i got it to work! yay! thanks for posting such a great tutorial... i searched around for a couple days before i found this one and this is by far the best. great work.
would this thread be appropriate to post some help on some php code as well? or did you want to keep it pretty centralized on setting everything up?
Yep i learned how to do my own Mysql and php server with that Tutorial Thanks also
[Unkown] also have to thank Grudge
Regards
Homie
Mikeliketrike, if you have any PHP scripting issues, feel free to post them in this board:
http://www.simplemachines.org/community/index.php?board=8.0
You will get the most help there ;).
-[Unknown]
i'm having sessions troubles.... no matter how many times i change the session.save_path to C:\WINDOWS\Temp in php.ini i keep getting the error:
session_start(): open(/tmp\sess_4562adfdcef550265a62bb95c3269e23, O_RDWR) failed
making me think the session.save_path is still set to /tmp..... only it's NOT! any help would be appreciated!
After you change the php.ini you will have to restart apache in most cases before the changes in it will take affect.
LOL yeah i know, i did that, but to no avail..... :D
Well there is another reason it could possibly be doing it... you might be editing the wrong php.ini. ;)
For instance php reads php.ini in a certain order, so if you have different copies in different locations it could take affect over other ones.
An example of this would be on my pc, I have 2 php.ini's on my computer. 1 in the windows directory and the other in the php directory. If I edit the one in the windows directory it doens't take affect because the one from the php directory was loaded. But if I where to delete the one in the php directory then the one in the windows directory would be used.
I beleive php checks for php.ini in 3 different locations if I am not mistaken. If you use a phpinfo.php file it should tell you which php.ini file it is using.
If you're using ISAPI it should use the one in the WINDOWS directory.
-[Unknown]
i fixed it! it was really weird! phpinfo said the Configuration File (php.ini) Path was C:\WINDOWS, but i had already checked that there wasn't a php.ini there!
so i copied a php.ini to C:\WINDOWS and now it works! w00t! :D thanks for all the help!
Quote from: Curbow 5 on April 08, 2004, 04:32:38 PM
so i copied a php.ini to C:\WINDOWS and now it works! w00t! :D thanks for all the help!
That was in my instructions :P ;). But it's okay, it's hard to read with all the marking up and stuff.
-[Unknown]
I had a little trouble [Unkown] with your tutorial reading it but i eventually uunderstood it :)
Quote from: [Unknown] on April 08, 2004, 07:30:30 PM
That was in my instructions :P ;). But it's okay, it's hard to read with all the marking up and stuff.
-[Unknown]
wh00ps..... sorry, i didn't really read it: i was doing a reinstall (the first time i did it by your tutorial and it worked perfectly) and kinda did it by both memory and tutorial! anyway, thanks for the great tutorial!
When i go to http://localhost/phpinfo.php to test it after i typed in <?php
phpinfo();
?>
and i go there and it says <?php
phpinfo();
?>
is this right?
Modified:it says cannot load c:\program files\php\sapi\php4apache.dll into server i tried to find the php4apche file and put it in the sapi folder but i can't find it.
Unknown will be able to help you out more... but what you're supposed to see is the PHP environmental/server variables plus some PHP configuration.
Try this in the meantime: http://forums.devarticles.com/t3146/s.html
What files do you see in the c:\program files\php\sapi directory?
-[Unknown]
Hello, i had a problem awhile ago in installing php and i seem to be having a problem again.
Ive installed everything correctly following the tutorial but when i try to start apache i get this area
Module c:/php/sapi/php4apache.dll cannot be found. So i looking the php folder and i can see it but for some reason apache cant.
Im running apache 1.3 with php-4.3.7-Win32.
i also used context to edit the files.
Any help would be great
Did you copy php4ts.dll into the sapi directory?
-[Unknown]
i copied it to the sapi folder and the windows/system32 folder.
sorry it says cannot load module c:/php/sapi/php4apache.dll (sorry for the mistake)
also, i tried to instal mysql and i dl it, extracted it click on set up then next, next, next *typical settings which is reccremanded* and it installed but then wehn i go to c:/mysql/bin/mysqladmin.exe
i get this error,
"The dynamic link library LIBMWSQL.dll could not be found in the specified path C:/mysql/bin;,;C:/WINNT/system32;.;C:.WINNT;C:/WINT/systen32;C:.WINNT;C:/WINT/systen32/wbem;C:/program Files/SSH Communications Security/ssh secure shell
(note, i unistalled SSH client so adunno why its still looking htere)
I'd strongly recommend trying Apache 2 over Apache 1..... but I'm not sure why you'd get this error message.
Have you tried restarting the computer? (you know Windows :P.)
Is the libmysql.dll file in c:\mysql\bin?
-[Unknown]
Okay ill try apache2 but i heard that php wasnt supported correctly with apache2. Or was that an older verson.
No the lib file wanst in there strangly... so i took it out of the c:/mysql/lib folder and copied it to the bin folder and it workes...kinda lame that they dont put it in there for you.
lol and i may be a nub but i know what you mean when you say restarting the computer :P :P (unplugs computer :P)
okay im going with apache2 lol guess what :D
C:/php/sapi/php4apache2.dll cannot be found...... what is it with my computer and not finding .dll's. this time im looking at it and single clicking it..but yea
Are you using \ or /? If you are using / in the configuration files, try \.
Are you on Windows NT or 2000? (or otherwise?)
Try copying all the dlls to the system32 folder (meaning, all the dlls in c:\php, c:\php\sapi, and c:\php\dlls...) and also to the Apache directory. Does that help?
-[Unknown]
im using windows 2000, this is odd... i changed it to \ liek you said to try then i went to start server but it still is seeing it as / is that normal?
Quote from: kviet on May 22, 2004, 11:34:07 AM
When i go to http://localhost/phpinfo.php to test it after i typed in <?php
phpinfo();
?>
and i go there and it says <?php
phpinfo();
?>
is this right?
Modified:it says cannot load c:\program files\php\sapi\php4apache.dll into server i tried to find the php4apche file and put it in the sapi folder but i can't find it.
Does your host support PHP?
hes hosting it himself, look at his addy http://localhost. Hes getting the same problem as me for some reason apache isnt seeing the file its suppose to. its very annoying.
okay i got annoyed and tried this. I moved the php4apache2.dll from the sapi folder to the php folder and changed the path in teh httpd.conf file and now it works =/
nevermind, the forums arnt installing correctly so i take it it has something to do with it... or its the installer for the forums.
coping all the dlls tot he system32 folder worked.
dammit...now theres nothing wrong ine the forum installation. it doesnt install correctly wth... (gettings frustrated to hell)
i get the first window were its like, Community name, mysql user pass and what not. then i click on next and it doesnt install ANYTHING it jsut go straight to the *make the amdin for your forums page)...
soo annoyed....
nvm its the wrong spot..for some reason it doesnt create the table in mysql anymore..so you have to do it manual which i dont know how to do so yea.
Hmm, it's not creating the table? It should give an error message.
If you run the mysql.exe file in bin, you can type:
CREATE DATABASE dbname;
I recommend you try using the username "root"...
-[Unknown]
yea i tried it but it said i dont haev permission to do it. i dont fully understand how to run use it (im doing it through dos) so i dont know how to get under the username root. Also for some reason when i run msql it only shows the test databse (whihc i read is what all users can see) but theres no tmp database and no msql database so i think it is creating the table but for some reason im not seeing it because maybe the mysql client isnt loging me in correctly or something.
Sorry if this doesnt make sence hmmm. im trying to read up on it but adunno.
Hmm... tried installing a webserver a while ago but I didn't get any further once I couldn't get MySQL to work.
I installed the IIS webserver (within windows)
Then installed PHP5
Then installed MySQL with the installer
Now, when I try to run the mysql_test.php, it gives the following error:
PHP has encountered an Access Violation at 010173DD
After a refresh it gives:
PHP has encountered an Access Violation at 010173DDHTTP/1.1 500 Server Error Server: Microsoft-IIS/5.1 Date: Sat, 10 Jul 2004 13:11:41 GMT Content-Type: text/html Content-Length: 44 -2147417842 (0x8001010e)
Any clue as to what I should do?
I've gotten this before with PHP 5, and I'm not sure *exactly* what causes it. I recommend you try PHP 4.3.7 instead...
-[Unknown]
Quote from: [Unknown] on July 10, 2004, 01:31:44 PM
I've gotten this before with PHP 5, and I'm not sure *exactly* what causes it. I recommend you try PHP 4.3.7 instead...
-[Unknown]
I did and it worked. Thanx :)
Took me three hours to finally get my first DB up and running. I still don't know exactly what I did. I first installed phpMyAdmin, then tried using "root" as pass but it didn't work.
Then I tried to use the password for windows XP (admin/pass) and it gave me a login screen, in which I could log in with just "root".
Burp als je probs hebt met het opzetten van een webserver zou ik toch gaan voor als je er zowiezo al een wilt draaien onder windows
apache gebruiken 2.0.50 voldoet aan de eisen om in een productie omgeving te kunnen werken onder windows tegenwordig !!
php 4.3.8
en mysql 3.23.58 win
eventueel phpmyadmin buiten de web directory
en dit alles even op een aparte partitie wanneer mogelijk ?!
kijk anders even op http://www.burglars.net/forums/index.php
Very nice [unknown]
Thanks very much!
I got the whole thing up and running with PHP5 with few changes
(had to use PHP5, got it free on a disk and I'm dammed if I'm downloading 4.3.8 on 38k dialup :D)
Quote from: Thunderace on September 10, 2004, 04:07:55 PM
Very nice [unknown]
Thanks very much!
I got the whole thing up and running with PHP5 with few changes
(had to use PHP5, got it free on a disk and I'm dammed if I'm downloading 4.3.8 on 38k dialup :D)
I know, I need to make a few modifications, especially with the new directory structure in PHP 5.
-[Unknown]
Having said that .. I haven't a clue how to create a DB in mySQL, in fact I don't even know of it's running.
PHP 5 Installation Windows XP
As an addition to [unknown]s excellent instruction, this worked for me.
In my php5 package the file to move to sapi was php5apache2.dll
QuoteConfiguring PHP - Apache
Go into the folder C:\Program Files\Apache Group\Apache\conf (or where ever you installed Apache.) and open up httpd.conf. Search for #LoadModule mime_magic_module modules/mod_mime_magic.so and add just above it LoadModule php5_module "C:/Program Files/PHP/sapi/php5apache2.dll". Next, search for AddType application/x-tar .tgz and add below it AddType application/x-httpd-php .php
Now you have an apache server with php and MySQL all running. You have uploaded and created a test website and all is working well. How do you make a home server visible to the internet. Or is this beyond the scope of the Tutorial? Thanks
Jack
Quote from: jrcarr on September 10, 2004, 10:25:37 PM
Now you have an apache server with php and MySQL all running. You have uploaded and created a test website and all is working well. How do you make a home server visible to the internet. Or is this beyond the scope of the Tutorial? Thanks
There's a lot more you need to do to make it internet ready. This only makes it ready for testing purposes only. A lot of VERY IMPORTANT security issues are completely glossed over for simplicity. Let me say it in large letters:
PLEASE DO NOT USE THIS GUIDE TO SET UP A PRODUCTION SERVER!Quote from: Thunderace on September 10, 2004, 04:29:28 PM
Having said that .. I haven't a clue how to create a DB in mySQL, in fact I don't even know of it's running.
The easiest way is to check services. On NT/2000/XP, go to My Computer -> right click -> Manage -> Services and Applications -> Services. Under there, look for MySQL. It will tell you if it has been started or not.
To run queries, you can use the mysql.exe command line utility. C:\Program Files\MySQL\bin\mysql.exe. You can also install phpMyAdmin.
Username is root, password is a blank (empty) string.
-[Unknown]
QuoteThere's a lot more you need to do to make it internet ready. This only makes it ready for testing purposes only. A lot of VERY IMPORTANT security issues are completely glossed over for simplicity. Let me say it in large letters:
PLEASE DO NOT USE THIS GUIDE TO SET UP A PRODUCTION SERVER!
This is understandable! Do you have suggestion of good site to read to learn more about setting security and then to make a home server a production server. Thanks
Jack
For one thing, my first advice is to use Apache instead of IIS. IIS will do windows authentication, and several other things that can cause problems.
I won't pretend to be an expert on server configuration, though. You might check webhostingtalk, though...
-[Unknown]
Are you referring to the Host and Hosting board here? Thanks for your replies.
Jack
Quote from: jrcarr on September 11, 2004, 12:58:58 AM
Are you referring to the Host and Hosting board here? Thanks for your replies.
Jack
http://www.webhostingtalk.com/
-[Unknown]
QuoteNow, this part is important only if you're using NTFS. You probably are if you are on 2000 or XP. Go to the folder C:\WINDOWS\Temp and right click on it, and select Properties. If you don't see a Security tab, close it and go to Tools -> Folder Options in the menu. Go to the View tab, and uncheck the "Use simple file sharing" checkbox at the bottom of the list. Now go to Properties again.
These options are not available on my XP.
Only option it offers is to move Temp to shared folder
You went to the Tools menu next to "Favorites" and "View" and then Folder Options?
-[Unknown]
Yup that option doesn't exist on mine
Quote from: Thunderace on September 13, 2004, 02:14:05 AM
Yup that option doesn't exist on mine
Are you using Windows XP Home, or Windows XP Pro? I'm still not certain you're looking in the right place, because the option to "move Temp to shared folder" is displayed in a completely different place. Here, let me try to illustrate with some attachments ;).
Please note that this tab is only available when using NTFS. If you are using FAT, you both won't have it and won't need to worry about it. You can be sure your computer is insecure :P. (FAT means EVERYONE can write and you can't restrict that.)
-[Unknown]
It's the "Packages Properties" that I can't find.
Right click on the file and go to properties ;).
-[Unknown]
All I get is this ..
Are you certain you're using NTFS?
-[Unknown]
Yup ...
Go to Start -> Run. In the box, type cmd. From there, type:
cacls c:\windows\temp
When I say that, my computer says:
c:\windows\Temp BUILTIN\Administrators:(OI)(CI)F
CREATOR OWNER:(OI)(CI)(IO)F
TBIRD1800\IUSR_TBIRD1800:(OI)(CI)C
NT AUTHORITY\NETWORK SERVICE:(OI)(CI)(special access:)
DELETE
SYNCHRONIZE
FILE_READ_DATA
BUILTIN\Power Users:(OI)(CI)C
NT AUTHORITY\SYSTEM:(OI)(CI)F
BUILTIN\Users:(CI)(special access:)
SYNCHRONIZE
FILE_WRITE_DATA
FILE_APPEND_DATA
FILE_EXECUTE
What does yours say?
-[Unknown]
I get this ...
Hmm... try:
cacls c:\windows\temp /e /g Everyone:C
-[Unknown]
Just said processed .. but result now is ..
Seems to have done the trick [unknown]
Local board is now smooth as silk
Cookie problem that I was experiencing seems to have gone.
Nice, thanks for your time m8.
I spoke too soon cookies still not working, no cookies are being copied to /tmp
firefox simply doesn't work (images all over the place)
IE gives the following error
Quote
Line: 5
Char: 3
Error: 'return' statement outside of function
Code: 0
Clicking admin I also get
Quote
Line: 255
Char: 5
Error: Object expected
Code: 0
Quote from: Thunderace on October 03, 2004, 06:03:06 AM
I spoke too soon cookies still not working, no cookies are being copied to /tmp
Cookes? /tmp? This is for Windows :P.
-[Unknown]
Yeah maybe i don't understand but cookies are not working, I thought they were help in temp directory.
first of all many praise for your tutorial which really helped me a lot
I have encountered a problem there
QuoteConfiguring PHP - Apache
Go into the folder C:\Program Files\Apache Group\Apache\conf (or where ever you installed Apache.) and open up httpd.conf. Search for #LoadModule mime_magic_module modules/mod_mime_magic.so and add just above it LoadModule php4_module "C:/Program Files/PHP/sapi/php4apache.dll". Next search for AddModule mod_setenvif.c and add below it AddModule mod_php4.c. Next, search for AddType application/x-tar .tgz and add below it AddType application/x-httpd-php .php
Whenever I put "dirname/PHP/sapi/php4apache.dll", Apache will not start. I had to copy the file upstairs and put "dirname/PHP/php4apache.dll" instead.
After that all went smoothly.
I wanted to have a go with this (for testing purposes) but ran into a small problem.
For this step in the guide ..
QuoteRight click on Default Web Site and open up Properties. Click on the Home Directory tab, and change Execute Permissions to "Scripts only". Next, select Configuration... click Add, and type the path to sapi\php4isapi.dll or php5isapi.dll - like "C:\Program Files\PHP\sapi\php4isapi.dll". (you can also browse for it.) In extension, put .php
I cannot use '.php' as the extention because it already exists for
C:\Program Files\PHP\php.exe
so I figured I'd be clever and use '.php4' as an extention and renamed the 'phpinfo' file with that extention .. but my browser returns a
QuoteThe specified module could not be found.
message.
Any recommendations?
If you can't use .php, it means PHP is already installed in CGI mode. What version of IIS is this?
-[Unknown]
IIS version 5.1
problem may be that initially as I was going through your guide I used the php installer (not the zip folder) .. then I uninstalled and switched over
but after I uninstalled the only thing that was left over in the PHP folder was the backup files for the IIS server
what do you think?
Quote from: reznorsoft on December 24, 2004, 10:04:48 PM
IIS version 5.1
problem may be that initially as I was going through your guide I used the php installer (not the zip folder) .. then I uninstalled and switched over
but after I uninstalled the only thing that was left over in the PHP folder was the backup files for the IIS server
what do you think?
Try copying the dll files to the system32 directory.
-[Unknown]
Allright, thank you [Unknown]
That fixed it .. I copied the dll files to system32 and changed the path to point to the system32 folder
I install Apache and php but when I test it it doesn't show anything, I did every thing you said except configure the C:\WINDOWS\Temp, my stystem uses NTFS but I doesn't have the Security tab on the file property's neather do I have "Use simple file sharing" in my folder options, I tried what you said above for Thunderace but it still doesn't work.
My OS is Windows XP home.
Quote from: The Conspirator on April 13, 2005, 11:59:43 AM
I install Apache and php but when I test it it doesn't show anything, I did every thing you said except configure the C:\WINDOWS\Temp, my stystem uses NTFS but I doesn't have the Security tab on the file property's neather do I have "Use simple file sharing" in my folder options, I tried what you said above for Thunderace but it still doesn't work.
My OS is Windows XP home.
Home doesn't have the security options.
When you say you don't see anything, what do you mean? Do you get anything at all, or just a "server cannot be found" error?
Have you restarted your computer?
-[Unknown]
I don't mean to say something bad, but why doesn't he just install a pre-installed package that includes everything needed like phpdev (http://www.firepages.com.au/)?
It works perfectly for me, and I havent been able to get it working properly myself with this tutorial.
Quote from: Burpee on April 13, 2005, 03:57:11 PM
I don't mean to say something bad, but why doesn't he just install a pre-installed package that includes everything needed like phpdev (http://www.firepages.com.au/)?
It works perfectly for me, and I havent been able to get it working properly myself with this tutorial.
There are more than a couple problems with that, and many such distributions give you absolutely no control over the versions of the software you're installing, which you usually want.
If you have used such a package, however, it may mean that you *won't* be able to follow the steps outlined in this topic or in the newer tutorial.
-[Unknown]
Yes, but eventually the point is quite simply to have the possibility to test things locally, right?
So far it has served me perfectly in that.
Quote from: [Unknown] on April 13, 2005, 02:46:16 PM
Home doesn't have the security options.
Don't have eather of the options.
Quote
When you say you don't see anything, what do you mean? Do you get anything at all, or just a "server cannot be found" error?
Is completly blam, when I looked at the page sorce it just had the dcutype, html, head, tit, and body tags and nothing els, nothin inbetwen them.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title></title></head><body></body></html>
Quote
Have you restarted your computer?
-[Unknown]
Yes.
Hi [Unknown],
I'm stucked at installing PHP. To begin with, I have no idea which to download :'(
I've already installed Apache sucessfully. I'm trying to install PHP 4.3.11 on windows xp pro. Which shld I download?
Complete Source Code
PHP 4.3.11 (tar.bz2)
PHP 4.3.11 (tar.gz)
Windows Binaries
PHP 4.3.11 zip package
PHP 4.3.11 installer
Thanks in advance
Windows binaries, zip package.
-[Unknown]
thanks. shall try in awhile. strange i didn't get an email notification of ur reply ???
edit: alright got smf up on my notebook ;D clocked half a day tho'.. thanks [Unknown] for the guide. i also got help over the net for mysql and phpmyadmin installation.
I have gotten the phpinfo.php file to show up and work properly. However, I'm having a problem with MySQL. From http://dev.mysql.com/downloads/mysql/4.1.html should I download Windows Essentials (x86) or Windows (x86)? I did install v4.1.12 and it automatically launches into the Configuration Wizard? Which options should I choose for the purposes of learning/testing php and MySQL? I have a bit of C++ experience. This, however, is all new to me. Thanks for any assistance.
** Edit **
I apologize - I should have stated that I installed MySQL - the full version (not the essentials) v.4.1.12. Also, when I attempt to view mysql_test.php I get a blank white page.
Windows (full) is what you'll want. And the default options should be fine.
Did you edit php.ini and remove the ; before the "extension=php_mysql.dll" line, if using PHP 5?
-[Unknown]
I did not take out the ; and I am using PHP 5. Thanks! I'm at work now and probably won't be able to test this for a bit. I appreciate the help.
Great tutorial i had no problems following this.
Hi!
Wanting to learn some more php, I've already ran into trouble...
I've followed this: http://unknown.network32.net/tutorial.basic-server
But when I want to look at the phpinfo.php page I get "The specified module could not be found." in Firefox and a 500 error in IE. I'm using IIS and set "C:\Program Files\PHP\sapi\php4isapi.dll". Any idea what is wrong? :-/
It may be necessary to copy the dlls from the PHP and dlls directory to C:\WINDOWS\system32.
-[Unknown]
Great guide [Unknown], would be really hepful for starters, but I have a question. I am running Apache at home for development purposes, is it the right choice? Which one is less resource intensive, IIS or Apache?
I'm not totally sure, but I run Apache on my own computer. I think it's pretty much comparable.
There's also something like this if you want as little memory usage as possible:
http://www.lighttpd.net/
-[Unknown]
Quote from: [Unknown] on July 30, 2005, 09:43:24 PM
It may be necessary to copy the dlls from the PHP and dlls directory to C:\WINDOWS\system32.
-[Unknown]
Done that, but I still get the same line. :(
Odd .. apache and PHP went well .. but MySQL wont install the instance :(
Quote from: Thunderace on July 31, 2005, 02:42:39 PM
but MySQL wont install the instance :(
What do you mean?
-Dan The Man
MySQL Server Instance Configuration
Configure the MySQL Server 4.1 server instance
Cannot configure Windows service for MySQL.Error: 0
Error is at service start
Update problem solved!
For others experiencing this error go to MySQL (http://dev.mysql.com/doc/mysql/en/windows-troubleshooting.html)
Quote from: Thunderace on July 31, 2005, 03:16:42 PM
MySQL Server Instance Configuration
Configure the MySQL Server 4.1 server instance
Cannot configure Windows service for MySQL.Error: 0
During the initial installation? Have you tried another version?
-Dan The Man
Basically solved .. but when I run [unknown]s' tutorial script ..
<?php mysql_connect('localhost', 'root', ''); mysql_select_db('test'); echo 'Unless you see any error messages, everything should be fine.'; ?>
I get a blank page and MySQL doesn't seem to be loading
Quote from: Thunderace on July 31, 2005, 04:22:37 PM
Basically solved .. but when I run [unknown]s' tutorial script ..
<?php mysql_connect('localhost', 'root', ''); mysql_select_db('test'); echo 'Unless you see any error messages, everything should be fine.'; ?>
I get a blank page and MySQL doesn't seem to be loading
You might have to change php.ini, if you're using PHP 5.
http://www.unknownbrackets.com/tutorials/basic-server
Quote from: Phoenixoverlord on July 30, 2005, 04:53:24 PM
Hi!
Wanting to learn some more php, I've already ran into trouble...
I've followed this: http://unknown.network32.net/tutorial.basic-server
But when I want to look at the phpinfo.php page I get "The specified module could not be found." in Firefox and a 500 error in IE. I'm using IIS and set "C:\Program Files\PHP\sapi\php4isapi.dll". Any idea what is wrong? :-/
Does it work to call it from the command line (php.exe, I mean)?
-[Unknown]
I've uninstalled IIS and tried to install apache 2. For some reason though it doesn't wish to start the service. This what I get in a cmd box:
Error OS2 The system cannot find the file specified. No installed service named "Apache2"
:-/
EDIT: Hmmm I've reinstalled with all the same settings and now apparently it works...
Do not know whether it is the right place to post that one...
I have got an issue with the apache (httpd.conf) configuration. I would like to set of course phpmyadmin to be allowed only for localhost and apparently when I write this
Quote
Alias /phpmyadmin/ "E:/ALAIN/forum/Apache2/phpMyAdmin-2.6.0-pl3/"
<Directory "E:/ALAIN/forum/Apache2/phpMyAdmin-2.6.0-pl3">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
deny from all
allow from 127.0.0.1
</Directory>
The access is then NOT allowed for 127.0.0.1. I have to put allow from all which is not really a good idea.
Any idea? Thanks a lot :)
Try replacing "Order allow,deny" with "Order Deny,Allow".
-[Unknown]
worked thx again unknown
One thing I thought I would add...
For those of you using OS X (I'm sure there's more than just me), MAMP (http://www.apple.com/downloads/macosx/unix_open_source/mamp.html) is a good package.
QuoteI successfully installed Apache 2.0.54, mySQL 4.1.14-win32, php5.0.5-installer on a Windows 2000 box. Separately, they all work just fine. I have Apache and php talking to each other. I can log into mysql with no problems.
My problem comes in when I try to integrate mySQL and PHP. I get an error in Event Viewer saying:
Application popup: Warning: PHP Startup: Invalid library (maybe not a PHP library) 'libmysql.dll'
I've read about something called mysqli but where do I find it? I'm not compiling the code under windows, so the php with the mysql options don't do any good under windows, unless someone can tell me what I need to do that with.
Any help would be appreciated.
Thanks
Look through the files that come with php and find a file called "libmysql.dll" then copy that into your windows directory.
eh.. sounds like you are using an old library or even a library too new. I doubt the latter. Check what version the library is made for. It should up under the icon in windows.
Now save and double click the file. Confirm it, and then open the Personal Web Manager (it should have installed a shortcut..)
???? Where is this shortcut ?? I see Personal Web Manager no where at all... I am stuck and need some help.
Sorry I need help finding ::: Web Service Extensions ::: I am using IIS not PWS my bad... Anyone know where that is ??
O'kay 7 hours later and I'm still stuck on that step.... Oh well....
Quote from: [Unknown] on November 17, 2003, 03:09:42 AM
Configuring PHP - Apache
Go into the folder C:\Program Files\Apache Group\Apache\conf (or where ever you installed Apache.) and open up httpd.conf. Search for #LoadModule mime_magic_module modules/mod_mime_magic.so and add just above it LoadModule php4_module "C:/Program Files/PHP/sapi/php4apache.dll". Next search for AddModule mod_setenvif.c and add below it AddModule mod_php4.c. Next, search for AddType application/x-tar .tgz and add below it AddType application/x-httpd-php .php
-[Unknown]
I can't find the "
AddModule mod_setenvif.c" and "
AddType application/x-tar .tgz"
I'm using
apache_2.0.58-win32-x86-no_ssl and "
php-4.4.2-Win32"
Kindly help me please... thanks in advance.
vhin, u'll need to add LoadModule php5_module "c:/php/php5apache2.dll" to your httpd.conf file under the LoadModule area; and AddType application/x-httpd-php .php under the AddType area (search for AddType application/x-tar .tgz).
Also the DirectoryIndex thing you can add if you want... then make sure you reset apache (using apache monitor, or via services.msc or whatever).
That -should- do the trick...
[zomg... first post in how long?]
Quote from: [Unknown] on November 16, 2003, 03:40:49 PM
A better version of this can be found here:
http://unknown.network32.net/tutorial.basic-server
Do you realize that the link above is not available? Thanks!
-[Unknown]
Here is the new link:
Quote from: [Unknown] on July 31, 2005, 09:23:13 PM
You might have to change php.ini, if you're using PHP 5.
http://www.unknownbrackets.com/tutorials/basic-server
......
-[Unknown]
BTW, Unknown, THANK YOU for this very helpful tutorial!
I am new about this and have some problems.
I have installed apache a long time ago. Then a month ago, I decided to go for php and sql. I installed sql first and then I installed php manually. However, I found that apache+php cannot seem to communicate with mysql. (I installed the php modules required in apache, so there should be no problems with php+apache) Then I found that I have to install the mysql module or the mysqli module in php. I tried to install the module without success when I tested it. I tried to open a file on the server with the following code:
------------------------------------------------------------------------------------
<html>
<head>
<title>Test PHP with MySQL</title>
</head>
<body>
<?php
$mysqluser = 'root';
$mysqlpasswd = '********';
$mysqlhost = 'localhost';
$mysqli = new mysqli("$mysqlhost", "$mysqluser", "$mysqlpasswd");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
printf("Host information: %s\n", $mysqli->host_info);
/* close connection */
$mysqli->close();
?>
<?php
phpinfo();
?>
<?php
$mysqluser = 'root';
$mysqlpasswd = 'creAtiVe-2206*';
$mysqlhost = 'localhost';
$connID = mysqli_connect($mysqlhost, $mysqluser, $mysqlpasswd);
$result = mysqli_list_dbs();
echo "<p>Databases in the local MySQL server</p>\n";
echo "<p>";
while ($row = mysqli_fetch_row($result)) {
echo "<br><em>$row[0]</em>\n";
}
echo "</p>";
?>
</body>
</html>
---------------------------------------------------------------------------------------------
I did not get any reply from the test. It displayed a blank page.
However, another test with only
<?php
phpinfo();
?>
displayed the correct server information.
I then uninstalled everything, and reinstalled apache, php and mysql.
I have followed your instructions on configuring php including setting permissions (which revealed my supposedly invisible .htaccess folders) But still, without success on the installation.
By the way (I am not sure if this counts), I activated the mysqli module instead of the mysql module in php.ini-dist at first but since it is not working, I activated both in the end.
I am using apache 2.0.59 and php 5 and sql 5.
I am not to sure what's wrong. Can someone point it out for me? thx
try this
http://autoindex.sourceforge.net/forum/apache.php
or this
http://www.phpfreaks.com/forums/index.php