JLitkie Posted August 22, 2008 Share Posted August 22, 2008 So Im, kinda new to PHP and MySQL, but I understand computers and programming language and have built many a websites, just none that involved a database. So I want to build a special database that can be entered and show on a page in another frame, which can also be seen by specific other people. But thats a little more into the furture.. my current problem is that when write the php code and save as a .php file, then try and test it.. my computer simply pops up a box asking me if i want to install it, open it, or cancel.. when i checked the install it or open it it just does the same thing over again.. im quite confused. I have all the right software, like Apache2.2, MySQL 5.0, and the PHP software. I even redirected the documentroot files to be where my webpages would be. When restarted i get no errors, so i dont think its on my server side. What do you think about it? Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 22, 2008 Share Posted August 22, 2008 are you saying when you go to http://localhost/file_name.php in internet explore you get that? Scott. Quote Link to comment Share on other sites More sharing options...
JLitkie Posted August 22, 2008 Author Share Posted August 22, 2008 Yeah, when I open the file in the internet explorer I get that box that pops up Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 22, 2008 Share Posted August 22, 2008 are you running it as a CGI or as just normal PHP? This sounds like a problem with you apache configuration. Scott. Quote Link to comment Share on other sites More sharing options...
JLitkie Posted August 22, 2008 Author Share Posted August 22, 2008 Im under the impression it running as a PHP, since I have it saved as that.. can it be run as a CGI script? Im using the Visual book on PHP and MySQL.. it what I configured my server to.. when I restart the server it doesn't find any problems.. I only know how to configure the server based exactly on what the book told me and showed me.. How would I find more info on how to check my configuration? Oh and thank you by the way, I apreciate you helping me. -Joel Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 22, 2008 Share Posted August 22, 2008 i am guessing you are using windows have you checked that there is a bin in http.conf or apache.conf i am not sure which one it is on windows but is there a bit at the bottom about php? Scott. Quote Link to comment Share on other sites More sharing options...
JLitkie Posted August 22, 2008 Author Share Posted August 22, 2008 I looked and found a cgi-bin under the apache configuration, but im confused about it.. should it be redirected to where i will be saving my webpages to? Which is D:\EMSCN .. Im still learning alot about this stuff.. so I know CGI is used for basic scripts and processing forms, but does it interact with PHP, or should I be making a change to the CGI Bin? I included a portion of the configuration.. if you dont mid taking a look.. <IfModule alias_module> # # Redirect: Allows you to tell clients about documents that used to # exist in your server's namespace, but do not anymore. The client # will make a new request for the document at its new location. # Example: # Redirect permanent /foo http://localhost/bar # # Alias: Maps web paths into filesystem paths and is used to # access content that does not live under the DocumentRoot. # Example: # Alias /webpath /full/filesystem/path # # If you include a trailing / on /webpath then the server will # require it to be present in the URL. You will also likely # need to provide a <Directory> section to allow access to # the filesystem path. # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing "/" apply to ScriptAlias # directives as to Alias. # ScriptAlias /cgi-bin/ "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/" </IfModule> <IfModule cgid_module> # # ScriptSock: On threaded servers, designate the path to the UNIX # socket used to communicate with the CGI daemon of mod_cgid. # #Scriptsock logs/cgisock </IfModule> # # "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 22, 2008 Share Posted August 22, 2008 hey its [ code ] for he box but anyway. check the last few lines of th conf file and see if they say anything about php Scott. Quote Link to comment Share on other sites More sharing options...
JLitkie Posted August 22, 2008 Author Share Posted August 22, 2008 oops, never really used the code thing before.. just learned about it.. The bottom did not say anything.. all it said was: # Secure (SSL/TLS) connections #Include conf/extra/httpd-ssl.conf # # Note: The following must must be present to support # starting without SSL on platforms with no /dev/random equivalent # but a statically compiled-in mod_ssl. # <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 22, 2008 Share Posted August 22, 2008 in conf/extra/ is the file a file called php.conf or something like that? Scott. Quote Link to comment Share on other sites More sharing options...
JLitkie Posted August 22, 2008 Author Share Posted August 22, 2008 no, i didn't see any file like that.. Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 22, 2008 Share Posted August 22, 2008 it looks like you haven't told apache where to find php try adding something like this to your apache config file # For PHP 5 do something like this: LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php # configure the path to php.ini PHPIniDir "C:/php" you will properly need to change the directory's (unless php is installed in C:\php) Scott. Quote Link to comment Share on other sites More sharing options...
JLitkie Posted August 22, 2008 Author Share Posted August 22, 2008 The guide book i have, had me enter those in different locations.. I double checked and they are actually in there.. just for good measure I added your codes and restarted the server.. it still came back with the same problem. Maybe I have a glitch in a in my browser or something.. Maybe I should just have my computer purged and reinstall everything.. that might get rid of the kinks.. and give fresh playing field.. Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 22, 2008 Share Posted August 22, 2008 yea sorry but i am out of ideas i run a linux server i use to use a windows one but i can't remember having this kinda problems Scott. Quote Link to comment Share on other sites More sharing options...
Prismatic Posted August 22, 2008 Share Posted August 22, 2008 I would go ahead and uninstall your copies of MySQL, PHP and Apache and download something called WAMP http://www.wampserver.com/en/ It comes pre-configured with Apache, MySQL, and PHP. All you have to do is install it. Your web root will be found under c:\wamp\www Quote Link to comment Share on other sites More sharing options...
JLitkie Posted August 24, 2008 Author Share Posted August 24, 2008 I installed the wamp server and it still is not working.. Am i supposed to format it or somthing?? Thanks 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.