View local copy of website
Posted by: aimcs (---.dsl.digiweb.ie)
Date: January 29, 2010 02:24PM

I have a copy of a website on my local PC and would like to view and edit it locally.
The website is in PHP.
I have installed wampserver 2.0 with php ver 5.3.0 as well as PHPdesigner7.

wampserver cannot launch localhost or phpmyadmin but i can if i type 127.0.0.1 instead of localhost.

The local hosts file looks fine with only 1 entry of 127.0.0.1 localhost

I open phpdesigner 7 and naviage to the website php pages
when I try to open any of the PHP website pages and run them i receive the below error.
fatal error 9 php fatal error: call to undefined function mysql_connect ()....

The code is
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_connaimcs = "localhost";
$database_connaimcs = "db1015913_aimcs";
$username_connaimcs = "abc";
$password_connaimcs = "1234";
$connaimcs = mysql_pconnect($hostname_connaimcs, $username_connaimcs, $password_connaimcs) or trigger_error(mysql_error(),E_USER_ERROR);
?>


can anyone help?

Thanks

Options: ReplyQuote
Re: View local copy of website
Posted by: aimcs (---.dsl.digiweb.ie)
Date: January 29, 2010 02:37PM

Just an update

I removed skype with no change.

I removed NOD32 Eset AV and i can now use localhost and phpmyadmin from wampserver.

still cannot open my local webpages.

Any advice is welcome

Options: ReplyQuote
Re: View local copy of website
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: January 29, 2010 07:32PM

Make sure you are saving all your files related to your site in C:\wamp\www

You need to be going to [localhost] to run your php files.

Options: ReplyQuote
Re: View local copy of website
Posted by: yfastud (Moderator)
Date: January 29, 2010 11:32PM


Options: ReplyQuote
Re: View local copy of website
Posted by: aimcs (---.dsl.digiweb.ie)
Date: February 01, 2010 06:26PM

Thanks for the responses but they didnt work.

I needed to place the php.ini file from the C:\wamp\bin\apache\Apache2.2.11\bin folder into the c:\windows.
I also replaced any other PHP.ini i could find. these wher in

c:\Program Files\phpDesigner\php
c:\wamp\bin\php\php5.3.0\
c:\windows

this has worked i can now view the code, run and view the page and edit without any errors.

I hope thie solution helps someone else.

Options: ReplyQuote
Re: View local copy of website
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: February 01, 2010 06:34PM

this is not the solution..


delete any php.ini in any folders except for the wamp folder..

your php is using the wrong php.ini file now

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: View local copy of website
Posted by: aimcs (---.dsl.digiweb.ie)
Date: February 01, 2010 06:48PM

Steve

Which one in the wamp folder there are 2

c:\wamp\bin\php\php5.3.0\
C:\wamp\bin\apache\Apache2.2.11\bin

I tried both, one at a time but it doesnt work.

Do I have to point the programs at the correct PHP.ini? If so how?
Also where exactly should it be?

When the software is installed which php.ini is the correct one?

what does work is removing all php.ini files and having only one in the c:\windows folder.
This would mean this is the file that the apps are looking for.

thanks

Options: ReplyQuote
Re: View local copy of website
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: February 01, 2010 06:54PM

php looks in windows folder first...


but wamp with its possibility of mutiple php versions uses a different php.ini setup

leave all php.ini in the wamp folder as is...


delete any that are on ur pc not in the wamp folder...


when wamp starts it copies the phpforapache.ini into the apache folder..


if you ever wanna access the correct php.ini

left click wamp icon> php> php.ini

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: View local copy of website
Posted by: aimcs (---.dsl.digiweb.ie)
Date: February 01, 2010 07:11PM

Ok I confirmed it is opening the php.ini from C:\wamp\bin\apache\Apache2.2.11\bin

but the phpdesigner 7 progarm still will not run without a php.ini file in the c:\windows folder i checked this by rmoving the files and testing.

at the moment there are now 3 files
c:\wamp\bin\php\php5.3.0\
C:\wamp\bin\apache\Apache2.2.11\bin
c:\windows

I pasted the php.ini from the apache folder into the window folder and now it works

will this cause further problems?
what is the issue?

Options: ReplyQuote
Re: View local copy of website
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: February 01, 2010 07:27PM

this will be ok... as long as if u change anything in the >php.ini in wamp u copy it to the windows fodler again..


also if you add a new version of php to wamp or a second version.. this will no longer work as you switch between them

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: View local copy of website
Posted by: aimcs (---.dsl.digiweb.ie)
Date: February 01, 2010 09:16PM

Thanks Steve

Options: ReplyQuote
Re: View local copy of website
Posted by: yfastud (Moderator)
Date: February 02, 2010 12:13AM

Quote

but the phpdesigner 7 progarm still will not run without a php.ini file in the c:\windows folder i checked this by rmoving the files and testing.

at the moment there are now 3 files
c:\wamp\bin\php\php5.3.0\
C:\wamp\bin\apache\Apache2.2.11\bin
c:\windows
it's ok if you will NOT have any change later on because when you make a change in php.ini through wamp tray icon, php.ini file in widows folder will not change; thus, you should setup to enable phpdesigner to look for php.ini in wamp folder instead

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.