i need help please

Alles, was PHP betrifft, kann hier besprochen werden.

i need help please

Postby biostar5 » 12. June 2012 10:36

i am a computer science student and i cant seem to figure out for the life of me why my php code is not executing i did everything right but the page just loads blank
i even tried it with html coding it still is not working the page just loads blank and i even specified font and everything
can someone please help me im so confused
and the code was super basic it was just to echo some words onto the browser using the echo command
biostar5
 
Posts: 1
Joined: 12. June 2012 10:32
XAMPP Version: 5.6.3
Operating System: Windows 7

Re: i need help please

Postby Altrea » 13. June 2012 18:27

Hi biostar5,

  • Please start new threads with a welcome line. It's a matter of politeness
  • Choose a self speaking headline for your thread. 99% of the threads here are requests for help
  • Tell us something about your environment:
    • Which OS do you use exactly? "Windows 7" can be everything between "Windows 7 Embedded Standard x86" and "Windows 7 Ultimate x64" which would make a huge difference
    • Which components/stack do you use, XAMPP or single components?
    • Any important configuration changes you made since installed? (double check if the error reporting is activated)
    • Are your components successfully running?
  • Give us a qualified error reporting:
    • What actions have you done to get this blank page?
      - How do you request/execute the script?
    • What reaction have you expected?
    • What action do you get instead?
      - What URL does your browser addressbar show?
      - What does the browser source view show?
      - What dows the Apache access.log and error.log show?
  • Tell us much more about your code
  • Simply tell us everything which can maybe be helpful

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6534
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Help needed to get PHP working on Apache server

Postby annaomono » 15. April 2013 20:36

Hello Geeks,

I need help with php on Apache 2.0 server.
I bought a book that teaches about Apache, php and MYSQL.

