|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
apache/php installation on an unconnected pc?
hi people,
im new to web programming... im just wondering if php preview is also possible on an unconnected pc... my pc is running win 2000 professional and it has no internet connection... i dont have any plans on getting one since i have access at the office... anyway, does apache/php installation need an internet connection (tcp/ip config, etc...)? i plan to practice php development through an unconnected pc and preview it before uploading... can it be done just like html? how can i do it if its possible? much help needed... ![]() |
|
#2
|
|||
|
|||
|
You can install Apache on unconnected PC running it on localhost.
You also can change http://localhost/myfile.php to http://www.mydomain.com/myfile.php by adding www.mydomain.com to your c:\winnt\system32\drivers\etc\hosts like so: 127.0.0.1 localhost www.mydomain.com |
|
#3
|
|||
|
|||
|
k thanks... installed the apache already and php... cant get my php files running...
php documentation says that i should insert some lines on the http conf. where do i insert these files? which part of the conf file? |
|
#4
|
|||
|
|||
|
Sorry, can't help you with PHP setup on M$. You should do a search using the search keyword like: php httpd.conf win2k. Your question should have been asked dozen times and must be searchable.
|
|
#5
|
||||
|
||||
|
I think you have already extracted php somewhere.
Inside httpd.conf: a) Do a search inside httpd.conf and uncomment these two lines (the bold ones) # # And for PHP 4.x, use: # AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps b) Goto <IfModule mod_alias.c> inside httpd.conf and after ScriptAlias /cgi-bin/ "C:/usr/local/etc/Apache/cgi-bin/" add this line ScriptAlias /php/ "C:/php/" Adjust the path to where you extracted php. c) Below these lines inside httpd.conf # # Action lets you define media types that will execute a script whenever # a matching file is called. This eliminates the need for repeated URL # pathnames for oft-used CGI file processors. # Format: Action media/type /cgi-script/location # Format: Action handler-name /cgi-script/location # add this: Action application/x-httpd-php "/php/php.exe" +-+-+- Write a simple script test.php <?php phpinfo(); ?> and run it. That's all!
__________________
My article: mod_rewrite: No More Endless Loops! |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > apache/php installation on an unconnected pc? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|