Pagina de start a forumului Forum PHP Romania - Discutii despre PHP, MySQL, Javascript, AJAX, etc Forum PHP Romania - Discutii despre PHP, MySQL, Javascript, AJAX, etc
Comunitatea PHP Romania
 

Instalare Apache 2.xx + PHP 5.xx + MySQL 4.1.xx pe WindowsXP
Vezi mesajul original

 
       Pagina de start a forumului Forum PHP Romania - Discutii despre PHP, MySQL, Javascript, AJAX, etc -> Instalare
Subiectul anterior :: Subiectul următor  
Autor Mesaj
ExcalIbvr



Data înscrierii: 02/Mai/2004
Mesaje: 1107
Locație: Oradea

Trimis: Mar Aug 09, 2005 5:58 am    Titlul subiectului: Instalare Apache 2.xx + PHP 5.xx + MySQL 4.1.xx pe WindowsXP  

Ca tot au fost discutii pe tema asta, m-am gandit sa prezint un scurt ghid pentru instalarea WAMP cu ultimele versiuni. Sigur, exista pachete gen XAMPP, care instaleaza toata suita, dar am scris acest ghid pentru cei care vor sa instaleze totul manual.


1. DOWNLOAD PACHETE

- Download Apache (2.0.54 este ultima versiune la momentul actual)

- Download PHP 5.xx + modulele PECL (5.1.0 este in beta 3 momentan, dar aduce facilitati noi!) - varianta arhivata, nu installer-ul

- MySQL 4.1.xx (versiunea actuala: 4.1.13a) - se descarca pachetul Windows Essentials (x86)


2. INSTALARE APACHE

Instalarea Apache decurge normal, se urmeaza instructiunile installer-ului.


3. CONFIGURARE APACHE

- Calea implicita de instalare a lui Apache este C:\Program Files\Apache Group\Apache2. Se deschide cu Notepad fisierul \conf\httpd.conf pt. editare.

- Se seteaza DocumentRoot "C:/www", presupunand ca toate proiectele web se afla in acel director. Se poate seta orice alt director, in acest sens.

- Mai jos exista o intrare <Directory> cu o valoare implicita. Aceasta se schimba tot in "C:/www" si va arata asa: <Directory "d:/www">


4. INSTALARE PHP 5

- Se dezarhiveaza continutul arhivei intr-un director, de exemplu c:\php.

- Se dezarhiveaza continutul arhivei PECL in directorul c:\php\ext.


5. CONFIGURARE PHP 5

- Se editeaza fisierul httpd.conf si se adauga urmatoarele 2 linii la locul potrivit, adica impreuna cu celelalte instructiuni de acest gen:
LoadModule php5_module "C:/php/php5apache2.dll"
AddType application/x-httpd-php .php

- Urmatoarele fisiere se copiaza din c:/php in directorul sistem al Windows (c:/Windows/System32 pentru WindowsXP):
php5apache2.dll
php5ts.dll
libmysql.dll

- Fisierul php.ini-recommended se redenumeste in php.ini si se copiaza in directorul Windows (c:/Windows pentru WindowsXP).

- se editeaza fisierul c:/Windows/php.ini:
* pentru a folosi MySQL 4.0.xx sau versiune mai mica, se sterge ; din dreptul liniei: ;extension=php_mysql.dll
* doc_root = "c:/www"
* extension_dir = "c:/php/ext"
* session.save_path = c:\temp (sau orice alt director EXISTENT)
* zend.ze1_compatibility_mode = On (pt. compatibilitate sporita cu codul PHP 4)
-- in urma unui restart al server-ului Apache, acesta ar trebui sa reporneasca fara nici o eroare --
-- pentru a testa functionalitatea Apache + PHP, creeaza un fisier in c:/www cu numele phpinfo.php, care sa contina linia: <?php phpinfo(); ?> si ruleaza-l in browser la adresa: http://localhost/phpinfo.php --


6. INSTALARE MySQL 4.1

