Apache and Node.js on the Same Server

Great question! There are many websites and free web apps implemented in PHP that run on Apache, lots of people use it so you can mash up something pretty easy and besides, its a no-brainer way of serving static content. Node is fast, powerful, elegant, and a sexy tool with the raw power of V8 … Read more

file_get_contents( ) not working

Login to your server via ssh and type in the file, simply press “ctrl + w” and type “allow_url_fopen” and Return, most probably you will come to the explanation first, so repeat the search a couple of times. Now you can change the entry from allow_url_fopen=0 to allow_url_fopen=1 press “ctrl + x” and confirm the … Read more

Just to state the obvious for anyone viewing this discussion…. if you give any of your folders 777 permissions, you are allowing ANYONE to read, write and execute any file in that directory…. what this means is you have given ANYONE (any hacker or malicious person in the entire world) permission to upload ANY file, … Read more

How do I disable directory browsing?

Create an .htaccess file containing the following line: That is one option. Another option is editing your apache configuration file. In order to do so, you first need to open it with the command: Then find the line: Options Indexes FollowSymLinks Change that line to: Options FollowSymLinks Lastly save and exit the file, and restart … Read more

Only variable references should be returned by reference – Codeigniter

Edit filename: core/Common.php, line number: 257 Before After Update Added by NikiC In PHP assignment expressions always return the assigned value. So $_config[0] =& $config returns $config – but not the variable itself, but a copy of its value. And returning a reference to a temporary value wouldn’t be particularly useful (changing it wouldn’t do … Read more

Adding a user on .htpasswd

Exact same thing, just omit the -c option. Apache’s docs on it here. htpasswd /etc/apache2/.htpasswd newuser Also, htpasswd typically isn’t run as root. It’s typically owned by either the web server, or the owner of the files being served. If you’re using root to edit it instead of logging in as one of those users, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)