Jump to content

Carsten

Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Carsten's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Tried to connect to my localhost and local mysql with <? $conn = mysql_connect("localhost","User","Pass") or die(mysql_error()); ?> But I get this error message: Warning: mysql_connect(): Access denied for user: 'User@localhost' (Using password: YES) in c:\apache\htdocs\mysite\tester.php on line 2 Access denied for user: 'User@localhost' (Using password: YES) Seems my user+password are wrong. But when I open WinMySQLAdmin 1.4 and look under my.ini Setup, it shows the same user+pass that I included in the mysql_connect call. What is wrong? Carsten
  2. Started this Apache business a couple of days ago , and so far I'm lost and very frustrated... There are so many directives, and they all overule one and another or something completely different. What a mess! My problem: I can freely connect to external websites from my localhost using the PHP command: ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); But when I place my script on my hosted server (using safe-php) it doesn't work. This is the layout of my httaccess file. # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> Do I need the AllowCONNECT directive, or perhaps setting up PORT to handle more than the default 443 563? If the connection issue is solved, will the <Limit PUT> deny from all prevent me from ftp'ing files? I don't want to comprimise my website, so if someone could please throw in a directive that ensures access to a single subfolder by supplying a unique name+password of my choice, I'd be very happy (a link is fine). Carsten
  3. Yes you're right, and that was also the idea. I'm not running a server myself, and I don't want anyone to access my computer. I just wanted a setup, so I could locally maintain different websites, and then easily upload the from Dreamweaver. If there is a catch in that aspect, do let me know. Carsten
  4. Yes there is a way and I've found it (I don't usually speak to myself!) Here is the layout. In the httpd.conf file, at the very buttom right before these 2 last lines LoadModule php4_module c:/php/sapi/php4apache.dll AddType application/x-httpd-php .php place this: NameVirtualHost 127.0.0.1 Listen 127.0.0.1:80 <VirtualHost 127.0.0.1> ServerName main.com ServerAlias main DocumentRoot C:/apache/htdocs </VirtualHost> <VirtualHost 127.0.0.1> ServerName website_1.com ServerAlias website_2 DocumentRoot C:/apache/htdocs/website_1 </VirtualHost> <VirtualHost 127.0.0.1> ServerName website_2.com ServerAlias website_2 DocumentRoot C:/apache/htdocs/website_2 </VirtualHost> The first of the three sections must be present before the others, as this sets up the root of the localhost (I guess). The others can just be multiplied for as many times as you have websites in need of care. Remember to stop Apache, and then restart it, for the changes to take effect. And last, for the ones using Dreamweaver: For each new site, set Site Definition like this: Server model: PHP MySQL Access: Local/Network Testing Server Folder: C:\apache\htdocs\website_1\ URL prefix: http://localhost/website_1/ Hope somebody else can have good use of this. It took me about 10 hours of research and too many cigarettes, but that is all behind me now. I'm a happy man. Carsten
  5. I have installed Apache and the localhost works fine. I'm pretty blank when it comes to complex system settings, so please post any answers with fool-proof logic Now I need 2 things: 1. Changing my main localhost root folder from c:\apache\htdoc\north to c:\apache\htdoc. Is it enough to edit the httpd.conf file to contain: DocumentRoot "C:/apache/htdocs", or are there other files needed to change? 2. Being able to access different websites on my home computer, using subdirectories like c:/apache/htdocs/north and C:/apache/htdocs/south etc. I've tried everything I could imagine and all I get is the infamous and sickening 404 finger! Please help P.S. I'm using Dreamweaver 2004. If there are special considerations, do enlight me. Carsten
×
×
  • 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.