Jump to content

Newbie - for real! Just getting started!


Recommended Posts

I am experienced with html however, I ourchased an ecommerece template and I am in over my head. It is a PHP site. I use dreamweaver. I want to see the pages while working from my computer so I can edit them.

I uploaded the site to the internet and I see the site and all the links work fine  ;D however, I can not edit the pages  :-\. I have tried to load several applications on my computer to make the PHP work. I want to start from scratch.

Is there someone willing to help? Or can you lead me to step by step help for a newbie, I am willing, ready and eager to do the work but there is something I am not understanding. ??? Is there a way to see the pages like I do when working in Dreamweaver with HTML files?

I thank you for your time in advance. ;D
Link to comment
Share on other sites

Well in order to see php on your local machine you need to set up a "testing server" as dreamweaver calls it. You can do this by installing apache, php, and mysql, or something like xampp which has everything put together for you. http://www.apachefriends.org/en/xampp.html there are lots of tutorials online to help you setting up a local server on your pc.
Link to comment
Share on other sites

Thank you for your post. I when to the site you reccommended, downloaded and everything seems to be working find. However, I do not know how to point dreamweaver to the, "test server", no matter what setting (path) I put in it keeps saying it is wrong.

When I downloaded, "XAMPP" I let it go to the default directory (C:\Program Files\xampp) and I did no configuration because it says it does not need it. However Dreamweaver does. My website files are here: C:\ghani_website_test\shop

Can you help me configure Dreamweaver to use the server?

Best regards
Link to comment
Share on other sites

You need to put all of your websites in the xampp folder so this website would be C:\Program Files\xampp\ghani_website_test\shop. Under testing server in the site settings you need to set the:
server model to "PHP MySQL"
Access: "Local/Network"
Testing server folder "C:\Program Files\xampp\ghani_website_test\shop" ...same as your local info folder
URL Prefix: http://localhost/ghani_website_test/shop OR http://localhost:80/ghani_website_test/shop OR http://localhost:8080/ghani_website_test/shop depending on which one you configured xampp to be.

Now when you preview a php file it should pop right up in your primary browser.

Let me know if you run into anything else
Link to comment
Share on other sites

Thank you for your response.

[b]I am getting the same message I have gotten since I started:[/b]

I am getting error 404(file not found):
ā€œoccurred while attempting to request the file http://localhost/ghani_website_test/shop/index_qf2a1tsah.php from test server.

Here are some possible reasons for the problem:

1)Files in the ā€œC:/Program files/ā€ folder that have ā€œ.phpā€ file extension are not being executed by the testing server.
2) The c:/Program Files/ā€ folder does not map to the http://localhost/ghani_website_test_shop/ URL on the testing server. Verify that the URL Prefix maps to the root of you site

Would you like to change the location of the testing server?ā€

I tested with the URL prefix set to: "Localhost80"ā€¦ and ā€œlocalhost8080ā€ and recived the same error. I returned the local host back to ā€œlocalhost/ā€¦

[b]Here are the rest of my settings:[/b]

[b]Local Information[/b]
Local root folder: C:\Program Files\xampp\ghani_website_test\shop\
Default images: C:\Program Files\xampp\ghani_website_test\shop\images\
Refresh local file list and enable cache

[b]Access: Local/Network[/b]
Remote folder: C:\Program Files\xampp\ghani_website_test\shop\

[b]Testing Server[/b]
Server model: PHP/MySQL
Access: Local/Network
Testing folder: C:\Program Files\
URL Prefix: http://localhost/ghani_website_test/shop/

I am not sure if the following is necessary or important. While installing the servive ports for Apache = 80 & 443
MySQL port ā€“ 3306

[b]Site Map Layout:[/b]
Homepage: C:\Program Files\xampp\ghani_website_test\shop\index.php

The site map home page was first set to "...\index.html" and I changed that to the above and still receive the same message.

Do see anything wrong with these settings?
Link to comment
Share on other sites

Hello again,

I changed the path however, I keep getting the same message. Is there something else I am suppose to besetting up before this will work or should this be the first and only thing, remember this is a ecommerce site. However, all I want to do he is be able to see the pages so I can edit the text and change the pictures from my computer.

Ummzee
Link to comment
Share on other sites

Didn't help, it goes back to the default of: C:\Program Files\xampp

Since I am new to this please explain: How do people who need to edit .php pages usuallu edit them I can't believe they program the pages and then have to upload them to look at there changes.

Whem I see the code in the pages, unlike html, I do not see the images in the code. I will assume (and will look around at the other files), that they are bing fed into the index pages since will will need to be changed regularly. Like I said, I was able to get the site to work when I up loaded the template, however, it took some work for me to finally get that.

Any other pointers? If I could find a secure ecommerce html site, I would use that but I don't think that would be the way to go if one intends to progress with their online business. the site is located at www.alfurqanonline.com