I have installed Apache 2.0 and it works and i installed php5 however am doing a little test script to output php basic information with the following code;
<?php phpinfo(); ?> (with the php tags in red.

But it displays the code on browser instead of the php information.

I access the page by going; localhost/phpinfo.php - stored onc/programfiles/apachegroup/apache5/htdocs

I have searched online for days no solution.

I am on Window XP, php5 (manual zip installation).

What could i have possible done wrong. Please help me am i also want to be a geek.

Here is what my access logs shows today;
127.0.0.1 - - [11/Apr/2013:15:01:57 -1000] "GET / HTTP/1.1" 200 1494
127.0.0.1 - - [11/Apr/2013:15:01:57 -1000] "GET /apache_pb.gif HTTP/1.1" 200 2326
127.0.0.1 - - [11/Apr/2013:16:43:11 -1000] "GET /phpinfo.php HTTP/1.1" 404 285
127.0.0.1 - - [11/Apr/2013:16:43:29 -1000] "GET /phpinfo HTTP/1.1" 404 281
127.0.0.1 - - [11/Apr/2013:16:48:38 -1000] "GET /xampp/htdocs HTTP/1.1" 404 286
127.0.0.1 - - [12/Apr/2013:18:12:13 -1000] "GET /phpinfo.php HTTP/1.1" 200 19
127.0.0.1 - - [12/Apr/2013:18:14:57 -1000] "GET /phpinfo.php HTTP/1.1" 200 19
127.0.0.1 - - [12/Apr/2013:18:18:44 -1000] "GET /first.php HTTP/1.1" 200 39
127.0.0.1 - - [12/Apr/2013:18:20:42 -1000] "GET /first.php HTTP/1.1" 200 38
127.0.0.1 - - [12/Apr/2013:18:42:22 -1000] "GET /phpinfo.php HTTP/1.1" 200 20
127.0.0.1 - - [12/Apr/2013:18:43:21 -1000] "GET /phpinfo.php HTTP/1.1" 200 52
127.0.0.1 - - [12/Apr/2013:18:45:28 -1000] "GET /phpinfo.php HTTP/1.1" 200 19
127.0.0.1 - - [12/Apr/2013:18:47:58 -1000] "GET /first.php HTTP/1.1" 200 27
127.0.0.1 - - [12/Apr/2013:18:49:30 -1000] "GET /first.php HTTP/1.1" 200 24
127.0.0.1 - - [12/Apr/2013:18:59:14 -1000] "GET /phpinfo.php HTTP/1.1" 404 285
127.0.0.1 - - [12/Apr/2013:19:04:55 -1000] "GET /first.php HTTP/1.1" 304 -
127.0.0.1 - - [12/Apr/2013:19:05:01 -1000] "GET /phpinfo.php HTTP/1.1" 200 19
127.0.0.1 - - [12/Apr/2013:19:12:47 -1000] "GET /info.php HTTP/1.1" 200 19
127.0.0.1 - - [12/Apr/2013:19:12:51 -1000] "GET /info.php HTTP/1.1" 304 -
127.0.0.1 - - [12/Apr/2013:19:13:24 -1000] "GET /info.php HTTP/1.1" 304 -
127.0.0.1 - - [12/Apr/2013:19:14:44 -1000] "GET /info.php HTTP/1.1" 200 19
127.0.0.1 - - [12/Apr/2013:19:16:17 -1000] "GET /info.php HTTP/1.1" 200 21
127.0.0.1 - - [12/Apr/2013:19:23:57 -1000] "GET /first.php HTTP/1.1" 200 24
127.0.0.1 - - [12/Apr/2013:19:26:17 -1000] "GET /first.php HTTP/1.1" 200 124
127.0.0.1 - - [12/Apr/2013:19:44:28 -1000] "GET /todas.php HTTP/1.1" 200 39
127.0.0.1 - - [12/Apr/2013:20:03:08 -1000] "GET /phpinfo.php HTTP/1.1" 304 -
127.0.0.1 - - [12/Apr/2013:20:03:18 -1000] "GET /first.php HTTP/1.1" 304 -
127.0.0.1 - - [12/Apr/2013:20:05:19 -1000] "GET /first.php HTTP/1.1" 304 -
127.0.0.1 - - [12/Apr/2013:20:06:30 -1000] "GET /phpinfo.php HTTP/1.1" 304 -
127.0.0.1 - - [12/Apr/2013:20:07:58 -1000] "GET /phpinfo.php HTTP/1.1" 304 -
127.0.0.1 - - [13/Apr/2013:08:57:33 -1000] "GET /first.php HTTP/1.1" 304 -
127.0.0.1 - - [13/Apr/2013:09:09:02 -1000] "GET /first.php HTTP/1.1" 304 -
127.0.0.1 - - [13/Apr/2013:09:09:09 -1000] "GET /phpinfo.php HTTP/1.1" 304 -
127.0.0.1 - - [13/Apr/2013:21:25:26 -1000] "GET /first.php HTTP/1.1" 304 -
127.0.0.1 - - [14/Apr/2013:12:21:38 -1000] "GET /first.php HTTP/1.1" 304 -
127.0.0.1 - - [14/Apr/2013:12:36:34 -1000] "GET /first.php HTTP/1.1" 304 -
127.0.0.1 - - [14/Apr/2013:12:36:50 -1000] "GET /phpinfo.php HTTP/1.1" 304

And my error log shows this;
The Apache2 service is restarting.
The Apache2 service has restarted.
Parent: Received restart signal -- Restarting the server.
[Sat Apr 13 21:25:22 2013] [notice] Child 1876: Exit event signaled. Child process is ending.
[Sat Apr 13 21:25:22 2013] [notice] Apache/2.0.64 (Win32) configured -- resuming normal operations
[Sat Apr 13 21:25:22 2013] [notice] Server built: Oct 18 2010 01:36:23
[Sat Apr 13 21:25:22 2013] [notice] Parent: Created child process 3644
[Sat Apr 13 21:25:22 2013] [notice] Child 3644: Child process is running
[Sat Apr 13 21:25:23 2013] [notice] Child 1876: Released the start mutex
[Sat Apr 13 21:25:23 2013] [notice] Child 3644: Acquired the start mutex.
[Sat Apr 13 21:25:23 2013] [notice] Child 3644: Starting 250 worker threads.
[Sat Apr 13 21:25:24 2013] [notice] Child 1876: All worker threads have exited.
[Sat Apr 13 21:25:24 2013] [notice] Child 1876: Child process is exiting
The Apache2 service is restarting.
The Apache2 service has restarted.
Parent: Received restart signal -- Restarting the server.
[Sat Apr 13 21:30:41 2013] [notice] Child 3644: Exit event signaled. Child process is ending.
[Sat Apr 13 21:30:41 2013] [notice] Apache/2.0.64 (Win32) configured -- resuming normal operations
[Sat Apr 13 21:30:41 2013] [notice] Server built: Oct 18 2010 01:36:23
[Sat Apr 13 21:30:41 2013] [notice] Parent: Created child process 1204
[Sat Apr 13 21:30:42 2013] [notice] Child 1204: Child process is running
[Sat Apr 13 21:30:42 2013] [notice] Child 3644: Released the start mutex
[Sat Apr 13 21:30:42 2013] [notice] Child 1204: Acquired the start mutex.
[Sat Apr 13 21:30:42 2013] [notice] Child 1204: Starting 250 worker threads.
[Sat Apr 13 21:30:43 2013] [notice] Child 3644: All worker threads have exited.
[Sat Apr 13 21:30:43 2013] [notice] Child 3644: Child process is exiting
The Apache2 service is restarting.
The Apache2 service has restarted.
Parent: Received restart signal -- Restarting the server.
[Sun Apr 14 12:36:26 2013] [notice] Child 1204: Exit event signaled. Child process is ending.
[Sun Apr 14 12:36:26 2013] [notice] Apache/2.0.64 (Win32) configured -- resuming normal operations
[Sun Apr 14 12:36:26 2013] [notice] Server built: Oct 18 2010 01:36:23
[Sun Apr 14 12:36:26 2013] [notice] Parent: Created child process 3856
[Sun Apr 14 12:36:27 2013] [notice] Child 3856: Child process is running
[Sun Apr 14 12:36:27 2013] [notice] Child 3856: Acquired the start mutex.
[Sun Apr 14 12:36:27 2013] [notice] Child 3856: Starting 250 worker threads.
[Sun Apr 14 12:36:27 2013] [notice] Child 1204: Released the start mutex
[Sun Apr 14 12:36:28 2013] [notice] Child 1204: All worker threads have exited.
[Sun Apr 14 12:36:28 2013] [notice] Child 1204: Child process is exiting

Thank you in advance for your help.
annaomono
 
Posts: 1
Joined: 15. April 2013 20:21
XAMPP Version: 1.8.2-3
Operating System: window xp

Re: Help needed to get PHP working on Apache server

Postby Nobbie » 24. April 2013 17:01

annaomono wrote:I am on Window XP, php5 (manual zip installation).


... and you did NOT read the "readme.txt" (or similar) in the PHP5 folder, which contains the necessary steps how to configure Apache (httpd.conf) in order to run PHP Scripts thru PHP5. The default Apache installation does not parse PHP scripts, you have to change httpd.conf (according to the readme).

Obviously you installed Apache/PHP5 (and MySQL?) manually, whereas you ask in the Xampp Forum - rather strange!? Why dont you simply install the Xampp Package, it comes preconfigured and Apache/PHP/MySQL are running "out of the box"? Even more, it looks as if you installed Xampp AND additional Apache AND additional PHP5 - what the hell are you doing??
Nobbie
 
Posts: 6573
Joined: 09. March 2008 13:04

Re: i need help please

Postby ionamartin123 » 09. June 2013 16:13

Hi biostar5, i'm new here and willing to start my journey helping you out :)

did you check with your components?
ionamartin123
 
Posts: 3
Joined: 03. June 2013 08:38
XAMPP Version: 1.8.3-3
Operating System: Win 7


Return to PHP

Who is online

Users browsing this forum: No registered users and 3 guests