Hot answers tagged

5

It is generally unwise to allow www or apache to have write access, however, this can be done safely by limiting the access to a single directory and not allowing any executables in that directory. For example, the docroot of your php based site is /var/www/example.com You would want your webserver setup so that the only php executable access point is /var/...


2

There is not really a "right answer" to this. Sorting by year/month is not a bad option, because it's easy to implement and it scales well. There's no need to worry about empty directories though - just create the directories when you need them (i.e. the first time there's an upload in that year or month). This is the way Wordpress does it.


2

Are you talking about allowing upload of content via the webserver or something else? Regardless you should be ensuring that the permissions are already set up so that your PHP code can only write to designated locations (directories) seperate from your website content. This can be difficult on cheap, shared hosting. Content upload Frank's answer is ...


1

Set DocumentRoot value to "/var/www" which is the path your PHP script is in. If you have a virtual host entry matching either localhost or the IP address of localhost on your machine then set DocumentRoot value in that virtual host block to "/var/www". Then restart apache. See details for DocumentRoot here: https://httpd.apache.org/docs/2.4/mod/core....


1

I had the same problem. I called Godaddy support and it sucks, so you need to access MX Entry in cPanel and configure it to remote MX if your email server is outside godaddy. Remember that you have to send emails from PHP trought your own domain. You need to specify a mx record in order to send the emails, it works for me with a delay of 10 minutes.



Only top voted, non community-wiki answers of a minimum length are eligible