Instalarea decurge normal, se urmeaza instructiunile installer-ului.


7. CONFIGURARE MySQL 4.1

- calea implicita de instalare este c:/mysql/MySQL Server 4.1. Pentru compatibilitate cu versiuni mai vechi de MySQL, deschide fisierul my.ini pentru editare si adauga oriunde in fisier, linia:
old_passwords


8. POST-INSTALL

- opreste serviciile MySQL si Apache

- reporneste Apache

- reporneste MySQL

-------

Teoretic, totul ar trebui sa functioneze corect. Am urmat si eu exact acesti pasi si nu am avut nici o problema la instalare. Site-urile lucrate in PHP 4 si MySQL 4.0.xx, care nu folosesc prea mult OOP functioneaza corect, fara nici o interventie in cod.
Sus  
oriceon



Data înscrierii: 24/Dec/2004
Mesaje: 476
Locație: Constanta

Trimis: Mar Aug 09, 2005 9:47 am    Titlul subiectului:  

Un bun tutorial cu instalarea pachetelor il gasiti si in tutorial la mine ;) ...

Http://www.oriceon.com/tutorial/
Sus  
johnny



Data înscrierii: 31/Iul/2004
Mesaje: 904
Locație: Bucuresti

Trimis: Mar Aug 09, 2005 11:57 am    Titlul subiectului:  

NO, mine is better, dar e pentru Gentoo...:

Cod:
//Apache
#emerge unmerge apache
#rm -Rf /var/www
#rm -Rf /etc/apache2
#rm /etc/conf.d/apache2
#rm /etc/init.d/apache2
#emerge apache
#mkdir -p /var/www/localhost/htdocs

//PHP 5
#cd /usr/portage/dev-php/php/
#emerge -v php-5.0.4.ebuild
#[cd /usr/portage/class]
#[ln -s php-sapi.eclass php.eclass]
#emerge -Cv php mod_php
#ln -sf /etc/php/apache1-php5/php.ini php.ini
// in /etc/apache2/conf/apache.conf adauga
LoadModule php5_module modules/libphp5.so

//Mysql
#echo "dev-db/mysql ~x86" >> /etc/portage/package.keywords
#echo "dev-perl/DBD-mysql ~x86" >> /etc/portage/package.keywords
#echo "dev-db/mysql" >> /etc/portage/package.unmask
#emerge -av mysql
// in loc de ~x86 se pune arhitectura procesorului...


Si pentru fedora ar trebui sa fie geva de genu:
Cod:
#yum install apache2
#yum install php5
#yum install mysql
#yum install php_mysql
Sus  
oriceon



Data înscrierii: 24/Dec/2004
Mesaje: 476
Locație: Constanta

Trimis: Mie Aug 10, 2005 10:57 am    Titlul subiectului:  

Jonny :) BA A MEA e mai buna !!!!!!

