Jump to content

Symbolic Links, WWW Folder, Password Username Protection


AngryYoDa

Recommended Posts

Hey, I'm 2 days old in php. (Tho I am 10 years old coder..)

 

I have a server with shell access, mysql and web server (including php)

 

I am trying to protect my mysql username and password while connecting to mysql with the php scripts.

 

www folder as a symbolic link from my user folder.

 

Now I understand that I can declare my username and password in a seperate .php file above the www folder.  Then just include it in the www/.php file which is using it.

 

include("../includes.php");

 

But as this is a symbolic link from my home folder to the www folder, "../" isn't my home folder from the .php files in the www folder.

 

/users*AngryYoDa         /not my home folder

/www  -> /www

              /.php files

 

If that diagram helps at all.

 

So how do refer to the files in my home folder from the www folder?  I have tried /users/home/MYNAME/test.php with no luck.

 

Regards,

Jordan.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.