PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 14th, 2003, 12:46 AM
<<RAN>> <<RAN>> is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Los Angeles, Ca
Posts: 11 <<RAN>> User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy LoadModule php4_module error!

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>>

Reply With Quote
  #2  
Old March 14th, 2003, 11:20 AM
rheroux rheroux is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Canada
Posts: 2 rheroux User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Try this instead:

LoadModule php4_module c:\php\sapi\php4apache.dll
AddType application/x-httpd-php .php

Reply With Quote
  #3  
Old March 14th, 2003, 09:14 PM
<<RAN>> <<RAN>> is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Los Angeles, Ca
Posts: 11 <<RAN>> User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #4  
Old March 15th, 2003, 05:32 AM
richard richard is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 2 richard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHP with Apache

i have the same problem. i still can't get it working! anyone else got any suggestions???

Reply With Quote
  #5  
Old March 15th, 2003, 05:38 AM
richard richard is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 2 richard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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!!!!

Reply With Quote
  #6  
Old March 15th, 2003, 09:13 AM
<<RAN>> <<RAN>> is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Los Angeles, Ca
Posts: 11 <<RAN>> User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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 ??

Reply With Quote
  #7  
Old March 20th, 2003, 03:32 PM
stguitar stguitar is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 1 stguitar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #8  
Old March 20th, 2003, 09:45 PM
JohnAlexander JohnAlexander is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Coatesville, PA
Posts: 4 JohnAlexander User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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 09:54 PM.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > LoadModule php4_module error!


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap