Newbie problem: PHP script not running in browser

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • V S Rawat

    Newbie problem: PHP script not running in browser

    (bringing the discussion here for php.general)

    I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
    5.0.51b. http://localhost/ is E:\wamp\www\

    I have put the first php script to hello.php file:

    <html>
    <head>
    <title>PHP Test</title>
    </head>
    <body>
    <?php echo '<p>Hello World</p>'; ?>
    </body>
    </html>

    Putting the above file to E:\wamp\www\php _ex but giving
    http://localhost/php_ex/hello.php shows a blank screen

    I have forgotten some previous situation where it had appeared as

    Hello World

    '; ?>

    on the browser.

    E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f file has the lines:
    LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php3

    My Computer
    manage
    Services and Applications
    Services
    shows that Apache is running

    wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
    system, and

    wampmysqld, started, manual, local system, and

    I restarted all services from the wamp systray icon. That gave the
    following entries in apache_error.lo g

    [Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
    --
    Shutting down the server.
    [Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
    Child process is ending.
    [Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
    mutex
    [Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
    have
    exited.
    [Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
    exiting
    [Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
    successfully.
    [Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
    configured -- resuming normal operations
    [Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
    [Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
    [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
    running
    [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
    mutex.
    [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
    threads.

    so, that means apache is running.

    I gave, check port 80. The dos window that opened said "your port 80
    is
    not used" and the following entry got added in error_log:

    [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
    listen on port 80.

    The file E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f has

    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory,
    but
    # symbolic links and aliases may be used to point to other locations.
    #
    DocumentRoot "e:/wamp/www/"

    What is stopping it?

    Thanks.
    --
    V
  • The Hajj

    #2
    Re: Newbie problem: PHP script not running in browser

    I haven't seen wamp not work out of the box before, but I think the
    first time you have to left click on the icon and select put online,
    don't quote me on this though(may have been prior to 2). The icon
    should not be yellow as it means something's not running. Do a regular
    html page and see if you're seeing anything. Also make sure you're not
    opening the file locally i.e. double clicking on it (really big hint,
    if the url says file:// you are wrong). Beyond that I would say
    reinstall but that's extreme

    Comment

    • BlackRose

      #3
      Re: Newbie problem: PHP script not running in browser

      On Aug 7, 11:06 am, V S Rawat <vsra...@gmail. comwrote:
      (bringing the discussion here for php.general)
      >
      I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
      5.0.51b.http://localhost/is E:\wamp\www\
      >
      I have put the first php script to hello.php file:
      >
      <html>
      <head>
      <title>PHP Test</title>
      </head>
      <body>
      <?php echo '<p>Hello World</p>'; ?>
      </body>
      </html>
      >
      Putting the above file to E:\wamp\www\php _ex but givinghttp://localhost/php_ex/hello.phpshows a blank screen
      >
      I have forgotten some previous situation where it had appeared as
      >
      Hello World
      >
      '; ?>
      >
      on the browser.
      >
      E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f file has the lines:
      LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
      AddType application/x-httpd-php .php
      AddType application/x-httpd-php .php3
      >
      My Computer
      manage
      Services and Applications
      Services
      shows that Apache is running
      >
      wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
      system, and
      >
      wampmysqld, started, manual, local system, and
      >
      I restarted all services from the wamp systray icon. That gave the
      following entries in apache_error.lo g
      >
      [Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
      --
      Shutting down the server.
      [Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
      Child process is ending.
      [Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
      mutex
      [Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
      have
      exited.
      [Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
      exiting
      [Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
      successfully.
      [Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
      configured -- resuming normal operations
      [Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
      [Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
      [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
      running
      [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
      mutex.
      [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
      threads.
      >
      so, that means apache is running.
      >
      I gave, check port 80. The dos window that opened said "your port 80
      is
      not used" and the following entry got added in error_log:
      >
      [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
      listen on port 80.
      >
      The file E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f has
      >
      # DocumentRoot: The directory out of which you will serve your
      # documents. By default, all requests are taken from this directory,
      but
      # symbolic links and aliases may be used to point to other locations.
      #
      DocumentRoot "e:/wamp/www/"
      >
      What is stopping it?
      >
      Thanks.
      --
      V
      can you see normal html files?

      Comment

      • V S Rawat

        #4
        Re: Newbie problem: PHP script not running in browser

        On 8/7/2008 5:39 AM India Time, _The Hajj_ wrote:
        I haven't seen wamp not work out of the box before, but I think the
        first time you have to left click on the icon and select put online,
        which icon to "left click on the icon and select put online"?

        it is showing Joomla, drupal sites that I have downloaded under the same
        www folder. it is showing entire php documentation, it is showing php
        admin, allows me to create database, change priviledges, change
        password, so I guess non-php part is working.
        don't quote me on this though(may have been prior to 2). The icon
        should not be yellow
        which icon? the systray icon of wamp is not yellow. is white. goes to
        red/ yellow when I stop all or some services.
        as it means something's not running. Do a regular
        html page and see if you're seeing anything. Also make sure you're not
        opening the file locally i.e. double clicking on it (really big hint,
        if the url says file:// you are wrong). Beyond that I would say
        reinstall but that's extreme
        yeah, I will reinstall but I wanted to understand the problem. if this
        thread doesn't lead anywhere, I would.

        thanks.
        --
        V

        Comment

        • V S Rawat

          #5
          Re: Newbie problem: PHP script not running in browser

          On 8/7/2008 10:24 AM India Time, _BlackRose_ wrote:
          can you see normal html files?
          Yes. All joomla, drupal, zencart sites on localhost, entire phpadmin and
          php documentation is showing up.

          Comment

          • BlackRose

            #6
            Re: Newbie problem: PHP script not running in browser

            ok.. I see that above you posted the error log for when your apache
            just starts. What shows up on the access and error logs when you try
            to visit that page?

            Comment

            • Richard

              #7
              Re: Newbie problem: PHP script not running in browser


              "V S Rawat" <vsrawat@gmail. comwrote in message
              news:76fefdf3-6b94-4e2a-b26a-8060b0b1323f@i2 0g2000prf.googl egroups.com...
              (bringing the discussion here for php.general)
              >
              I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
              5.0.51b. http://localhost/ is E:\wamp\www\
              >
              I have put the first php script to hello.php file:
              >
              <html>
              <head>
              <title>PHP Test</title>
              </head>
              <body>
              <?php echo '<p>Hello World</p>'; ?>
              </body>
              </html>
              >
              Putting the above file to E:\wamp\www\php _ex but giving
              http://localhost/php_ex/hello.php shows a blank screen
              >
              I have forgotten some previous situation where it had appeared as
              >
              Hello World
              >
              '; ?>
              >
              on the browser.
              >
              E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f file has the lines:
              LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
              AddType application/x-httpd-php .php
              AddType application/x-httpd-php .php3
              >
              My Computer
              manage
              Services and Applications
              Services
              shows that Apache is running
              >
              wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
              system, and
              >
              wampmysqld, started, manual, local system, and
              >
              I restarted all services from the wamp systray icon. That gave the
              following entries in apache_error.lo g
              >
              [Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
              --
              Shutting down the server.
              [Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
              Child process is ending.
              [Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
              mutex
              [Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
              have
              exited.
              [Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
              exiting
              [Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
              successfully.
              [Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
              configured -- resuming normal operations
              [Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008
              00:37:19
              [Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process
              1872
              [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
              running
              [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
              mutex.
              [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
              threads.
              >
              so, that means apache is running.
              >
              I gave, check port 80. The dos window that opened said "your port 80
              is
              not used" and the following entry got added in error_log:
              >
              [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
              listen on port 80.
              >
              The file E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f has
              >
              # DocumentRoot: The directory out of which you will serve your
              # documents. By default, all requests are taken from this directory,
              but
              # symbolic links and aliases may be used to point to other
              locations.
              #
              DocumentRoot "e:/wamp/www/"
              >
              What is stopping it?
              >
              Thanks.
              --
              V
              hi,
              do you have error reporting turned on for PHP?
              If not then please do.

              Richard


              Comment

              • The Hajj

                #8
                Re: Newbie problem: PHP script not running in browser

                On Aug 7, 3:07 am, V S Rawat <vsra...@gmail. comwrote:
                >
                which icon to "left click on the icon and select put online"?
                It would be the same one where you stop/restart the services but if
                you're seeing Joomla then something else is going on and I feel it's
                something simple.

                Comment

                • Jerry Stuckle

                  #9
                  Re: Newbie problem: PHP script not running in browser

                  V S Rawat wrote:
                  (bringing the discussion here for php.general)
                  >
                  I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
                  5.0.51b. http://localhost/ is E:\wamp\www\
                  >
                  I have put the first php script to hello.php file:
                  >
                  <html>
                  <head>
                  <title>PHP Test</title>
                  </head>
                  <body>
                  <?php echo '<p>Hello World</p>'; ?>
                  </body>
                  </html>
                  >
                  Putting the above file to E:\wamp\www\php _ex but giving
                  http://localhost/php_ex/hello.php shows a blank screen
                  >
                  I have forgotten some previous situation where it had appeared as
                  >
                  Hello World
                  >
                  '; ?>
                  >
                  on the browser.
                  >
                  E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f file has the lines:
                  LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
                  AddType application/x-httpd-php .php
                  AddType application/x-httpd-php .php3
                  >
                  My Computer
                  manage
                  Services and Applications
                  Services
                  shows that Apache is running
                  >
                  wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
                  system, and
                  >
                  wampmysqld, started, manual, local system, and
                  >
                  I restarted all services from the wamp systray icon. That gave the
                  following entries in apache_error.lo g
                  >
                  [Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
                  --
                  Shutting down the server.
                  [Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
                  Child process is ending.
                  [Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
                  mutex
                  [Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
                  have
                  exited.
                  [Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
                  exiting
                  [Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
                  successfully.
                  [Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
                  configured -- resuming normal operations
                  [Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
                  [Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
                  [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
                  running
                  [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
                  mutex.
                  [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
                  threads.
                  >
                  so, that means apache is running.
                  >
                  I gave, check port 80. The dos window that opened said "your port 80
                  is
                  not used" and the following entry got added in error_log:
                  >
                  [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
                  listen on port 80.
                  >
                  The file E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f has
                  >
                  # DocumentRoot: The directory out of which you will serve your
                  # documents. By default, all requests are taken from this directory,
                  but
                  # symbolic links and aliases may be used to point to other locations.
                  #
                  DocumentRoot "e:/wamp/www/"
                  >
                  What is stopping it?
                  >
                  Thanks.
                  --
                  V
                  >
                  This looks good, but I suspect you have a syntax error somewhere.

                  In your php.ini file, ensure you have the following:

                  display_errors = on
                  error_reporting = E_ALL

                  I suspect once you turn these on, you'll find a syntax error.

                  --
                  =============== ===
                  Remove the "x" from my email address
                  Jerry Stuckle
                  JDS Computer Training Corp.
                  jstucklex@attgl obal.net
                  =============== ===

                  Comment

                  • Twayne

                    #10
                    Re: Newbie problem: PHP script not running in browser

                    (bringing the discussion here for php.general)
                    >
                    I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
                    5.0.51b. http://localhost/ is E:\wamp\www\
                    >
                    I have put the first php script to hello.php file:
                    >
                    <html>
                    <head>
                    <title>PHP Test</title>
                    </head>
                    <body>
                    <?php echo '<p>Hello World</p>'; ?>
                    </body>
                    </html>
                    >
                    Putting the above file to E:\wamp\www\php _ex but giving
                    http://localhost/php_ex/hello.php shows a blank screen
                    >
                    I have forgotten some previous situation where it had appeared as
                    >
                    Hello World
                    >
                    '; ?>
                    >
                    on the browser.
                    >
                    E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f file has the lines:
                    LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
                    AddType application/x-httpd-php .php
                    AddType application/x-httpd-php .php3
                    >
                    My Computer
                    manage
                    Services and Applications
                    Services
                    shows that Apache is running
                    >
                    wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
                    system, and
                    >
                    wampmysqld, started, manual, local system, and
                    >
                    I restarted all services from the wamp systray icon. That gave the
                    following entries in apache_error.lo g
                    >
                    [Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
                    --
                    Shutting down the server.
                    [Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
                    Child process is ending.
                    [Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
                    mutex
                    [Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
                    have
                    exited.
                    [Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
                    exiting
                    [Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
                    successfully.
                    [Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
                    configured -- resuming normal operations
                    [Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
                    [Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
                    [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
                    running
                    [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
                    mutex.
                    [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
                    threads.
                    >
                    so, that means apache is running.
                    >
                    I gave, check port 80. The dos window that opened said "your port 80
                    is
                    not used" and the following entry got added in error_log:
                    >
                    [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
                    listen on port 80.
                    >
                    The file E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f has
                    >
                    # DocumentRoot: The directory out of which you will serve your
                    # documents. By default, all requests are taken from this directory,
                    but
                    # symbolic links and aliases may be used to point to other locations.
                    #
                    DocumentRoot "e:/wamp/www/"
                    >
                    What is stopping it?
                    >
                    Thanks.
                    If you're certain it's located in the right directory to be served:

                    I had a similar problem once when I copy/pasted a php line: The quotes
                    were unicode or something; deleted/replaced the quotes and it worked.

                    Just a beginner here, so; that's all I have<g>

                    Regards,


                    Comment

                    • V S Rawat

                      #11
                      Re: Newbie problem: PHP script not running in browser

                      On Aug 7, 5:58 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                      V S Rawat wrote:
                      (bringing the discussion here for php.general)
                      >
                      I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
                      5.0.51b.http://localhost/is E:\wamp\www\
                      >
                      I have put the first php script to hello.php file:
                      >
                      <html>
                          <head>
                           <title>PHP Test</title>
                          </head>
                          <body>
                          <?php echo '<p>Hello World</p>'; ?>
                          </body>
                      </html>
                      >
                      Putting the above file to E:\wamp\www\php _ex but giving
                      http://localhost/php_ex/hello.phpshows a blank screen
                      >
                      I have forgotten some previous situation where it had appeared as
                      >
                      Hello World
                      >
                      '; ?>
                      >
                      on the browser.
                      >
                      E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f file has the lines:
                      LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
                      AddType application/x-httpd-php .php
                      AddType application/x-httpd-php .php3
                      >
                      My Computer
                      manage
                      Services and Applications
                      Services
                      shows that Apache is running
                      >
                      wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
                      system, and
                      >
                      wampmysqld, started, manual, local system, and
                      >
                      I restarted all services from the wamp systray icon. That gave the
                      following entries in apache_error.lo g
                      >
                      [Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
                      --
                      Shutting down the server.
                      [Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
                      Child process is ending.
                      [Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
                      mutex
                      [Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
                      have
                      exited.
                      [Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
                      exiting
                      [Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
                      successfully.
                      [Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
                      configured -- resuming normal operations
                      [Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
                      [Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
                      [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
                      running
                      [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
                      mutex.
                      [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
                      threads.
                      >
                      so, that means apache is running.
                      >
                      I gave, check port 80. The dos window that opened said "your port 80
                      is
                      not used" and the following entry got added in error_log:
                      >
                      [Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
                      listen on port 80.
                      >
                      The file E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f has
                      >
                      # DocumentRoot: The directory out of which you will serve your
                      # documents. By default, all requests are taken from this directory,
                      but
                      # symbolic links and aliases may be used to point to other locations.
                      #
                      DocumentRoot "e:/wamp/www/"
                      >
                      What is stopping it?
                      >
                      Thanks.
                      --
                      V
                      >
                      This looks good, but I suspect you have a syntax error somewhere.
                      >
                      In your php.ini file, ensure you have the following:
                      >
                      display_errors = on
                      error_reporting = E_ALL
                      >
                      I suspect once you turn these on, you'll find a syntax error.
                      >
                      That is leading somewhere.

                      display_errors was off so I switched that on

                      error_reporting was E_ALL & ~E_NOTICE & ~E_STRICT, so I made that
                      E_ALL

                      and switched on a few more error reportings that I could make out in
                      the nearby lines.

                      no luck, the screen is still blank.

                      but, php error log has following lines now that were not there
                      previously.

                      --start
                      [08-Aug-2008 04:10:11] PHP Notice: Undefined variable: mywampfp in E:
                      \wamp\scripts\r efresh.php on line 257
                      [08-Aug-2008 04:10:11] PHP Notice: Undefined variable: i in E:\wamp
                      \scripts\refres h.php on line 257
                      [08-Aug-2008 04:10:11] PHP Notice: Undefined variable: mywampini in E:
                      \wamp\scripts\r efresh.php on line 257
                      [08-Aug-2008 04:10:11] PHP Notice: Undefined offset: 1 in E:\wamp
                      \scripts\refres h.php on line 390
                      [08-Aug-2008 04:10:11] PHP Notice: Undefined offset: 1 in E:\wamp
                      \scripts\refres h.php on line 390
                      --end

                      the area around line 257 in that file is:
                      --start
                      $phpConfText = ";WAMPPHP_PARAM SSTART
                      ";
                      fwrite($mywampf p,$mywampini[$i]);
                      foreach ($params_for_wa mpini as $paramname=>$pa ramstatus)
                      {
                      if ($params_for_wa mpini[$paramname] == 1)
                      $phpConfText .= 'Type: item; Caption: "'.$paramname.' "; Glyph:
                      13; Action: multi; Actions: '.$phpParams[$paramname].'
                      ';
                      else
                      $phpConfText .= 'Type: item; Caption: "'.$paramname.' ";
                      Action: multi; Actions: '.$phpParams[$paramname].'
                      ';
                      --end

                      that fwrite() one is the line 257

                      and 390 is
                      --start
                      $mypattern = ';WAMPADDALIAS' ;
                      $newalias_dir = str_replace('.c onf','',$one_al ias);


                      $alias_contents = @file_get_conte nts ($aliasDir.$one _alias);
                      preg_match('|^A lias /'.$newalias_dir .'/ "(.+)"|',$alias _contents,
                      $match);
                      $newalias_dest = $match[1];

                      $myreplace .= 'Type: submenu; Caption: "http://localhost/'.
                      $newalias_dir.'/"; SubMenu: alias_'.str_rep lace(' ','_',
                      $newalias_dir). '; Glyph: 3
                      ';
                      --end

                      that match[1] is line 390.

                      So, I hope that this all that is greek and latin to me is telling
                      something sensibly to you folks.


                      I swear that I haven't touched this file. I hadn't opened it, not even
                      knew about it. it is "as supplied" by install.
                      --
                      V

                      Comment

                      • Jerry Stuckle

                        #12
                        Re: Newbie problem: PHP script not running in browser

                        V S Rawat wrote:
                        On Aug 7, 5:58 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                        >V S Rawat wrote:
                        >>(bringing the discussion here for php.general)
                        >>I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
                        >>5.0.51b.http://localhost/is E:\wamp\www\
                        >>I have put the first php script to hello.php file:
                        >><html>
                        >> <head>
                        >> <title>PHP Test</title>
                        >> </head>
                        >> <body>
                        >> <?php echo '<p>Hello World</p>'; ?>
                        >> </body>
                        >></html>
                        >>Putting the above file to E:\wamp\www\php _ex but giving
                        >>http://localhost/php_ex/hello.phpshows a blank screen
                        >>I have forgotten some previous situation where it had appeared as
                        >>Hello World
                        >>'; ?>
                        >>on the browser.
                        >>E:\wamp\bin\a pache\apache2.2 .8\conf\httpd.c onf file has the lines:
                        >>LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
                        >>AddType application/x-httpd-php .php
                        >>AddType application/x-httpd-php .php3
                        >>My Computer
                        >>manage
                        >>Services and Applications
                        >>Services
                        >>shows that Apache is running
                        >>wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
                        >>system, and
                        >>wampmysqld, started, manual, local system, and
                        >>I restarted all services from the wamp systray icon. That gave the
                        >>following entries in apache_error.lo g
                        >>[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
                        >>--
                        >>Shutting down the server.
                        >>[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
                        >>Child process is ending.
                        >>[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
                        >>mutex
                        >>[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
                        >>have
                        >>exited.
                        >>[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
                        >>exiting
                        >>[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
                        >>successfull y.
                        >>[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
                        >>configured -- resuming normal operations
                        >>[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
                        >>[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
                        >>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
                        >>running
                        >>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
                        >>mutex.
                        >>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
                        >>threads.
                        >>so, that means apache is running.
                        >>I gave, check port 80. The dos window that opened said "your port 80
                        >>is
                        >>not used" and the following entry got added in error_log:
                        >>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
                        >>listen on port 80.
                        >>The file E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f has
                        >># DocumentRoot: The directory out of which you will serve your
                        >># documents. By default, all requests are taken from this directory,
                        >>but
                        >># symbolic links and aliases may be used to point to other locations.
                        >>#
                        >>DocumentRoo t "e:/wamp/www/"
                        >>What is stopping it?
                        >>Thanks.
                        >>--
                        >>V
                        >This looks good, but I suspect you have a syntax error somewhere.
                        >>
                        >In your php.ini file, ensure you have the following:
                        >>
                        >display_erro rs = on
                        >error_reportin g = E_ALL
                        >>
                        >I suspect once you turn these on, you'll find a syntax error.
                        >>
                        >
                        That is leading somewhere.
                        >
                        display_errors was off so I switched that on
                        >
                        error_reporting was E_ALL & ~E_NOTICE & ~E_STRICT, so I made that
                        E_ALL
                        >
                        and switched on a few more error reportings that I could make out in
                        the nearby lines.
                        >
                        no luck, the screen is still blank.
                        >
                        but, php error log has following lines now that were not there
                        previously.
                        >
                        --start
                        [08-Aug-2008 04:10:11] PHP Notice: Undefined variable: mywampfp in E:
                        \wamp\scripts\r efresh.php on line 257
                        [08-Aug-2008 04:10:11] PHP Notice: Undefined variable: i in E:\wamp
                        \scripts\refres h.php on line 257
                        [08-Aug-2008 04:10:11] PHP Notice: Undefined variable: mywampini in E:
                        \wamp\scripts\r efresh.php on line 257
                        [08-Aug-2008 04:10:11] PHP Notice: Undefined offset: 1 in E:\wamp
                        \scripts\refres h.php on line 390
                        [08-Aug-2008 04:10:11] PHP Notice: Undefined offset: 1 in E:\wamp
                        \scripts\refres h.php on line 390
                        --end
                        >
                        the area around line 257 in that file is:
                        --start
                        $phpConfText = ";WAMPPHP_PARAM SSTART
                        ";
                        fwrite($mywampf p,$mywampini[$i]);
                        foreach ($params_for_wa mpini as $paramname=>$pa ramstatus)
                        {
                        if ($params_for_wa mpini[$paramname] == 1)
                        $phpConfText .= 'Type: item; Caption: "'.$paramname.' "; Glyph:
                        13; Action: multi; Actions: '.$phpParams[$paramname].'
                        ';
                        else
                        $phpConfText .= 'Type: item; Caption: "'.$paramname.' ";
                        Action: multi; Actions: '.$phpParams[$paramname].'
                        ';
                        --end
                        >
                        that fwrite() one is the line 257
                        >
                        and 390 is
                        --start
                        $mypattern = ';WAMPADDALIAS' ;
                        $newalias_dir = str_replace('.c onf','',$one_al ias);
                        >
                        >
                        $alias_contents = @file_get_conte nts ($aliasDir.$one _alias);
                        preg_match('|^A lias /'.$newalias_dir .'/ "(.+)"|',$alias _contents,
                        $match);
                        $newalias_dest = $match[1];
                        >
                        $myreplace .= 'Type: submenu; Caption: "http://localhost/'.
                        $newalias_dir.'/"; SubMenu: alias_'.str_rep lace(' ','_',
                        $newalias_dir). '; Glyph: 3
                        ';
                        --end
                        >
                        that match[1] is line 390.
                        >
                        So, I hope that this all that is greek and latin to me is telling
                        something sensibly to you folks.
                        >
                        >
                        I swear that I haven't touched this file. I hadn't opened it, not even
                        knew about it. it is "as supplied" by install.
                        --
                        V
                        >
                        The only ones pertinent to displaying your errors are display_errors and
                        error_reporting .

                        And I'm not familiar with this file, but it looks like it's completely
                        unrelated to your problem.

                        Can you copy/paste your EXACT code into a message - the entire page?
                        that might help us figger out the problem.

                        --
                        =============== ===
                        Remove the "x" from my email address
                        Jerry Stuckle
                        JDS Computer Training Corp.
                        jstucklex@attgl obal.net
                        =============== ===

                        Comment

                        • V S Rawat

                          #13
                          Re: Newbie problem: PHP script not running in browser

                          On Aug 8, 5:11 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                          V S Rawat wrote:
                          On Aug 7, 5:58 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                          V S Rawat wrote:
                          >(bringing the discussion here for php.general)
                          >I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
                          >5.0.51b.http://localhost/isE:\wamp\www\
                          >I have put the first php script to hello.php file:
                          ><html>
                          >    <head>
                          >     <title>PHP Test</title>
                          >    </head>
                          >    <body>
                          >    <?php echo '<p>Hello World</p>'; ?>
                          >    </body>
                          ></html>
                          >Putting the above file to E:\wamp\www\php _ex but giving
                          >>http://localhost/php_ex/hello.phpshowsa blank screen
                          >I have forgotten some previous situation where it had appeared as
                          >Hello World
                          >'; ?>
                          >on the browser.
                          >E:\wamp\bin\ap ache\apache2.2. 8\conf\httpd.co nf file has the lines:
                          >LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
                          >AddType application/x-httpd-php .php
                          >AddType application/x-httpd-php .php3
                          >My Computer
                          >manage
                          >Services and Applications
                          >Services
                          >shows that Apache is running
                          >wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
                          >system, and
                          >wampmysqld, started, manual, local system, and
                          >I restarted all services from the wamp systray icon. That gave the
                          >following entries in apache_error.lo g
                          >[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
                          >--
                          >Shutting down the server.
                          >[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
                          >Child process is ending.
                          >[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
                          >mutex
                          >[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
                          >have
                          >exited.
                          >[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
                          >exiting
                          >[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
                          >successfully .
                          >[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
                          >configured -- resuming normal operations
                          >[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
                          >[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
                          >[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
                          >running
                          >[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
                          >mutex.
                          >[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
                          >threads.
                          >so, that means apache is running.
                          >I gave, check port 80. The dos window that opened said "your port 80
                          >is
                          >not used" and the following entry got added in error_log:
                          >[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
                          >listen on port 80.
                          >The file E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f has
                          ># DocumentRoot: The directory out of which you will serve your
                          ># documents. By default, all requests are taken from this directory,
                          >but
                          ># symbolic links and aliases may be used to point to other locations.
                          >#
                          >DocumentRoot "e:/wamp/www/"
                          >What is stopping it?
                          >Thanks.
                          >--
                          >V
                          This looks good, but I suspect you have a syntax error somewhere.
                          >
                          In your php.ini file, ensure you have the following:
                          >
                          display_errors = on
                          error_reporting = E_ALL
                          >
                          I suspect once you turn these on, you'll find a syntax error.
                          >
                          That is leading somewhere.
                          >
                          display_errors was off so I switched that on
                          >
                          error_reporting was E_ALL & ~E_NOTICE & ~E_STRICT, so I made that
                          E_ALL
                          >
                          and switched on a few more error reportings that I could make out in
                          the nearby lines.
                          >
                          no luck, the screen is still blank.
                          >
                          but, php error log has following lines now that were not there
                          previously.
                          >
                          --start
                          [08-Aug-2008 04:10:11] PHP Notice:  Undefined variable: mywampfp in E:
                          \wamp\scripts\r efresh.php on line 257
                          [08-Aug-2008 04:10:11] PHP Notice:  Undefined variable: i in E:\wamp
                          \scripts\refres h.php on line 257
                          [08-Aug-2008 04:10:11] PHP Notice:  Undefined variable: mywampini in E:
                          \wamp\scripts\r efresh.php on line 257
                          [08-Aug-2008 04:10:11] PHP Notice:  Undefined offset:  1 in E:\wamp
                          \scripts\refres h.php on line 390
                          [08-Aug-2008 04:10:11] PHP Notice:  Undefined offset:  1 in E:\wamp
                          \scripts\refres h.php on line 390
                          --end
                          >
                          the area around line 257 in that file is:
                          --start
                          $phpConfText = ";WAMPPHP_PARAM SSTART
                          ";
                          fwrite($mywampf p,$mywampini[$i]);
                          foreach ($params_for_wa mpini as $paramname=>$pa ramstatus)
                          {
                              if ($params_for_wa mpini[$paramname] == 1)
                                  $phpConfText .= 'Type: item; Caption: "'.$paramname.' "; Glyph:
                          13; Action: multi; Actions: '.$phpParams[$paramname].'
                          ';
                              else
                                  $phpConfText .= 'Type: item; Caption: "'.$paramname.' ";
                          Action: multi; Actions: '.$phpParams[$paramname].'
                          ';
                          --end
                          >
                          that fwrite() one is the line 257
                          >
                          and 390 is
                          --start
                              $mypattern = ';WAMPADDALIAS' ;
                              $newalias_dir = str_replace('.c onf','',$one_al ias);
                          >
                              $alias_contents = @file_get_conte nts ($aliasDir.$one _alias);
                              preg_match('|^A lias /'.$newalias_dir .'/ "(.+)"|',$alias _contents,
                          $match);
                              $newalias_dest = $match[1];
                          >
                              $myreplace .= 'Type: submenu; Caption: "http://localhost/'.
                          $newalias_dir.'/"; SubMenu: alias_'.str_rep lace(' ','_',
                          $newalias_dir). '; Glyph: 3
                          ';
                          --end
                          >
                          that match[1] is line 390.
                          >
                          So, I hope that this all that is greek and latin to me is telling
                          something sensibly to you folks.
                          >
                          I swear that I haven't touched this file. I hadn't opened it, not even
                          knew about it. it is "as supplied" by install.
                          --
                          V
                          >
                          The only ones pertinent to displaying your errors are display_errors and
                          error_reporting .
                          >
                          And I'm not familiar with this file, but it looks like it's completely
                          unrelated to your problem.
                          hmm. in that case, i have yet to face the consequences of the above
                          errors.
                          >
                          Can you copy/paste your EXACT code into a message - the entire page?
                          that might help us figger out the problem.
                          here it is:

                          <html>
                          <head>
                          <title>PHP Test</title>
                          </head>
                          <body>
                          <?php echo 'Hello World'; ?>
                          </body>
                          </html>

                          >
                          --
                          =============== ===
                          Remove the "x" from my email address
                          Jerry Stuckle
                          JDS Computer Training Corp.
                          jstuck...@attgl obal.net
                          =============== ===
                          --
                          V

                          Comment

                          • Jerry Stuckle

                            #14
                            Re: Newbie problem: PHP script not running in browser

                            V S Rawat wrote:
                            On Aug 8, 5:11 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                            >V S Rawat wrote:
                            >>On Aug 7, 5:58 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                            >>>V S Rawat wrote:
                            >>>>(bringing the discussion here for php.general)
                            >>>>I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
                            >>>>5.0.51b.http://localhost/isE:\wamp\www\
                            >>>>I have put the first php script to hello.php file:
                            >>>><html>
                            >>>> <head>
                            >>>> <title>PHP Test</title>
                            >>>> </head>
                            >>>> <body>
                            >>>> <?php echo '<p>Hello World</p>'; ?>
                            >>>> </body>
                            >>>></html>
                            >>>>Putting the above file to E:\wamp\www\php _ex but giving
                            >>>>http://localhost/php_ex/hello.phpshowsa blank screen
                            >>>>I have forgotten some previous situation where it had appeared as
                            >>>>Hello World
                            >>>>'; ?>
                            >>>>on the browser.
                            >>>>E:\wamp\bin \apache\apache2 .2.8\conf\httpd .conf file has the lines:
                            >>>>LoadModul e php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
                            >>>>AddType application/x-httpd-php .php
                            >>>>AddType application/x-httpd-php .php3
                            >>>>My Computer
                            >>>>manage
                            >>>>Services and Applications
                            >>>>Services
                            >>>>shows that Apache is running
                            >>>>wampapach e, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
                            >>>>system, and
                            >>>>wampmysql d, started, manual, local system, and
                            >>>>I restarted all services from the wamp systray icon. That gave the
                            >>>>following entries in apache_error.lo g
                            >>>>[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
                            >>>>--
                            >>>>Shutting down the server.
                            >>>>[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
                            >>>>Child process is ending.
                            >>>>[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
                            >>>>mutex
                            >>>>[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
                            >>>>have
                            >>>>exited.
                            >>>>[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
                            >>>>exiting
                            >>>>[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
                            >>>>successfull y.
                            >>>>[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
                            >>>>configure d -- resuming normal operations
                            >>>>[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
                            >>>>[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
                            >>>>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
                            >>>>running
                            >>>>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
                            >>>>mutex.
                            >>>>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
                            >>>>threads.
                            >>>>so, that means apache is running.
                            >>>>I gave, check port 80. The dos window that opened said "your port 80
                            >>>>is
                            >>>>not used" and the following entry got added in error_log:
                            >>>>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
                            >>>>listen on port 80.
                            >>>>The file E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f has
                            >>>># DocumentRoot: The directory out of which you will serve your
                            >>>># documents. By default, all requests are taken from this directory,
                            >>>>but
                            >>>># symbolic links and aliases may be used to point to other locations.
                            >>>>#
                            >>>>DocumentRoo t "e:/wamp/www/"
                            >>>>What is stopping it?
                            >>>>Thanks.
                            >>>>--
                            >>>>V
                            >>>This looks good, but I suspect you have a syntax error somewhere.
                            >>>In your php.ini file, ensure you have the following:
                            >>>display_erro rs = on
                            >>>error_report ing = E_ALL
                            >>>I suspect once you turn these on, you'll find a syntax error.
                            >>That is leading somewhere.
                            >>display_error s was off so I switched that on
                            >>error_reporti ng was E_ALL & ~E_NOTICE & ~E_STRICT, so I made that
                            >>E_ALL
                            >>and switched on a few more error reportings that I could make out in
                            >>the nearby lines.
                            >>no luck, the screen is still blank.
                            >>but, php error log has following lines now that were not there
                            >>previously.
                            >>--start
                            >>[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: mywampfp in E:
                            >>\wamp\scripts \refresh.php on line 257
                            >>[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: i in E:\wamp
                            >>\scripts\refr esh.php on line 257
                            >>[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: mywampini in E:
                            >>\wamp\scripts \refresh.php on line 257
                            >>[08-Aug-2008 04:10:11] PHP Notice: Undefined offset: 1 in E:\wamp
                            >>\scripts\refr esh.php on line 390
                            >>[08-Aug-2008 04:10:11] PHP Notice: Undefined offset: 1 in E:\wamp
                            >>\scripts\refr esh.php on line 390
                            >>--end
                            >>the area around line 257 in that file is:
                            >>--start
                            >>$phpConfTex t = ";WAMPPHP_PARAM SSTART
                            >>";
                            >>fwrite($mywam pfp,$mywampini[$i]);
                            >>foreach ($params_for_wa mpini as $paramname=>$pa ramstatus)
                            >>{
                            >> if ($params_for_wa mpini[$paramname] == 1)
                            >> $phpConfText .= 'Type: item; Caption: "'.$paramname.' "; Glyph:
                            >>13; Action: multi; Actions: '.$phpParams[$paramname].'
                            >>';
                            >> else
                            >> $phpConfText .= 'Type: item; Caption: "'.$paramname.' ";
                            >>Action: multi; Actions: '.$phpParams[$paramname].'
                            >>';
                            >>--end
                            >>that fwrite() one is the line 257
                            >>and 390 is
                            >>--start
                            >> $mypattern = ';WAMPADDALIAS' ;
                            >> $newalias_dir = str_replace('.c onf','',$one_al ias);
                            >> $alias_contents = @file_get_conte nts ($aliasDir.$one _alias);
                            >> preg_match('|^A lias /'.$newalias_dir .'/ "(.+)"|',$alias _contents,
                            >>$match);
                            >> $newalias_dest = $match[1];
                            >> $myreplace .= 'Type: submenu; Caption: "http://localhost/'.
                            >>$newalias_dir .'/"; SubMenu: alias_'.str_rep lace(' ','_',
                            >>$newalias_dir ).'; Glyph: 3
                            >>';
                            >>--end
                            >>that match[1] is line 390.
                            >>So, I hope that this all that is greek and latin to me is telling
                            >>something sensibly to you folks.
                            >>I swear that I haven't touched this file. I hadn't opened it, not even
                            >>knew about it. it is "as supplied" by install.
                            >>--
                            >>V
                            >The only ones pertinent to displaying your errors are display_errors and
                            >error_reportin g.
                            >>
                            >And I'm not familiar with this file, but it looks like it's completely
                            >unrelated to your problem.
                            >
                            hmm. in that case, i have yet to face the consequences of the above
                            errors.
                            >
                            >Can you copy/paste your EXACT code into a message - the entire page?
                            >that might help us figger out the problem.
                            >
                            here it is:
                            >
                            <html>
                            <head>
                            <title>PHP Test</title>
                            </head>
                            <body>
                            <?php echo 'Hello World'; ?>
                            </body>
                            </html>
                            >
                            OK, what do you see if you view the document source?

                            Do you get PHP Test in your title bar? And this is in a file with a
                            ..php extension, correct?

                            --
                            =============== ===
                            Remove the "x" from my email address
                            Jerry Stuckle
                            JDS Computer Training Corp.
                            jstucklex@attgl obal.net
                            =============== ===

                            Comment

                            • V S Rawat

                              #15
                              Re: Newbie problem: PHP script not running in browser

                              On Aug 9, 5:19 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                              V S Rawat wrote:
                              On Aug 8, 5:11 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                              V S Rawat wrote:
                              >On Aug 7, 5:58 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                              >>V S Rawat wrote:
                              >>>(bringing the discussion here for php.general)
                              >>>I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
                              >>>5.0.51b.http://localhost/isE:\wamp\www\
                              >>>I have put the first php script to hello.php file:
                              >>><html>
                              >>>    <head>
                              >>>     <title>PHP Test</title>
                              >>>    </head>
                              >>>    <body>
                              >>>    <?php echo '<p>Hello World</p>'; ?>
                              >>>    </body>
                              >>></html>
                              >>>Putting the above file to E:\wamp\www\php _ex but giving
                              >>>>http://localhost/php_ex/hello.phpshowsablank screen
                              >>>I have forgotten some previous situation where it had appeared as
                              >>>Hello World
                              >>>'; ?>
                              >>>on the browser.
                              >>>E:\wamp\bin\ apache\apache2. 2.8\conf\httpd. conf file has the lines:
                              >>>LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
                              >>>AddType application/x-httpd-php .php
                              >>>AddType application/x-httpd-php .php3
                              >>>My Computer
                              >>>manage
                              >>>Services and Applications
                              >>>Services
                              >>>shows that Apache is running
                              >>>wampapache , Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
                              >>>system, and
                              >>>wampmysqld , started, manual, local system, and
                              >>>I restarted all services from the wamp systray icon. That gave the
                              >>>following entries in apache_error.lo g
                              >>>[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
                              >>>--
                              >>>Shutting down the server.
                              >>>[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled..
                              >>>Child process is ending.
                              >>>[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
                              >>>mutex
                              >>>[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
                              >>>have
                              >>>exited.
                              >>>[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
                              >>>exiting
                              >>>[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
                              >>>successfully .
                              >>>[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
                              >>>configured -- resuming normal operations
                              >>>[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
                              >>>[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
                              >>>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
                              >>>running
                              >>>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
                              >>>mutex.
                              >>>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
                              >>>threads.
                              >>>so, that means apache is running.
                              >>>I gave, check port 80. The dos window that opened said "your port 80
                              >>>is
                              >>>not used" and the following entry got added in error_log:
                              >>>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
                              >>>listen on port 80.
                              >>>The file E:\wamp\bin\apa che\apache2.2.8 \conf\httpd.con f has
                              >>># DocumentRoot: The directory out of which you will serve your
                              >>># documents. By default, all requests are taken from this directory,
                              >>>but
                              >>># symbolic links and aliases may be used to point to other locations.
                              >>>#
                              >>>DocumentRo ot "e:/wamp/www/"
                              >>>What is stopping it?
                              >>>Thanks.
                              >>>--
                              >>>V
                              >>This looks good, but I suspect you have a syntax error somewhere.
                              >>In your php.ini file, ensure you have the following:
                              >>display_error s = on
                              >>error_reporti ng = E_ALL
                              >>I suspect once you turn these on, you'll find a syntax error.
                              >That is leading somewhere.
                              >display_erro rs was off so I switched that on
                              >error_reportin g was E_ALL & ~E_NOTICE & ~E_STRICT, so I made that
                              >E_ALL
                              >and switched on a few more error reportings that I could make out in
                              >the nearby lines.
                              >no luck, the screen is still blank.
                              >but, php error log has following lines now that were not there
                              >previously.
                              >--start
                              >[08-Aug-2008 04:10:11] PHP Notice:  Undefined variable: mywampfp inE:
                              >\wamp\scripts\ refresh.php on line 257
                              >[08-Aug-2008 04:10:11] PHP Notice:  Undefined variable: i in E:\wamp
                              >\scripts\refre sh.php on line 257
                              >[08-Aug-2008 04:10:11] PHP Notice:  Undefined variable: mywampini in E:
                              >\wamp\scripts\ refresh.php on line 257
                              >[08-Aug-2008 04:10:11] PHP Notice:  Undefined offset:  1 in E:\wamp
                              >\scripts\refre sh.php on line 390
                              >[08-Aug-2008 04:10:11] PHP Notice:  Undefined offset:  1 in E:\wamp
                              >\scripts\refre sh.php on line 390
                              >--end
                              >the area around line 257 in that file is:
                              >--start
                              >$phpConfText = ";WAMPPHP_PARAM SSTART
                              >";
                              >fwrite($mywamp fp,$mywampini[$i]);
                              >foreach ($params_for_wa mpini as $paramname=>$pa ramstatus)
                              >{
                              >    if ($params_for_wa mpini[$paramname] == 1)
                              >        $phpConfText .= 'Type: item; Caption: "'.$paramname.. '"; Glyph:
                              >13; Action: multi; Actions: '.$phpParams[$paramname].'
                              >';
                              >    else
                              >        $phpConfText .= 'Type: item; Caption: "'.$paramname.. '";
                              >Action: multi; Actions: '.$phpParams[$paramname].'
                              >';
                              >--end
                              >that fwrite() one is the line 257
                              >and 390 is
                              >--start
                              >    $mypattern = ';WAMPADDALIAS' ;
                              >    $newalias_dir = str_replace('.c onf','',$one_al ias);
                              >    $alias_contents = @file_get_conte nts ($aliasDir.$one _alias);
                              >    preg_match('|^A lias /'.$newalias_dir .'/ "(.+)"|',$alias _contents,
                              >$match);
                              >    $newalias_dest = $match[1];
                              >    $myreplace .= 'Type: submenu; Caption: "http://localhost/'.
                              >$newalias_dir. '/"; SubMenu: alias_'.str_rep lace(' ','_',
                              >$newalias_dir) .'; Glyph: 3
                              >';
                              >--end
                              >that match[1] is line 390.
                              >So, I hope that this all that is greek and latin to me is telling
                              >something sensibly to you folks.
                              >I swear that I haven't touched this file. I hadn't opened it, not even
                              >knew about it. it is "as supplied" by install.
                              >--
                              >V
                              The only ones pertinent to displaying your errors are display_errors and
                              error_reporting .
                              >
                              And I'm not familiar with this file, but it looks like it's completely
                              unrelated to your problem.
                              >
                              hmm. in that case, i have yet to face the consequences of the above
                              errors.
                              >
                              Can you copy/paste your EXACT code into a message - the entire page?
                              that might help us figger out the problem.
                              >
                              here it is:
                              >
                              <html>
                               <head>
                                <title>PHP Test</title>
                               </head>
                               <body>
                               <?php echo 'Hello World'; ?>
                               </body>
                              </html>
                              >
                              OK, what do you see if you view the document source?
                              In the Page Source in ff3, I get:

                              <html>
                              <head>
                              <title>PHP Test</title>
                              </head>
                              <body>
                              <?php echo 'Hello World'; ?>
                              </body>
                              </html>
                              Do you get PHP Test in your title bar?
                              Yes.
                              And this is in a file with a .php extension, correct?
                              Yeah, it is hello.php.

                              --
                              V
                              Jerry Stuckle

                              Comment

                              Working...