|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
ok i'm having some trouble with the httpd file, so i'm wondering in the httpd file what do i edit so i can get php working?
![]()
__________________
Apache Expert |
|
#2
|
|||
|
|||
|
why dont you get the phpdev bundle from www.firepages.com.au? Will save your time and you can have extras (if you want).
good luck |
|
#3
|
|||
|
|||
|
i'll assume you have php already installed to C:/php/
Find in the Apache httpd: Code:
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin/"
<Directory "C:/Program Files/Apache Group/Apache/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
and add the following below it: Code:
ScriptAlias /php/ "C:/php/"
#
# "C:/php/" should be changed to whatever your ScriptAliased
# PHP directory exists, if you have that configured.
#
<Directory "C:/php">
AllowOverride None
Options None
</Directory>
AddType application/x-httpd-php .php .php3
Action application/x-httpd-php "/php/php.exe"
As with the CGI directory the scriptAlias has a trailing / but the <Directory> doesn't. save the changes and restart Apache. Nautilus |
|
#4
|
|||
|
|||
|
hmmm, currently im running the latest version of apache on my boot of xp, and i didnt have any problems with installing it??? you know about the install version of apache dont you??? what version, as in type of apache?? the install or another version?
|
|
#5
|
|||
|
|||
|
The above installs PHP as CGI in Apache, which has a much more unreliable SAPI.
Better is to make PHP available through a module, which is done in the following manner: first, go to your PHP directory and copy all dll's from the dlls directory to your System32 directory under Windows. Then, copy the php4ts.dll from the PHP root dir, also to the System32 dir. then, go to your httpd.conf file, and add the following lines: Code:
### PHP module, adjust the path LoadModule php4_module c:/php/sapi/php4apache.dll AddModule mod_php4.c AddType application/x-httpd-php .php .phtml .php3 ### only add the line below if you want files named .phps to be visible as source code AddType application/x-httpd-php-source .phps |
|
#6
|
|||
|
|||
|
Quote:
i tried that there with my configuration and i got some funny error. let me try it again and see what it says. also guys under apache how do i go about making my site where i can access all the folders underneath a particular directory? ![]() |
|
#7
|
|||
|
|||
|
Quote:
Could you post the error, so I can see where it goes wrong? |
|
#8
|
|||
|
|||
|
ok i got it working but i have a question? how in the world do i get this thing to point to where my folder with all my scripts is?
i keep getting 404 errors everytime and i don't know what i'm doing. please help....![]() |
|
#9
|
|||
|
|||
|
Quote:
in your htttpd.conf file, look for : (below is my path, yours is where you installed Apache) DocumentRoot " c:\server\apache\htdocs" change the path above to match the dir where your site is in. and below that, the first : <Directory "c:\server\apache\htdocs"> change the path above to match the dir where your site is in. |
|
#10
|
|||
|
|||
|
partyganger you're a lifesaver man thanks i got it working and pointed to my directory.
now how do i setup mysql under apache? sorry for all these questions.....![]() |
|
#11
|
|||
|
|||
|
Quote:
No worries ![]() Go to www.mysql.com and download the latest Win32 Binary (it's in a zip file.) Install that, go to the bin directory in the directory in which you installed MySQL and run winmysqladmin.exe. (MySQL is not setup under Apache but under PHP and as of version 4, support for MySQL is built into PHP :-D ) You should see a traffic light icon that should be green. popping up in the system tray (where the clock is in windows :P). If not green, reboot and then it should work fine. (rebooting, the mother of all debuggers .Then, double click that icon and it'll ask you for a username and password. ALWAYS!! use root for username here and any password (don't leave it empty because root gives you full access to MySQL (including the Grant tabls, in wich user rights for MySQL are defined)) If you want to make it really easy for yourself, download phpMyAdmin and add the following lines to your httpd.conf: Code:
### ajust the path accordingly to where you extracted phpMyAdmin
Alias /phpmyadmin/ "C:/server/phpmyadmin/"
<Directory "C:/server/phpmyadmin">
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
and in the config.inc.php file in the phpmyadmin dir, find what you see below and edit that to match your path (on the site, not on your harddrive, as seen below) Code:
$cfgPmaAbsoluteUri = 'http://localhost:8000/phpmyadmin/'; Just below that line, you can enter your username (which is already set to "root" in the config.inc.php and the password for MySQL Now your al done ![]() any questions? ![]() Last edited by partyganger : May 27th, 2002 at 01:54 AM. |
|
#12
|
|||
|
|||
|
i know how to install mysql already, i just thought there was some other way to install it under apache.
anyways heres my deal i need to completely delete mysql from my computer, because i deleted all the users except my username and since then phpmyadmin has stopped working as well as anything pertaining to the mysql database and i was wondering how do i get these programs working correctly again.![]() |
|
#13
|
|||
|
|||
|
ok guys my site contains 5 pages and using apache howcome, when i point it to my site name example http://loadsiteplease/all.php i get nothing but a white screen.
how do i get it to load all 5 pages under apache?![]() |
|
#14
|
|||
|
|||
|
Re: Help!!!
Quote:
Could you show me your source code? |
|
#15
|
|||
|
|||
|
Re: Re: Help!!!
Quote:
from my site or from the httpd file or both? ![]() |
|
#16
|
|||
|
|||
|
in your httpd.conf, you have to set the Directory index, which is now only index.html to:
Code:
<IfModule mod_dir.c>
DirectoryIndex index.html index.php index.cgi
</IfModule>
or to whatever page you want your visitor to go to first In your site: if you want 1 page to include all the other pages, you can use the include() function: Code:
include("path/page1.php");
include("path/page2.php");
include("path/page3.php");
include("path/page4.php");
enz. |