QuickPHP web server

Sony / Vgn-n31m
March 9, 2009 at 04:49:33
Specs: Windows Vista, dual core/2 GB
I run this web server then run a test php program but this web page dose not display. When I run a htm program, IE will display the web page.

What else do I need to do beside starting this web server so I could test a php program? Many thanks.


See More: QuickPHP web server

Report •


#1
March 11, 2009 at 09:20:34
Hi, when you say that your PHP web page does not display, do you see a blank (all white) page or get a 'page not found' type of error? If you see a blank page, I would surmise that your PHP page is displaying but there is an error in the PHP code or it just doesn't have any code outside of hidden PHP code. Is all of your PHP code hidden on purpose? If so, you can test this by adding some HTML code with a test message outside of the PHP hidden code in the PHP page, then remove it for the final version. Else, if your PHP code is designed to display content (e.g. an input form), but you only see a blank page, then most likely there is an error in your PHP code. Run your debugger and check for common PHP coding errors such as unclosed brackets. If you are using a web development tool like Dreamweaver, you can preconfigure it to highlight in different colors when the code has issues. This comes in handy in PHP coding.

Report •

#2
March 12, 2009 at 06:10:11
Hi, Thanks. I am learning PHP because I like to use the email function in PHP to post a form. After I have started the QuickPHP when I double click a test.php program, I could see the cursor with a hour glass for a few seconds after that nothing happened no blank screen or anything. I don't believe there is an error in the test program because I copy/paste it from PHP5 for Dummies.
This is the code.
<html>
<head>
<title>PHP Test</title>
</head>
<body>

This is an HTML line
<?php
echo “This is a PHP line</p>”;
phpinfo();
?>
</body>
</html>


Report •

#3
March 12, 2009 at 20:57:57
I tried the thing along with your code. However, I tried this on my machine that has apache and php 5.2 installed, so I don't know if it's right or a fluke.

Using the default settings, I got the script to run on Mozilla, Opera, and IE with http:/ /127.0.0.1:5723/ as the url provided the script was located in c:\index.php.

You can try adding <?php error_reporting(E_ALL); ?> to the top of your script and see if it will catch anything.

Of course, apache was disabled when I tried this program. :P

HTH


Report •

Related Solutions

#4
March 13, 2009 at 06:29:16
Hi, Thanks. I don't have index.php in the c drive. Could this be the problem? What code should be in this index.php?

I don't understand what this means: http:/ /127.0.0.1:5723/ as the url provided the script was located in c:\index.php


Report •

#5
March 13, 2009 at 07:56:45
Hi, try this code instead:

<html>
<head>
<title>PHP Test</title>
</head>
<body>

<?php
echo “This is a PHP line</p>”;
phpinfo();
?>
</body>
</html>

Notice that I removed the "This is an HTML line" from your code. This looks like an unmarked code comment. If you have unmarked code comments, PHP will not work because it won't know what to do when it comes across that line of code.

Tip, when you test your code in a live environment in real-time:
- FTP the file to the public folder for your domain
- Make sure that you name the file with your code "phpinfo.php", not "phpinfo.html"
- After you have loaded it to your hosting server, you can check by going to your domain URL
"http://www.insertthedomainnameofyoursite.com/phpinfo.php"


Report •

#6
March 13, 2009 at 16:46:19
Hi, Thanks. I done what you had suggested but the result is the same, nothing displayed.

When I run the test.php in Frontpage Preview option, it display this on the screen.

This is an HTML line This is a PHP line

”; phpinfo(); ?>

Please advise if I need the index.php on c:\. If I need this file what script should be in it?


Report •

#7
March 13, 2009 at 21:52:41
According the "quick help" menu, the default configuration looks for a file named index.php located in c:\ I didn't have any luck trying other paths or filenames... perhaps the program needs a php.ini file to use other paths and/or filenames.

The url (127.0.0.1:5723) is what I had to type in my browser's address bar to get the served page. The program used a default port of 5723 and not 80, which is normally what a browser expects under the http protocol.

The code in your original topic is what I pasted into my index.php file, which ran fine.

If the above doesn't help or work and you have a firewall, then that may be blocking quickphp from serving pages. To see, turn off your firewall, stop and restart the server and then try again.

Good luck.


Report •

#8
March 14, 2009 at 10:55:20
Hi, Thanks very much for your help. I did what you had suggested by putting the code in index.php on my c drive. Start the Quickphp web server then type http://127.0.0.1:5723/index.php on the IE address line. Got this error - Parse error: syntax error, unexpected '>' in C:\index.php on line 8. Don't know why I got an error and you don't with the same code, but at least I know how to test the php program using IE now.

Report •

#9
March 15, 2009 at 06:59:58
Found out how to use other path and file names using QuickPHP. On the QuickPHP screen, set the root folder to a folder where all the php files are kept. Set the default document filename to any filename you like.
To run the default file - type http://127.0.0.1:5723/ in the address line.
To run other php file - type http://127.0.0.1:5723/filename.php

Tested this on XP professional (PC) and Vista (laptop).


Report •

#10
March 15, 2009 at 13:26:32
No problem... it's actually a handy program once it's iron out.

I seem to recall there being a syntax error when I first tried the code, but it was something easy to fix, so I didn't think much about it. It could have been some junk copied along with the code.

Good work. :)


Report •

#11
March 21, 2009 at 06:31:31
Hi, Tried to a test a email program but got this error:- Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set().
Do you know how to over come this? What do I need to set in php.ini so I could test the mail function using QuickPHP on my PC?

Report •

#12
March 21, 2009 at 14:47:23
You may need to install a mail server. I'm not that familiar with MS's native programs, but there *may* be an smtp server on the installation cd/dvd. Open your control panel, click on the add/remove software tab, and check the listings under "windows components" or whatever it's called in Vista. For example, I have one with Win2k named "SMTP service" under the IIS group.

You can download one here as well. The transport system file is the server if I recall correctly; it works fine locally with php's mail function - I'm not sure about quickphp though.

To get the sent mail, configure outlook or similar email client to work with whichever mail server you install.

HTH


Report •


Ask Question