HowdeeDoodee Posted July 8, 2009 Share Posted July 8, 2009 Thank you in advance for your replies. I am sure this issue has been answered numerous times but I cannot find an answer specific to my installations. Issue: php is not being called up On Windows XP, SP3, I am running: php 5.3 MySql 5.4.1 apache 2.2.11 Programs above were installed using the installer accompanying each program. Programs above are installed in: C:\Program Files\MySQL\MySQL Server 5.4 C:\Program Files\PHP C:\Program Files\Apache Software Foundation Under system variables I have: Path C:\Program Files\PHP\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\MySQL\MySQL Server 5.4\bin PHPRC C:\Program Files\PHP\ php test file syntax is: <? echo 'PHP is working.<br>'; echo phpinfo(); ?> test file is called up as: http://localhost/test.php When the test file is called up, all the syntax is displayed in the browser as opposed to just the text inside the single quotes. No phpinfo is displayed. Apache is running without visible errors. Thank you again for any help. Quote Link to comment Share on other sites More sharing options...
corbin Posted July 8, 2009 Share Posted July 8, 2009 Have you told Apache to load the PHP module (LoadModule) and told it to treat .php files as PHP files (AddType)? Quote Link to comment Share on other sites More sharing options...
HowdeeDoodee Posted July 8, 2009 Author Share Posted July 8, 2009 Thank you for the response. Since I am a total novice regarding installation and configuration matters, my answer is "probably not." Can you look at the following lines taken from Apache httpd.conf and make suggestions as to what I need to add or change? Thank you again. From the httpd.conf file of Apache, here are the LoadModule lines # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so # LoadModule actions_module modules/mod_actions.so LoadModule alias_module modules/mod_alias.so LoadModule asis_module modules/mod_asis.so LoadModule auth_basic_module modules/mod_auth_basic.so #LoadModule auth_digest_module modules/mod_auth_digest.so #LoadModule authn_alias_module modules/mod_authn_alias.so #LoadModule authn_anon_module modules/mod_authn_anon.so #LoadModule authn_dbd_module modules/mod_authn_dbd.so #LoadModule authn_dbm_module modules/mod_authn_dbm.so LoadModule authn_default_module modules/mod_authn_default.so LoadModule authn_file_module modules/mod_authn_file.so #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so #LoadModule authz_dbm_module modules/mod_authz_dbm.so LoadModule authz_default_module modules/mod_authz_default.so LoadModule authz_groupfile_module modules/mod_authz_groupfile.so LoadModule authz_host_module modules/mod_authz_host.so #LoadModule authz_owner_module modules/mod_authz_owner.so LoadModule authz_user_module modules/mod_authz_user.so LoadModule autoindex_module modules/mod_autoindex.so #LoadModule cache_module modules/mod_cache.so #LoadModule cern_meta_module modules/mod_cern_meta.so LoadModule cgi_module modules/mod_cgi.so #LoadModule charset_lite_module modules/mod_charset_lite.so #LoadModule dav_module modules/mod_dav.so #LoadModule dav_fs_module modules/mod_dav_fs.so #LoadModule dav_lock_module modules/mod_dav_lock.so #LoadModule dbd_module modules/mod_dbd.so #LoadModule deflate_module modules/mod_deflate.so LoadModule dir_module modules/mod_dir.so #LoadModule disk_cache_module modules/mod_disk_cache.so #LoadModule dumpio_module modules/mod_dumpio.so LoadModule env_module modules/mod_env.so #LoadModule expires_module modules/mod_expires.so #LoadModule ext_filter_module modules/mod_ext_filter.so #LoadModule file_cache_module modules/mod_file_cache.so #LoadModule filter_module modules/mod_filter.so #LoadModule headers_module modules/mod_headers.so #LoadModule ident_module modules/mod_ident.so #LoadModule imagemap_module modules/mod_imagemap.so LoadModule include_module modules/mod_include.so #LoadModule info_module modules/mod_info.so LoadModule isapi_module modules/mod_isapi.so #LoadModule ldap_module modules/mod_ldap.so #LoadModule logio_module modules/mod_logio.so LoadModule log_config_module modules/mod_log_config.so #LoadModule log_forensic_module modules/mod_log_forensic.so #LoadModule mem_cache_module modules/mod_mem_cache.so LoadModule mime_module modules/mod_mime.so #LoadModule mime_magic_module modules/mod_mime_magic.so LoadModule negotiation_module modules/mod_negotiation.so #LoadModule proxy_module modules/mod_proxy.so #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so #LoadModule proxy_connect_module modules/mod_proxy_connect.so #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so #LoadModule proxy_http_module modules/mod_proxy_http.so #LoadModule rewrite_module modules/mod_rewrite.so LoadModule setenvif_module modules/mod_setenvif.so #LoadModule speling_module modules/mod_speling.so #LoadModule ssl_module modules/mod_ssl.so #LoadModule status_module modules/mod_status.so #LoadModule substitute_module modules/mod_substitute.so #LoadModule unique_id_module modules/mod_unique_id.so #LoadModule userdir_module modules/mod_userdir.so #LoadModule usertrack_module modules/mod_usertrack.so #LoadModule version_module modules/mod_version.so #LoadModule vhost_alias_module modules/mod_vhost_alias.so Here are the AddType lines: DefaultType text/plain <IfModule mime_module> # # TypesConfig points to the file containing the list of mappings from # filename extension to MIME-type. # TypesConfig conf/mime.types # # AddType allows you to add to or override the MIME configuration # file specified in TypesConfig for specific file types. # #AddType application/x-gzip .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi # For type maps (negotiated resources): #AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # #AddType text/html .shtml #AddOutputFilter INCLUDES .shtml </IfModule> Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 8, 2009 Share Posted July 8, 2009 If you used the installer it should ask what server you are using. You should of choosen Apache2.2.x from the list of servers. The installer will then apply the required changes for you. Once PHP is installed restart Apache. Quote Link to comment Share on other sites More sharing options...
HowdeeDoodee Posted July 8, 2009 Author Share Posted July 8, 2009 Thank you. How do I restart Apache without restarting the computer? Quote Link to comment Share on other sites More sharing options...
corbin Posted July 8, 2009 Share Posted July 8, 2009 \Path\To\Apache\bin\httpd -k restart Or if you have it installed as a service (you probably do): net stop apache2.2 net start apache2.2 Quote Link to comment Share on other sites More sharing options...
HowdeeDoodee Posted July 8, 2009 Author Share Posted July 8, 2009 Where are the following commands to be entered? net stop apache2.2 net start apache2.2 Quote Link to comment Share on other sites More sharing options...
HowdeeDoodee Posted July 8, 2009 Author Share Posted July 8, 2009 For others reading this thread and as an update... On my system the full path name using Apache 2.2 is... C:\Program Files\Apache Software Foundation\Apache2.2\bin\httpd -k restart Pasting and running the above command in Windows Explorer address bar did bring up a command window. However, the command window appeared and disappeared so fast the contents of the command window could not be read. If indeed Apache did restart, the issue of php not being still called remains. Quote Link to comment Share on other sites More sharing options...
corbin Posted July 9, 2009 Share Posted July 9, 2009 Start->All Programs->Accessories->Command Prompt Or something like that. Or Start->Run-> Type in "cmd" and hit enter Or Windows logo + R -> type in "cmd" and hit enter. Quote Link to comment Share on other sites More sharing options...
HowdeeDoodee Posted July 9, 2009 Author Share Posted July 9, 2009 Thank you. OK, the above commands typed in after the command prompt did start and stop apache. However, php is still not being called. Need more suggestions, please. Quote Link to comment Share on other sites More sharing options...
HowdeeDoodee Posted July 10, 2009 Author Share Posted July 10, 2009 After too many efforts at solving this issue, I am going to try to install an earlier version of PHP. From my research, the latest version of php is loaded with undesirables. Quote Link to comment Share on other sites More sharing options...
HowdeeDoodee Posted July 11, 2009 Author Share Posted July 11, 2009 Did not have to install an earlier version. I found this tutorial that helped me solve a number of issues. http://www.arterground.com/ Quote Link to comment Share on other sites More sharing options...
HowdeeDoodee Posted July 11, 2009 Author Share Posted July 11, 2009 This issue has been solved. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.