Jump to content

Recommended Posts

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?

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?

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.

 

 

 

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).

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.