|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database 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
|
|||
|
|||
|
I printed the article by Ben Rowe on turning your pc into an Apache Web Server. Everything was going smoothly until I entered this set of codes into the "httpd.conf" file
LoadModule php4_module c:/php/sapi/php4apache.dll AddModule mod_php4.c AddType application/x-httpd.php When I try to restart Apache I get this error If I take the code off I can restart Apache without a problem but when I run a test php file, I see the code and not the intended output. Any and all suggestions are welcome, I am fairly new to PHP and that is why I want to set up my machine. <<RAN>> ![]() |
|
#2
|
|||
|
|||
|
Try this instead:
LoadModule php4_module c:\php\sapi\php4apache.dll AddType application/x-httpd-php .php |
|
#3
|
|||
|
|||
|
Thanks for the help.
I tried putting that on the file but I still got the same result. The file is located under c:\php\sapi\php4apache.dll just like I've designated but it doesn't find it.
Any other suggestions? ![]() |
|
#4
|
|||
|
|||
|
PHP with Apache
i have the same problem. i still can't get it working! anyone else got any suggestions???
|
|
#5
|
|||
|
|||
|
PHP with Apache 2 fix
actually, i was just messing about with it and i've figured it out. You must be using Apache 2 to get that problem. All you have to do is add
LoadModule php4_module c:/php/sapi/php4apache2.dll instead of php4apache.dll. That's it. Have fun man!!!! |
|
#6
|
|||
|
|||
|
Thanks
Thanks Richard I did that and then I started getting another error saying 'AddModule' was an invalid command, I took that out and it is working fine.
Just one more quick question, if I have php files in another directory say for example c:/website/new/index.php Do I need to move this file into the public_html folder in order to view it correctly or how do I view it so that I can see the way it's going to look on the internet. http://localhost/website/new/index.php ?? |
|
#7
|
|||
|
|||
|
not sure but i dont think it matters where your PHP files are located as long as your web pages use the proper path names to find them. the web server simply sees the extension of ".php" and says, hey i am supposed to treat this special, and parse it with the php parser.
maybe this answered your question |
|
#8
|
|||
|
|||
|
This worked for me...
#Open your httpd.conf file and make the changes below...
# FIND THIS BLOCK OF CONFIGURATION SETTINGS <--------(STEP 1) # Example: # LoadModule foo_module modules/mod_foo.so # #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 #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 ScriptAlias /php/ "c:/php/" #<----ADD THIS LINE OF CODE HERE # FIND THIS BLOCK OF CONFIGURATION SETTINGS <--------(STEP 2) # # To use server-parsed HTML files # #AddType text/html .shtml #AddHandler server-parsed .shtml AddType application/x-httpd-php .php .phtml #<----ADD THIS LINE OF CODE HERE AddType application/x-httpd-php-source .phps #<----ADD THIS LINE OF CODE HERE # FIND THIS BLOCK OF CONFIGURATION SETTINGS <--------(STEP 3) # # 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 # Action application/x-httpd-php "/php/php.exe" #<----ADD THIS LINE OF CODE HERE # FIND THIS BLOCK OF CONFIGURATION SETTINGS <--------(STEP 4) # # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. # <IfModule mod_dir.c> DirectoryIndex index.html index.php #<----ADD THIS LINE (JUST THE "index.php" part, and add any other defaults you may like such as Default.php) </IfModule> Last edited by JohnAlexander : March 20th, 2003 at 08:54 PM. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > LoadModule php4_module error! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|