5 Replies - 474 Views - Last Post: 10 August 2017 - 10:47 AM

#1 tendaimare  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 182
  • Joined: 04-November 10

Host php File on Apache Web server

Posted 09 August 2017 - 11:38 PM

I am new to PHP and I downloaded a php ZIP File here the - VC14 x64 Thread Safe (2017-Aug-02 00:20:21).
I also downloaded Apache from here - Apache 2.4.27 Win64 :httpd-2.4.27-Win64-VC15.zip.
I followed instruction on how to install these programs on my Windows 10 pro 64 Bit machine. After Install the Apache when i mouse over the ApacheMonitor.Exe in the system tray it tells me that : "Running All Apache services". When I run this command in the Command Prompt
C:\PHP>php –info
it gives me PHP configuration information which convinces me that PHP is installed well. but now when I make a php file in notepad phpinfo.php with the following code
<?php phpinfo(); ?>
and place it in my "C:\Apache24\htdocs". when I go to my Web browser and type in "http://localhost:8080/phpinfo.php" it does not give me php information which convinces me that something is wrong. I want to be able to upload my php files and access them from the browser how can i do this?

Is This A Good Question/Topic? 0
  • +

Replies To: Host php File on Apache Web server

#2 Atli  Icon User is offline

  • Enhance Your Calm
  • member icon

Reputation: 4237
  • View blog
  • Posts: 7,213
  • Joined: 08-June 10

Re: Host php File on Apache Web server

Posted 10 August 2017 - 04:38 AM

It's hard to say what may have gone wrong without knowing the exact steps. However I do know that it's generally not a good idea to try to use the Thread Safe versions of PHP with Apache.

If you're just looking for a development environment, you may want to consider something like XAMPP instead of manually putting it all together yourself. Saves a lot of time and effort.
Was This Post Helpful? 0
  • +
  • -

#3 no2pencil  Icon User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6538
  • View blog
  • Posts: 30,609
  • Joined: 10-May 07

Re: Host php File on Apache Web server

Posted 10 August 2017 - 05:00 AM

Running the command on the command line will work, because the binary executable is installed. This does not confirm that Apache is configured to use php correctly, as the test is directly with php & not through Apache.

If you go to the url & the php is not working correctly, I would first look to the httpd.conf & make sure you added the listener for file type .php.
Was This Post Helpful? 0
  • +
  • -

#4 tendaimare  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 182
  • Joined: 04-November 10

Re: Host php File on Apache Web server

Posted 10 August 2017 - 07:17 AM

Installi wamp was my first option but then the reason that I went by installing php and apache is because the machine already has mysql . so when i installed wamp yesterday the workbench that was already there stopped working because it was saying the service has been stopped. this scared because the machine is my boss's - so i removed the wamp. but i really need to access my php files from the web browser so i ended up installing php and apache separetely without mysql- its already there.
I am looking for an easy way to put my php files on a server .
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13347
  • View blog
  • Posts: 53,157
  • Joined: 12-June 08

Re: Host php File on Apache Web server

Posted 10 August 2017 - 08:29 AM

Wait. .what? Why is your boss's machine hooked to the web in such a fashion it would work as a web server? That.. that's not right.
Was This Post Helpful? 0
  • +
  • -

#6 tendaimare  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 182
  • Joined: 04-November 10

Re: Host php File on Apache Web server

Posted 10 August 2017 - 10:47 AM

yes its a really poerfull machine - should be a server but now he assigned to work on this machine bacause it has Visual studio enterprise and win 10 pro 64 bit so i can use it to make cross platform apps in Vs2017
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1