You are viewing our Forum Archives. To view or take place in current topics click here.
Installing php to CPU
Posted:
Installing php to CPUPosted:
Status: Offline
Joined: May 22, 201113Year Member
Posts: 235
Reputation Power: 9
Status: Offline
Joined: May 22, 201113Year Member
Posts: 235
Reputation Power: 9
I am having trouble installing php to my computer. I have went to php.net and downloaded the file, I am having troubles with the apache server. Please help. Thanks.
#2. Posted:
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 2,684
Reputation Power: 122
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 2,684
Reputation Power: 122
Is this for use as a development environment or to use the computer as a server?
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: May 22, 201113Year Member
Posts: 235
Reputation Power: 9
Status: Offline
Joined: May 22, 201113Year Member
Posts: 235
Reputation Power: 9
-Jordan- wrote Is this for use as a development environment or to use the computer as a server?
This would be for web development. I would be uploading the php files to a web hosting server.
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 2,684
Reputation Power: 122
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 2,684
Reputation Power: 122
99rock99 wrote-Jordan- wrote Is this for use as a development environment or to use the computer as a server?
This would be for web development. I would be uploading the php files to a web hosting server.
Then you're easier just installing WAMP. It comes with PHP, MySQL, PHPMyAdmin and Apache built in.
[ Register or Signin to view external links. ]
- 0useful
- 0not useful
#5. Posted:
Status: Offline
Joined: May 22, 201113Year Member
Posts: 235
Reputation Power: 9
Status: Offline
Joined: May 22, 201113Year Member
Posts: 235
Reputation Power: 9
-Jordan- wrote99rock99 wrote-Jordan- wrote Is this for use as a development environment or to use the computer as a server?
This would be for web development. I would be uploading the php files to a web hosting server.
Then you're easier just installing WAMP. It comes with PHP, MySQL, PHPMyAdmin and Apache built in.
[ Register or Signin to view external links. ]
After I install do I need to reinstall php?
- 0useful
- 0not useful
#6. Posted:
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 2,684
Reputation Power: 122
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 2,684
Reputation Power: 122
99rock99 wrote-Jordan- wrote99rock99 wrote-Jordan- wrote Is this for use as a development environment or to use the computer as a server?
This would be for web development. I would be uploading the php files to a web hosting server.
Then you're easier just installing WAMP. It comes with PHP, MySQL, PHPMyAdmin and Apache built in.
[ Register or Signin to view external links. ]
After I install do I need to reinstall php?
No. Just install that. It'll sort all the php ect for you.
- 0useful
- 0not useful
#7. Posted:
Status: Offline
Joined: May 22, 201113Year Member
Posts: 235
Reputation Power: 9
Status: Offline
Joined: May 22, 201113Year Member
Posts: 235
Reputation Power: 9
-Jordan- wrote99rock99 wrote-Jordan- wrote99rock99 wrote-Jordan- wrote Is this for use as a development environment or to use the computer as a server?
This would be for web development. I would be uploading the php files to a web hosting server.
Then you're easier just installing WAMP. It comes with PHP, MySQL, PHPMyAdmin and Apache built in.
[ Register or Signin to view external links. ]
No. Just install that. It'll sort all the php ect for you.
After I install do I need to reinstall php?
When I install this and I try running my code from the command line it pauses for a second and then prints out the directory again.
Here is the code for now
<?php
$name = ""; // blank string
//echo "Please enter your name"; // prints out in cmd
//$name = trim (fgets (STDIN)); // trim removes spaces before, filegets, standard input
//echo "Hello " . $name; // . in php = + in java
$var = rand(0, 10)// generates random number between 0 and 10
echo "Working";
if ($var == 4){
echo "4";
}
else {
echo "Number is not 4. It is" . $var;
}
while ($var > 5){
echo $var;
$var = rand (0,10);
}
?>
I type
php index.php
how come it doesn't work?
Thanks
- 0useful
- 0not useful
#8. Posted:
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 2,684
Reputation Power: 122
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 2,684
Reputation Power: 122
99rock99 wrote-Jordan- wrote99rock99 wrote-Jordan- wrote99rock99 wrote-Jordan- wrote Is this for use as a development environment or to use the computer as a server?
This would be for web development. I would be uploading the php files to a web hosting server.
Then you're easier just installing WAMP. It comes with PHP, MySQL, PHPMyAdmin and Apache built in.
[ Register or Signin to view external links. ]
No. Just install that. It'll sort all the php ect for you.
After I install do I need to reinstall php?
When I install this and I try running my code from the command line it pauses for a second and then prints out the directory again.
Here is the code for now
<?php
$name = ""; // blank string
//echo "Please enter your name"; // prints out in cmd
//$name = trim (fgets (STDIN)); // trim removes spaces before, filegets, standard input
//echo "Hello " . $name; // . in php = + in java
$var = rand(0, 10)// generates random number between 0 and 10
echo "Working";
if ($var == 4){
echo "4";
}
else {
echo "Number is not 4. It is" . $var;
}
while ($var > 5){
echo $var;
$var = rand (0,10);
}
?>
I type
php index.php
how come it doesn't work?
Thanks
You don't run it from the command line. WAMP acts as a local 'server'.
- Go to where you installed wamp. Most likely "c:\wamp"
- Now go into the "www" directory.
- Make a new folder like "tests" or something.
- Put you php file inside it.
- Turn on the server by clicking the wamp icon in your notifications bar and selecting "Put Online" ( [ Register or Signin to view external links. ] )
- Now go to [ Register or Signin to view external links. ] and click on your project folder ( [ Register or Signin to view external links. ] )
If you have any problems, message me on AIM @ JordanCallumA or PM me.
- 0useful
- 0not useful
#9. Posted:
Status: Offline
Joined: May 22, 201113Year Member
Posts: 235
Reputation Power: 9
Status: Offline
Joined: May 22, 201113Year Member
Posts: 235
Reputation Power: 9
Whenever I try launching wamp I get errors like CLI has stopped working. Apache HTTP Server stopped working and was closed. I also cannot left click the taskbar icon. double left clicking doesn't do anything either. Do I need to uninstall xampp for this to work. What else could be causing these errors. Do I need to re download and reinstall?
- 0useful
- 0not useful
#10. Posted:
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 2,684
Reputation Power: 122
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 2,684
Reputation Power: 122
99rock99 wrote Whenever I try launching wamp I get errors like CLI has stopped working. Apache HTTP Server stopped working and was closed. I also cannot left click the taskbar icon. double left clicking doesn't do anything either. Do I need to uninstall xampp for this to work. What else could be causing these errors. Do I need to re download and reinstall?
If you already have xampp then why aren't you just using that?
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.