I still appreciate your help and hope you have more suggestion, I have no problem doing the work!

Ummzee
Link to comment
Share on other sites

OKay reading the XAMPP site you are supposed to put your files in a folder called [b]htdocs[/b] within the xampp folder eg:
C:\program files\xampp\htdocs

Now to test this has worked, by opeing your web browser and typing in the following:
http://localhost/ghani_website_test/

Do you get anything displayed in the web browser?
Also try http://localhost/ on its own too. What do you get?
Link to comment
Share on other sites

Ok, thanks -

[b]I moved the file and then typed:[/b] http://localhost/ghani_website_test/

[b]I got the following on the screen:[/b]

Index of /ghani_website_test
  Name                    Last modified      Size  Description
________________________________________
  Parent Directory                            - 
  shop/                  02-Jul-2006 15:34    - 
________________________________________
Apache/2.2.2 (Win32) DAV/2 mod_ssl/2.2.2 OpenSSL/0.9.8b mod_autoindex_color PHP/5.1.4 Server at localhost Port 80


[b]Using: [/b]  http://localhost/ takes me to the XAMPP for Windows page


When I select: "shop/", I get the following:

Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\Program Files\xampp\htdocs\ghani_website_test\shop\index.php on line 39

When I went back to Dreamweaver, I had to reset the setting to point to the site since I moved it and I received the attached error message, basically the same as before.

I will wait for your response before I do anything else.




[attachment deleted by admin]
Link to comment
Share on other sites

Okay every think is now working fine. However this error:
[code]Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\Program Files\xampp\htdocs\ghani_website_test\shop\index.php on line 39[/code]
Is to do with an error within index.php on line 39. Could you post lines 30 - 40 from index.php here for us to review it for what can be causing this.
Link to comment
Share on other sites

While I was getting the requested information, the power went off because we are having a large storm here.

When the power returned, the index file was corrupt. I replaced it with the original and now I get this error when I test the site:

FATAL ERROR: register_globals is disabled in php.ini, please enable it!
Link to comment
Share on other sites

I am not sure how to answer this. Remember this is a template that I purchased and I am new to php. Where can I find the information you are requesting? I am wondering why I did not get the orignal error message when I put the site up, it appears to work find on the online server and I see the pages just find.
Link to comment
Share on other sites

Your online server has a setting called register_globals turned on however you local server, has this setting turned off, which it should be. By all mean you can enable this setting by opening your php.ini and finding the following line:
[code]register_globals = Off[/code]
Change off to On save the php.ini and restart Apache. You shoud now be able to run your script however keep in mind any other scripts you may want to use on your local server may not function correctly due to register_globals being turned on.

But what I recommend you to do instead is to open up notepad and type the following:
[code]php_flag register_globals On[/code]
Now got to File > Save As... in the file name field delete what is in there and type in [b].htaccess[/b] exactly

Save this file in your [b]ghani_website_test folder[/b] (C:\program files\xampp\htdocs\ghani_website_test)

Now goto http://localhost/ghani_website_test/shop

You should no be able to run the php script.
Link to comment
Share on other sites

I did what you said and the file saved as [b].htaccess.txt [/b] however, the same error occured.

I then went to the [b]php.ini[/b] file and there is no reference in the file to "register..." all after seaching for [b]"*register*"[/b]

I don't know if this is import but  if I do a test for: http://localhost/ghani_website_test/shop/

[b]I do get:[/b]

Index of /ghani_website_test
Name                    Last modified      Size
Description--------------------------------------------------------------------------------
Parent Directory                            - 
shop/                  08-Dec-2005 13:17    - 
--------------------------------------------------------------------------------
Apache/2.2.2 (Win32) DAV/2 mod_ssl/2.2.2 OpenSSL/0.9.8b mod_autoindex_color PHP/5.1.4 Server at localhost Port 80

it is when I click on [b]"shop/" [/b] that [b]I get the error message[/b]

Link to comment
Share on other sites

I can tell progress is being made.

I resaved the file.

Now I get:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Program Files\xampp\htdocs\ghani_website_test\shop\includes\functions\database.php on line 19
Unable to connect to database server!

I am including a screen shot of the file tree.

When I purchased the template and set it up on my IP's server, I had to delete some of the files after using them to set the site up. I am think I don't need some of the directories here or do I need to set something else up?


[attachment deleted by admin]
Link to comment
Share on other sites

By looks of things the script you are using needs to be installed, by running a script which setups the database and defualt configuration settings. As at the mement the script is trying ot login in as ODBC into your mysql server which is incorrect as the user ODBC doesnt exist.

Does the script come with a read me file or some form of documentation. Have a read of the documentation for more info.
Link to comment
Share on other sites

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.