Jump to content

My computer wont process the PHP codes??


Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/120829-my-computer-wont-process-the-php-codes/
Share on other sites

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

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>

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>

 

 

 

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.

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.