Jump to content

Can PHP be viewed if DOS is my OS?


ark014

Recommended Posts

  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Looks like my OS is not good old DOS  --

 

C:\APACHE\conf>ver

 

Microsoft Windows XP [Version 5.1.2600]

 

-- though I still cannot view my *.php files, or the results of any php code that appears in my *.html files.

 

Perhaps I have fat-fingered something in my httpd.conf file.

 

Is there some info on what an httpd.conf file needs to contain, if UNIX was never downloaded into a PC?

 

I am intimidated by the 80 page manual for downloading UNIX-Solaris to a PC, and by its warnings that before downloading UNIX-Solaris, everything on my C:\ disk needs to be backed up.

Link to comment
Share on other sites

Why are to trying to do this via the command line ? instead of via the gui ?

 

 

Mac uses :: [as directory separator]

 

"Old" Mac mind you. OS X is Unix based.

 

True, but Mac OS X can use either forward slash (POSIX paths) or colon ('Mac' paths)

 

> ver
Sinclair ZX81

:wtf: time for an upgrade!

Link to comment
Share on other sites

WampServer 2.0i [07/11/09]

Includes :

- Apache 2.2.11

- MySQL 5.1.36

- PHP 5.3.0

 

I have successfully downloaded Wampserver, I can see these interesting lines in its httpd.conf :

 

LoadModule php5_module "c:/wamp/bin/php/php5.3.0/php5apache2_2.dll"

ServerName localhost:80

DocumentRoot "c:/wamp/www/"

 

Currently I can display *.html files in my DocumentRoot, but any php commands in my *.html files fail to execute.

 

For example in my *.html file this simple php code produces no output:

 

  <?php echo "<P>This is a PHP test</P>\n";

?>

 

Do I need to make changes in my httpd.conf? Or is there some other problem in Wampserver?

 

P.S. - My Operating System is

C:\wamp\www>ver

 

Microsoft Windows [Version 6.1.7600]

Link to comment
Share on other sites

Wampserver apears to be a good way to get up and running with Apache, PHP, and MYSQL.

 

One problem -- for some reason PHP code will not execute in Wampserver unless Wampserver sees a *.php ending on the file it displays.

 

I have found that if I rename a *.html file to have a *.php ending, both html code and php code in my (renamed) *.php file display normally.

Link to comment
Share on other sites

Wampserver apears to be a good way to get up and running with Apache, PHP, and MYSQL.

 

One problem -- for some reason PHP code will not execute in Wampserver unless Wampserver sees a *.php ending on the file it displays.

 

What do you mean? You must then add into your .htaccess something along the lines of:

AddType application/x-httpd-php .php .html

To be able to parse PHP code. This is standard for most new PHP installations if that is what you meant.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


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