Connecting Tech Pros Worldwide Help | Site Map

Forms and PHP V5.0.2 with APACHE V2.0.50

  #1  
Old July 17th, 2005, 10:19 AM
Jim Johnstone
Guest
 
Posts: n/a
Some details of my HOME PC. I am running the following ....
Win2000 SP4; IE V6; 512MB RAM; H/Disk Space OK.
In the past couple of weeks I have installed/configured from binaries for ..

MySQL V4.1.5 [mysql-4.1.5-gamma-essential-win.msi]
Apache V2.0.50 [apache_2.0.50-win32-x86-no_ssl.msi]
PHP V5.0.2 [php-5.0.2-win32.zip]
PHPMYADMIN V2.6.0 [phpmyadmin-2.6.0-pl2.zip]

OBJECTIVE: To use my HOME PC to run a local APACHE web server on which to
develop websites that make use of PHP scripts and MySQL databases. My PC
will NOT be used as a service machine.

PROBLEM: I cannot get data from my FORMS to appear in my browser window.
i.e. I just get an HTML Heading from the PHP script and no Data or
associated Text from the Form via the ECHO command.

COMMENTS: The standard phpinfo.php test works fine. PHP date functions work
OK. I can also use the ECHO command to print the content of concatenated
variables containing strings OK.

I think the main problem is with actual DATA from a Form via Globals or
Superglobals not working.
I've tried different means of obtaining the Form data, both the old
$HTTP_POST_VARS and also the newer and preferred $_POST[...]. Associated
with this I have also tried changing the REGISTER_GLOBALS and
REGISTER_LONG_ARRAYS directive settings of the PHP.INI config file, all to
no avail. Note also that I have been restarting APACHE after each change to
PHP.INI to make sure any change is implemented.

I'm not clear on this latter point as I would have thought that Restarting
APACHE was only necessary after alterations to its own config file,
HTTPD.CONF?

I think that I may have a configuration problem with either or both PHP and
APACHE. Maybe they are not working correctly together?

Can anyone offer any help? FAQ's I've seen essentially cover the points
listed above.


  #2  
Old July 17th, 2005, 10:19 AM
Sathia Musso
Guest
 
Posts: n/a

re: Forms and PHP V5.0.2 with APACHE V2.0.50


try

print_r($_POST);
print_r($_GET);



  #3  
Old July 17th, 2005, 10:19 AM
Pedro Graca
Guest
 
Posts: n/a

re: Forms and PHP V5.0.2 with APACHE V2.0.50


Jim Johnstone wrote:[color=blue]
> I think the main problem is with actual DATA from a Form via Globals or
> Superglobals not working.
> I've tried different means of obtaining the Form data, both the old
> $HTTP_POST_VARS and also the newer and preferred $_POST[...]. Associated
> with this I have also tried changing the REGISTER_GLOBALS and
> REGISTER_LONG_ARRAYS directive settings of the PHP.INI config file, all to
> no avail. Note also that I have been restarting APACHE after each change to
> PHP.INI to make sure any change is implemented.
>
> I'm not clear on this latter point as I would have thought that Restarting
> APACHE was only necessary after alterations to its own config file,
> HTTPD.CONF?[/color]

I'm not sure, but ...

I guess if php is installed as a Apache module it gets loaded when
Apache starts.
[color=blue]
> Can anyone offer any help? FAQ's I've seen essentially cover the points
> listed above.[/color]

Increase the reporting level to E_ALL either in php.ini or with

<?php error_reporting(E_ALL); ?>

in your test script(s).
--
USENET would be a better place if everybody read: | to mail me: simply |
http://www.catb.org/~esr/faqs/smart-questions.html | "reply" to this post, |
http://www.netmeister.org/news/learn2quote2.html | *NO* MIME, plain text |
http://www.expita.com/nomime.html | and *NO* attachments. |
  #4  
Old July 17th, 2005, 10:19 AM
Andy Hassall
Guest
 
Posts: n/a

re: Forms and PHP V5.0.2 with APACHE V2.0.50


On Wed, 27 Oct 2004 15:13:19 +0100, "Jim Johnstone"
<jimmy@jimjohnstone.plus.com> wrote:
[color=blue]
>Some details of my HOME PC. I am running the following ....
>Win2000 SP4; IE V6; 512MB RAM; H/Disk Space OK.
>In the past couple of weeks I have installed/configured from binaries for ..
>
>MySQL V4.1.5 [mysql-4.1.5-gamma-essential-win.msi][/color]

Not relevant to the current issue, but MySQL 4.1 went General Availability
today on 4.1.7 so it might be worth installing that.
[color=blue]
>Apache V2.0.50 [apache_2.0.50-win32-x86-no_ssl.msi]
>PHP V5.0.2 [php-5.0.2-win32.zip]
>PHPMYADMIN V2.6.0 [phpmyadmin-2.6.0-pl2.zip]
>
>OBJECTIVE: To use my HOME PC to run a local APACHE web server on which to
>develop websites that make use of PHP scripts and MySQL databases. My PC
>will NOT be used as a service machine.
>
>PROBLEM: I cannot get data from my FORMS to appear in my browser window.
>i.e. I just get an HTML Heading from the PHP script and no Data or
>associated Text from the Form via the ECHO command.
>
>COMMENTS: The standard phpinfo.php test works fine. PHP date functions work
>OK. I can also use the ECHO command to print the content of concatenated
>variables containing strings OK.
>
>I think the main problem is with actual DATA from a Form via Globals or
>Superglobals not working.
>I've tried different means of obtaining the Form data, both the old
>$HTTP_POST_VARS and also the newer and preferred $_POST[...]. Associated
>with this I have also tried changing the REGISTER_GLOBALS and
>REGISTER_LONG_ARRAYS directive settings of the PHP.INI config file, all to
>no avail.[/color]

You've posted a lot of information about configuration - this is good -
however you've missed the most important parts - actual example code, and
examples of how the output differs from what you expect.

$_GET and $_POST are the two main ways to get data from forms. Are you mixing
up GET and POST perhaps?
[color=blue]
>Note also that I have been restarting APACHE after each change to
>PHP.INI to make sure any change is implemented.
>
>I'm not clear on this latter point as I would have thought that Restarting
>APACHE was only necessary after alterations to its own config file,
>HTTPD.CONF?[/color]

PHP only reads its configuration on startup. When loaded as an Apache module,
this means you have to completely stop and then restart Apache to get the PHP
module to be reloaded and so re-read its configuration.

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Closed Thread