IT Community - Software Programming, Web Development and Technical Support

Problem in executing PHP file

This is a discussion on Problem in executing PHP file within the PHP Programming forums, part of the Web Development category; Hi All, Recently i have installed WAMP server to my PC. I have started and find its running correctly, when ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > PHP Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 08-08-2007, 10:25 PM
Murali Murali is offline
D-Web Master
 
Join Date: Feb 2007
Location: India-Chennai.
Posts: 386
Murali is on a distinguished road
Send a message via AIM to Murali
Default Problem in executing PHP file

Hi All,

Recently i have installed WAMP server to my PC.

I have started and find its running correctly, when a i hit the index page which is a default page given in the sample directory.

It works, when i create a simple PHP file

PHP Code:
<?
echo "I would like to run my PHP Page";
?>
When i execute, i couldn't get the result.

Can someone help me?
__________________
-Murali..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-09-2007, 07:29 AM
Sivamurugan Sivamurugan is offline
D-Web Trainee
 
Join Date: Mar 2007
Posts: 22
Sivamurugan is on a distinguished road
Default Re: Problem in executing PHP file

WAMP5's php.ini file is located in the apache directory. When you launch php in command line, it will searh to the php.ini file in the windows or the php directory. If you have other installs or previous installs of PHP on your server, you might have a php.ini dile in your windows directory. This file is used by WAMP5's php in cli, that's what creates these error messages (the extension directory is not the good one). To solve this, jsut copy the php.ini file which is located in your apache directory, to your php directory so that this file is used by PHP.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-10-2007, 03:07 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: Problem in executing PHP file

Steps to follow and verify this to your current installation. This is manual installation

1. Download Apache2.0, PHP 5.0 (zip file not installer) and MySql 5.0
2. Install Apache
3. put the folder php in c:/php
4. copy php.ini (It is like php.ini_recommended) to c:/WINDOWS/ change the settings as per request
5.copy php5ts.dll into c:/WINDOWS/system32/

we have to change in Apche Groups/Apache/httd/conf with the following

Installing as a CGI binary

You need to insert these three lines to your Apache httpd.conf configuration file to set up the CGI binary:

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php

# For PHP 4
Action application/x-httpd-php "/php/php.exe"

# For PHP 5
Action application/x-httpd-php "/php/php-cgi.exe"

Installing as an Apache module

You need to insert these two lines to your Apache httpd.conf configuration file to set up the PHP module for Apache 2.0:

# For PHP 4 do something like this:
LoadModule php4_module "c:/php/php4apache2.dll"
# Don't forget to copy the php4apache2.dll file from the sapi directory!
AddType application/x-httpd-php .php

# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"

????: Remember to substitute your actual path to PHP for the c:/php/ in the above examples. Take care to use either php4apache2.dll or php5apache2.dll in your LoadModule directive and not php4apache.dll or php5apache.dll as the latter ones are designed to run with Apache 1.3.x.

????: If you want to use content negotiation, read related FAQ.

Install Mysql 5.0

check the mysql on the command line
copy php_mysql.dll from c:/php/ext/ to c:/WINDOWS/system32/


It will work fine I hope

If “Client does not support authentication protocol requested by server; consider upgrading MySQL client
“ error comes

Then do the following

1. Just change MySQL's password hashing algorithm for your password. So, how how u do that?

mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd') WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES;


2. if 1 is not working

MySQL 4.1 and up uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older clients.



To solve this problem, you should use one of the following approaches:

1. Upgrade all client programs to use a 4.1.1 or newer client library.
2. When connecting to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style password.
3. Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program.
4. Tell the server to use the older password hashing algorithm
Start mysqld with the --old-passwords option
Assign an old-format password to each account that has had its password updated to the 4.1 format.
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-23-2007, 06:38 AM
Murali Murali is offline
D-Web Master
 
Join Date: Feb 2007
Location: India-Chennai.
Posts: 386
Murali is on a distinguished road
Send a message via AIM to Murali
Default Re: Problem in executing PHP file

Thanks to Jeyaseelan and Sivamurugan.

Got it solved.
__________________
-Murali..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing-ShellCommands Murali Database Support 2 07-28-2007 03:25 AM
How can I find out the name of the namespace which a program is currently executing? kingmaker C# Programming 1 07-22-2007 11:32 PM
Executing SQL Server Stored Procedures With PHP - Executing stored procedures Jeyaseelansarc PHP Programming 1 07-19-2007 12:23 AM
Error while executing fla nssukumar Flash Actionscript Programming 0 07-16-2007 07:37 AM
Executing external programs via the shell in PHP Jeyaseelansarc PHP Programming 0 05-24-2007 01:09 AM


All times are GMT -7. The time now is 03:15 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0