New answers tagged

0

I just added gzip compression via the .htaccess file on Bluehosts's WordPress Hosting. By default, it had the source html/php and CSS files gzipped. Adding this code from BlueHost's WordPress optimization tips article enabled gzip for JS files, images, etc: <ifmodule mod_deflate.c> AddOutputFilterByType DEFLATE image/gif image/png image/jpeg image/x-...


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.


0

Microsoft word mail-merge with the excel sheet as database is perfect for this use case. Make a page in word with all the elements n design. Then from Mail Merge menu, add the variable data, like Date, Price etc.In the end, merge, and then print on paper or as pdf.


0

There's a library called PHPExcel, with this you can read the data contained in the excel file, with the data read you can do multiple things... Use a graphical library like Intervention Image to construct an image file Or create an HTML template for the tag and then use DOM PDF to create the pdf file in one stroke Or both of the above at the same time ...


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


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.


0

We've tried PHP's mail() function and also the PHPMailer SMTP library, but are experiencing delays with both. We're working on a web service, and our registration confirmation emails are constantly delayed almost 5-10 mins on GoDaddy's servers. First, determine if any of the third-party software is the culprit. Maybe your PHP script runs slowly to the ...


1

Unfortunately e-mail delays and other issues like this are common with GoDaddy - and as far as I'm aware, using an SMTP library to an external SMTP server won't work at all as GoDaddy will block it. The best you can do is contact GoDaddy support and ask if there is a problem on the server you are on, but I'd hazard a guess that there's not going to be much ...



Top 50 recent answers are included