Click to See Complete Forum and Search --> : Hosting php files on Apache Server.


rajatr
03-27-2001, 04:17 AM
i have developed an application in php and mysql on windows98 and MS PWS as web server.
now i am trying to do the same on Red Hat Linux 7 and Apache server.
In MS PWS or IIS there is a folder wwwroot where we can store ASP or PHP files in a desired folder.
how can i do the same in Apache server.
i know they r stored in var/www/cgi-bin and html
but where to store html and where to store php files.
how is it possible to give url http://localhost/myweb in web browser and the application starts

thanx

Anon
03-27-2001, 08:47 AM
Hi,
if you have installed php as a module you must store your php files in your 'document root' and call them by giving your url http://localhost/myweb.

Bye

Anon
03-27-2001, 04:10 PM
Keywords: installing PHP4, missing libphp4.so, can\'t compile php4

My Instructions for installing PHP 4.0 on Red Hat Linux systems
---------------------------------------------------------------

Here\'s my version of INSTALL for building a dynamic Apache module (DSO)
for Apache 1.3.x with MySQL support.


1. If /usr/lib/libmysqlclient.so... then add /usr/lib -> /etc/ld.so.conf.
2. Run ldconfig
3. Run httpd -l. You should see
Compiled-in modules:
http_core.c
mod_so.c
4. Delete any php-4*.gz files or php-4 src-directories. Redownload the source file.
4. tar -xvzf php-4.0.4pl1.tar.gz
5. cd php-4.0.4pl1
6. ./configure --with-mysql --with-apxs=/etc/httpd/bin/apxs
7. make
8. make install
9. cp ./php.ini-dist /usr/lib/php.ini
10. Add the following to the appropiate places in /etc/httpd/conf/httpd.conf:
LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
<IfModule mod_php4.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php3-source .phps
</IfModule>
11. Uncomment any mention of php3
12. Restart your server: /etc/rc.d/init.d/httpd restart
13. Put in a test page(test.php) in your document root containing <?phpinfo()?>