Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP Don't Works On Apache

Status
Not open for further replies.

WebBoyo

MIS
Jul 23, 2005
13
YU
Hi, I have installed Apache 2.0.54 on Windows XP and it runs HTML codes. After nistaling PHP 4.4.o(without installer) and configuring it I have found out that Apache does not run PHP codes.I tryed many different codes, but it shows only blank page, although it is in source. Can enyone help me?
P.S.: I'm a new in php.
 
in a file named hello.php in your apache install's htdocs folder, save this:
Code:
<?php echo "hello world" ?>

browse to it via
if you do not see the words "hello world" in the browser, then you have not installed php correctly.

-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
i like your sleeves...they're real big
 
Does your webpage end with the .php extension (or have you configured php to interpret files with other extensions)? Have you restarted apache after installing php?
 
I have used instructions from "install" file (from php-4.4.0-Win32.zip), "Wrox - Beginning PHP, Apache, MySQL Web Development - 2004 - (By Laxxuss)" ("Install PHP" and "Installation Configuration of PHP") and they mislead me! But when I found "How to Install and Configure PHP4 to run with Apache on Windows (thesitewizard_com)" and followed the instructions on it PHP codes started to work! So thank you guys, amd sorry for bothering You!
Right now I have a different problem:
I can't get my PHP to connect to MySQL. After this lines
"mysql_connect("localhost", "root", "(my_valid_password)"I get a error message. Do you have any idea how to solve this problem?
P.S.: MySQL works just fine thruogh "MySQL Command Line Client".
 
Is the root password defined. What happens if you elminate the password and just use the line
mysql_connect ("localhost", "root")?
The root password for mysql would not necessarily match the admin password for windows (at least I don't think that they would). Most of my experience has been on the linux side of the fence.

- flub
 
My access is denied when I try to connect using "mysql_connect("localhost","root")".
I just found out in MySQL manual that problem lies with the program, not with access privilages, but I haven't found out how to fix it.
Can anyone help me with this one?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top