Let`s start party
Sus  
whooper



Data înscrierii: 05/Apr/2005
Mesaje: 722
Locație: Toronto ON

Trimis: Mie Aug 10, 2005 4:24 pm    Titlul subiectului:  

:D a mea e mai mare
Sus  
strategy



Data înscrierii: 19/Noi/2004
Mesaje: 351
Locație: Oradea

Trimis: Mie Sep 28, 2005 10:00 pm    Titlul subiectului:  

bv Excalibvr .. bv johnny .. restu sucks :P .. veniti si voi cu chestii mai veridice .. aa era sa uit .. si oriceon cu tutorialu ..
Sus  
johnutz



Data înscrierii: 20/Iul/2004
Mesaje: 956
Locație: Între scaun și tastatură

Trimis: Mie Sep 28, 2005 11:50 pm    Titlul subiectului:  

Si inca una, dar nu e a mea, deci nu vreau sa o laud:
Installing and Configuring Apache 2 on a Windows XP Machine

Mai mentionez si ca nici macar nu am citit-o, dar ca e de curand aparuta
Sus  
whooper



Data înscrierii: 05/Apr/2005
Mesaje: 722
Locație: Toronto ON

Trimis: Joi Sep 29, 2005 4:46 am    Titlul subiectului:  

Foarte misto, dar nu vad utilitatea. DIn cauza asta radeam mai devreme. Tutorial pentru 5 minute de studiat manualele ? Configurari implicite ? Bleah.

Ma apucase si pe mine (un pic mai de mult) boala sa-i invat pe altii .. dar pe vremea aia era doar Apache 1.3.x stabil. Cine stia sa configureze un NT, stia si Apache, asa ca m-am chinuit sa scriu o gramada de chestii .. fix-pix.

Cine vrea sa configureze ceva ca lumea citeste manualele.

Citat: APACHE 1.3. INSTALLATION UNDER Win32

Apache 1.3 is designed to run also on Windows NT 4.0 and Windows 2000. The binary installer will only work with the x86 family of processors, such as Intel's. Apache may also run on Windows 95 and 98, but these have not been tested. In all cases TCP/IP networking must be installed. Also "Winsock2" is required for Apache 1.3.7 and later. If running on Windows 95, the "Winsock2" upgrade must be installed before Apache will run. "Winsock2" for Windows 95 is available at Microsoft. Windows 98, NT (Service Pack 3 or later) and 2000 users need to take no special action, those versions provide Winsock2 as distributed. Apache on different flavours of NT has not yet been optimized for performance. Apache still performs best, and is most reliable on Unix platforms. Although, NT performance has improved and great progress is being made in the version 2.0 of Apache for the Windows platforms.


...

Citat: When Apache is first installed as a service (e.g. with the -i option) it will run as user "System" (the LocalSystem account). There should be few issues if all resources for the web server reside on the local system, but it has broad security privileges to affect the local machine! LocalSystem is a very privileged account locally, so you shouldn't run any shareware applications there. However, it has no network privileges and cannot leave the machine via any NT-secured mechanism, including file system, named pipes, DCOM, or secure RPC. NEVER grant network privileges to the SYSTEM account! Create a new user account instead, grant the appropriate privileges to that user, and use the 'Log On As:' option. Select the Start Menu -> Settings -> Control Panel -> Services -> apache service ... and click the "Startup" button to access this setting.

A service that runs in the context of the LocalSystem account inherits the security context of the SCM. It is not associated with any logged-on user account and does not have credentials (domain name, user name, and password) to be used for verification. The SYSTEM account has no privileges to the network, so shared pages or a shared installation of Apache is invisible to the service. If you intend to use any network resources, the following steps should help:

# Select Apache from the Control Panel's Service dialog and click Startup.
# Verify that the service account is correct. You may wish to create an account for your Apache services.
# Retype the password and password confirmation.
# Go to User Manager for Domains.
# Click on Policies from the title bar menu, and select User Rights.
# Select the option for Advanced User Rights.
# In the drop-down list, verify that the following rights have been granted to the selected account:

# Act as part of the operating system
# Back up files and directories
# Log on as a service
# Restore files and directories

Then you should also :
# Confirm that the selected account is a member of the Users group.
# Confirm the selected account has access to all document and script directories (minimally read and browse access).
# Confirm the selected account has read/write/delete access to the Apache logs directory!


If you allow the account to log in as a user, then you can log in yourself and test that the account has the privileges to execute the scripts, read the web pages, and that you can start Apache in a console window. If this works, and you have followed the steps above, Apache should execute as a service with no problems. The error code 2186 is a good indication that you need to review the 'Log On As' configuration, since the server can't access a required network resource.

When starting Apache as a service you may encounter an error message from Windows service manager. For example if you try to start Apache using the Services applet in Windows Control Panel you may get the following message:

> Could not start the apache service on \\COMPUTER
> Error 1067; The process terminated unexpectedly.

... bla bla bla

daca vrea cineva cele 3-4 texte despre configurarea Apache asa cum o aveam acasa la vremea respectiva n-are decat sa viziteze o chestie veche http://sfk.dainet.ro/oldies/ .. multe chestii sunt inca valabile :)
Sus  
soscopyrights



Data înscrierii: 31/Oct/2005
Mesaje: 43
Locație: on the keyboard

Trimis: Mar Noi 01, 2005 4:55 pm    Titlul subiectului: eroare la instalarea MySQL-ului...  

am incercat sa instalez mysql-essential-4.1.15-win32.
in ultima faza: EROARE!
http://uk.geocities.com/soscopyrights/non-site/mhysql.PNG
...m-am impotmolit...cum fac sa mearga? e ceva ce nu stiu? (...is novice ). pls..indrumare...
Sus  
carco



Data înscrierii: 27/Mai/2004
Mesaje: 2796
Locație: Bucuresti

Trimis: Mar Noi 01, 2005 5:34 pm    Titlul subiectului:  

soscopyrights a scris: am incercat sa instalez mysql-essential-4.1.15-win32.
in ultima faza: EROARE!
http://uk.geocities.com/soscopyrights/non-site/mhysql.PNG
...m-am impotmolit...cum fac sa mearga? e ceva ce nu stiu? (...is novice ). pls..indrumare...
parca ti-am zis pe chip.ro, esti admin? Mai ai cumva mysql instalat?

[joke]
johnny a scris: NO, mine is better, dar e pentru Gentoo...:
NO NO NO, MINE is better :lol: (da e cam vechi :( ) ca nu e distro-way
http://www.linux360.ro/arhiva/html/04/index.php?p=p26
[/joke]

Cine face un howto cu MySQL5? (debian)
Sus  
danny2pac



Data înscrierii: 09/Ian/2005
Mesaje: 79
Locație: Timisoara

Trimis: Joi Noi 03, 2005 2:09 pm    Titlul subiectului:  

ii valabila instalarea si ptr veriunile astea?

Apache 2.0.54
php-4.4.0-installer.exe
mysql-essential-4.1.12a-win32.msi sau mysql-noinstall-4.1.15-win32.zip
Sus  
criste



Data înscrierii: 07/Noi/2005
Mesaje: 2

Trimis: Mar Dec 13, 2005 1:06 pm    Titlul subiectului: probleme cu configurare php  

cum sa copiez fisierele cu extensia .dll din directorul c:/php daca ele nu sunt in windows.

va multumesc!
Sus  
criste



Data înscrierii: 07/Noi/2005
Mesaje: 2

Trimis: Mar Dec 13, 2005 1:10 pm    Titlul subiectului: pb configurare  

excalivbr cum sa copiez fisierele cu ext .dll din c:/php in c;/windows/windows32 daca nu le gasesc in c:/php
Sus  
ExcalIbvr



Data înscrierii: 02/Mai/2004
Mesaje: 1107
Locație: Oradea

Trimis: Mar Dec 13, 2005 2:17 pm    Titlul subiectului:  

Ele se gasesc in directorul in care ai dezarhivat (atentie, NU instalat) distributia de PHP.
Sus  
aolex



Data înscrierii: 17/Dec/2004
Mesaje: 662

Trimis: Mar Dec 13, 2005 6:19 pm    Titlul subiectului:  

tutorialele astea ieftine se gasesc la tot pasul ... nu are nimeni o instalare calumea de server ? openssl , mod_ssl , mod_security , awstats , bind etc. ... (pe windows) :)
Sus  
PHPRomania Bot
Bot Member


Data înscrierii: 27/Dec/2007
Mesaje: 1
Locaţie: Server Google
Trimis: Mie Dec 26, 2007 7:01 pm   Titlul subiectului: Ad  

Sus  
 
       Pagina de start a forumului Forum PHP Romania - Discutii despre PHP, MySQL, Javascript, AJAX, etc -> Instalare
Pagina 1 din 1


Powered by phpBB 2.0.22 © 2001, 2002 phpBB Group
Varianta în limba română: Romanian phpBB online community