|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Need help setting up PHP under Apache
Hi, im running Apache 1.3 Win32 on Windows XP. Ive successfully (almost) set up PHP on it with MySQL. The trouble is, that sending information from a form does not work, either in querystrings or using the post/get method. Whenever i try to read the info it comes up as a blank string. Have i missed out some vital line in php.ini or somewhere else?
Any help is greatly appreciated. Thanks |
|
#2
|
|||
|
|||
|
I highly suggest using PHPTriad (URL). It automatically sets up Apache, PHP, MySQL, and a copy of phpMyAdmin.
|
|
#3
|
||||
|
||||
|
nkunicki:
Check your php.ini file and make sure if you have your register globals = off if so, that is why it isnt posting propperly, you will need to either A) turn register globals = on or B) use the $_POST[] or $_GET[] arrays for passing values from your form to the next page. For example, my register globals = off so my code would be thus: PHP Code:
or something similar to that show me a sample of some of your code and I can try to help you debug it.. |
|
#4
|
|||
|
|||
|
perfectphp: Hi, i tried phptriad, i didnt really like it as i didnt have full control over it in my opinion. Thanks anyway
![]() nicat23: Ive checked, i already have registerglobals set to on. I tried using the $_POST or $_GET methods you suggested, but it still returns a blank string. Any ideas? Thanks |
|
#5
|
||||
|
||||
|
Turn register globals off and restart your webserver..
take the code I posted below and put it into a new php file, like test.php then go to your webserver and load test.php it should show the userform.. input the items into the form and then hit submit, it should work.. let me know if it doesnt and I'll see what else I can do for you. I'm at work right now and the power went out at my house last night and I forgot to power my ups back on as well as my webserver before I came to work... I'll put the same thing on my site and let you see what it is supposed to do.. post me a sample of your code that you're using and we'll go from there, k? - Justin |
|
#6
|
|||
|
|||
|
Hi, the code you gave me worked. But i have another problem. I have no code right now, im just trying to get the server working. The problem is, im using an example querystring that looks like ?user=blah&pass=blah, and for some reason $user and $pass return null each time, with register globals on or off. Any ideas?
Thanks |
|
#7
|
||||
|
||||
|
if that's being passed in the URL Then you'll need to use the
PHP Code:
methods check the userform and look and see what method you are using, either post or get.. again if it's being passed through the URL then more than likely you are using the GET method.. check your form out, if it shows Code:
<form action ='test.php' method = 'post'> then you are using the post method, which is what I use for my code.. if it shows Code:
<form action ='test.php' method = 'get'> then you are using the get method, which would explain why you aren't getting any results from the queries |
|
#8
|
|||
|
|||
|
Aahh, thank you. Im a newb to PHP, so i didnt quite fully understand that.
Thanks for all the help ![]() |
|
#9
|
||||
|
||||
|
Quote:
Everyone's new at one point or another ![]() Why dont you just post the code you have so far into here and I'll look at it and see what I can tell from it? |
|
#10
|
|||
|
|||
|
Like i said, i didn't actually have some code at this point, i was just setting up Apache and PHP, and testing it out with a few pre-made scripts that didnt seem to be working. Thanks anyways
![]() |
|
#11
|
||||
|
||||
|
Ahh I see.. well... no problem, hope I helped.
|
|
#12
|
|||
|
|||
|
i've read your discussion, it nice that you (nicat23) can help us(newb)
. So like others newb i have a theoretical question:I'm building a login page whit mysql database, session_start and session_end shows me if user is loged in or loged out. So my question would be like this: a)what is your idea about the login pages( i think you have build some)maybe you can share these ideas ![]() b) and about security problems...... ![]() It would be nice that you share your ideas and tell me some basics to create secure site ![]() thanx |
|
#13
|
|||
|
|||
|
Re: Need help setting up PHP under Apache
Another good ressource (in german - I thinks so...) is
URL with Apache vor Linux (LAMP) and Windows (WAMP) within PHP4 |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Server Configuration > Need help setting up PHP under Apache |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|