Arnsenal Posted September 28, 2011 Share Posted September 28, 2011 Hi guys, PHP Noobie here. Sorry if I am not using the correct terminology. I am editing a site that was developed in php and all their page.php files are in one folder, the public_html folder. I downloaded the site locally and am using EasyPHP to view changes to the site. My initial problem is, when developing locally, only some of the links work. The following link works. <a class="red" href="benefits.php">Click here</a> The following link does not work. Error 404 <a class="red" href="/placement/">Click here</a> Also, the links in the flash banner do not work... They request this url: http://127.0.0.1:8888/services.php If I type in: http://127.0.0.1:8888/MyCompany/services.php , the browser will then render the page. Finally the scripts cant connect to the database and any user requesting information does not have access. Warning: mysql_query() [function.mysql-query]: Access denied for user ''@'localhost' (using password: NO) in C:\Program Files (x86)\EasyPHP-5.3.6.0\www\MyCompany\placement\index.php on line 108 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\Program Files (x86)\EasyPHP-5.3.6.0\www\MyCompany\placement\index.php on line 108 Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\Program Files (x86)\EasyPHP-5.3.6.0\www\MyCompany\placement\index.php on line 109 Any Ideas on this problem or and foresight on other problems I may run into... with the database maybe? Quote Link to comment https://forums.phpfreaks.com/topic/248053-errors-developing-locally-after-downloading-php-site/ Share on other sites More sharing options...
jcbones Posted September 28, 2011 Share Posted September 28, 2011 benefits.php link works because the script resides in the same folder. /placement/ link doesn't work, because you stated that you only have a public_html folder, but it is looking for a placement folder, OR mod-rewrite (which wouldn't work without being setup). The flash banner is looking for port 8888 on your local server, and then for services.php in the public html folder (www), your function errors suggest that your scripts reside in public html(www)/MyCompany/. For the query errors, is your database set up? Do you have the right username? Should you have a password there? Quote Link to comment https://forums.phpfreaks.com/topic/248053-errors-developing-locally-after-downloading-php-site/#findComment-1273721 Share on other sites More sharing options...
Arnsenal Posted September 28, 2011 Author Share Posted September 28, 2011 Thank You for the Help! So I would have to create or edit Mod-rewrite in the . htaccess file for the file paths to be correct? Then I would have to copy the database and upload it to my local SQL, I guess I dont know where the database file is located. If I did find the database and exported it to my local MySQL would I have to create a user in my user table still? Thanks again for the help. Quote Link to comment https://forums.phpfreaks.com/topic/248053-errors-developing-locally-after-downloading-php-site/#findComment-1273738 Share on other sites More sharing options...
jcbones Posted September 29, 2011 Share Posted September 29, 2011 For the mod-rewrite, I'm not 100% sure if it is required for this script. That is just a suggestion to look into. For the database, goto the website's database console, or phpMyAdmin, and export the database. Import it to your development database (easyPHP has phpMyAdmin, just click the import button at the top.). You should already have a default user (root) for MySQL (no password, unless you specified during installation). Quote Link to comment https://forums.phpfreaks.com/topic/248053-errors-developing-locally-after-downloading-php-site/#findComment-1273781 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.