Skip to content

Tag: apache

Keep query string for external urls

A user can be sent to the main website by some referral id, using a query string: And when they click on a link to a login area, this query string must go with that external link: I am working with wordpress, so I cannot append ?ref=<?php echo $_GET[‘ref’]?> to that link. I have already chan…

php file automatically renamed to php.suspected

Since last 4 days, we are facing strange issue on our Production server (AWS EC2 instance) specific to only one site which is SugarCRM. Issue is /home/site_folder/public_html/include/MassUpdate.php file is renamed automatically to /home/site_folder/public_html/include/MassUpdate.php.suspected This happens 2-3…

Apache does not have write permission on html folder

I installed apache, MySQL, PHP in CentOS 7. All work well, except apache cannot write file in html folder. I found this problem when I used file_put_contents. I tried Change owner of /var/www to apache:apache, not work Added Order allow,deny Allow from all to <Directory “/var/www/html”> in h…

how hide extension of my php files

I`m trying to hide my php files extension in my hosted server.i add following code segment in .htaccess file. but when i try, it is not working. also i tried to do the same thing in my localhost.it is also not working properly. so do i have to make any other changes to work on it? Answer Use

Apache/PHP returns HTTP Status Code 200 on error pages

I’m running PHP 5.4 on CentOS 7 and when there is a php file that throws an error (either an exception, or a syntax error) it returns an HTTP 200 status code instead of 500. How can I get it to return a 500 server error when PHP encounters an error? I’ve tried looking at other Stackoverflow posts,…