Jump to content

Beginner PHP trouble


1981mateo

Recommended Posts

Hi Im having a problem with php, I create a test page using the

<?php

phpinfo();

?>

function and it comes up a blank page or "Unable to connect" page. http://localhost returns a it works page but when i refresh the page it comes up with a "Unable to connect" page.

"[warn] php module is already loaded skipping

 

[warn] php module is already loaded skipping"

Link to comment
Share on other sites

I did a fresh installof apche2.2 and php5, and didnt modify the default settings that http://16bytes.com/How_to_install_PHP5_Apache_2_2_and_MySQL_5_on_Windows.html said to do

and It works fine with http://localhost everytime but http://localhost/phptest.php comes up: 400 Bad Request

Your browser sent a request that this server could not understand.

 

Im using the apache cgi install which is probably why i dont get the "[warn] php module is already loaded skipping

 

[warn] php module is already loaded skipping" anymore.

 

and

<?php

phpinfo();

?> is the only code.

Link to comment
Share on other sites

Hmm, just curious, is it  just so you know for the future what's enabled, or is it to check something specific right now?

 

And maybe one of the other more advanced members here can help because I don't know. Sorry.

Link to comment
Share on other sites

When I use phpinfo(); I use it to test if certain libraries are enabled, and other settings, etc.. for my hosted server.

I know you're havng problems, but I'm curious why you need to test out phpinfo();?

 

If you haven't already, try testing some other code.

Link to comment
Share on other sites

I wasn't mocking him and if i came off that way im sorry, i just didnt understand what he was talking about.

I'm using the phpinfo script to check if php is working on my computer. I'm also using

 

 

<?php

 

  print ("this is a test");

 

?>

 

and the same thing happens, a page with "400 Bad Request

Your browser sent a request that this server could not understand."

 

 

I didn't know phpinfo could be used like that, since I'm a new user I just want to get it installed and properly running.

 

sorry again for any misunderstandings.

Link to comment
Share on other sites

Another idea is if you're not quite familiar with setting up a server and installing apache/php/mysql/etc you could use xampp.  It's not recommended for running live servers (from what I've heard) but it works fine for developing environments.

Link to comment
Share on other sites

It's cool, I didn't take it as offensive in any manner  ;)

 

 

I'm surprised thorpe, or any of the admins haven't shown up yet. They've probably seen errors like this before.

 

If ultimately you can't get localhost to work, I suppose your only other options are to get some free/buy server space, and test it all out there.

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.