Hot answers tagged

5

PHP is a back end programming language that is interpreted on the server side and outputs code that, eventually, gets served to the internet. The PHP code is never served unless you give the server permission to expose that code. Developer tools can only access code and data that you present to the internet. So, no, developer tools do not expose anything ...


3

It's seems like you need to update your PHP version to 5.6.20 or higher before updating to WordPress 5.2.2 because WordPress 5.2.2 require PHP v5.6.20 or higher to run.


3

RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] This is a "standard" HTTP to HTTPS redirect. If this is resulting in a redirect loop (assuming you've discounted your browser cache) then either you have a non-standard server config or you are behind an SSL proxy that manages your security certificate. Either way, ...


3

Back in September 2018 John Mueller from Google tweeted: Also see: Source: https://www.seroundtable.com/google-cookies-seo-26344.html Google's John Mueller said on Twitter that Google almost certainly cannot index a page that requires cookies. He said if you want Google to index the page, make sure to "remove the dependency" on cookies.


2

What you are seeing in the output of phpinfo() is the PHP environment. Generally, you will only see a list of Apache loaded modules (an apache2handler section) if PHP itself is installed as an Apache module (eg. mod_php). PHP is often installed as CGI/FastCGI, in which case you won't necessarily be able to detect (from PHP) whether mod_expires is installed ...


2

In my humble opinion and I have already tested it - the best way of removing pages from index comes in a few phases: On the pages you want to remove from index implement no-index. Create a temporary sitemap.xml with URLs of these pages. Ping this sitemap.xml file to Google using GSC or http://www.google.com/ping?sitemap=URL/of/file


2

From: https://www.inflectra.com/support/knowledgebase/kb306.aspx By default, IIS web server allows for limited file size to be uploaded to the web server. For IIS 6 and IIS 7, the default maximum file upload size is 4 MB and 28.6 MB respectively. IIS 7 returns a 404 error (HTTP Error 404.13 - CONTENT_LENGTH_TOO_LARGE) if someone uploads something ...


2

i have tried to give the index.php the parameter "page" Although you've not included this in the example you posted - so what you have posted will obviously not work because of this. If your front-controller is dependent on a page URL parameter then you need to pass this in the rewritten URL. For example: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{...


2

The template file you have posted from your backend end may render like this User-agent: * Disallow: /compare Disallow: /checkout Disallow: /register Disallow: /account Disallow: /account Disallow: /note Disallow: /widgets Disallow: /listing Disallow: /ticket Allow: /emotion The above interpretation of your robots.txt indicates that most of the pages in ...


2

There is no automatically created About page. A link to it does get created automatically, you can remove that by editing MediaWiki:Sidebar.


2

Generally, In Shared Hosting you are not allowed to change php.ini file. But many hosting providers allows to change such parameters of php.ini file through Control Panels like cPanel / Plesk / etc. Also some of them allow limited SSH access to the files and server, you can try whether it helps or not. Best way is ask your hosting provider about the ...


2

I seem to have resolved this by explicitly adding the socket to the $wgDBserver variable in LocalSettings.php. To get the socket path, I ran this query in Sequel Pro: show variables like 'socket' The only result was the following: /Applications/MAMP/tmp/mysql/mysql.sock So I changed the variable as follows: $wgDBserver = "localhost:/Applications/MAMP/...


2

As has already been mentioned in @closetnoc's answer, the proposed new URL format is preferable to the old one using a .php extension. However, the real question I think here is whether you should "change" the existing URL structure. There is no direct SEO benefit of changing the URL. There is an inherent SEO risk in changing any URL structure. (Google ...


2

I prefer /product/ to product.php. Why? Because it is not file dependent. What if you want to change the file name? Or temporarily use another page for a promotion? Because you could, assuming Apache, change which file is the default page using .htaccess, you can simply and quickly create an .htaccess page in the /product/ directory to point to any page you ...


2

Because your rules conflict... RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^\.]+)$ $1.php [NC] Your first rule matches a request of the form /username and rewrites this to username.php, before your second rule gets a chance to see the request. username.php does not match your second rule. One way to avoid this ...


2

First check that your URLs give "301 Permanent" redirects. If you are redirecting using "302 Temporary", "Meta Refresh", or JavaScript, it will take longer. All you have to do is wait. Google automatically stops indexing redirecting URLs and indexes the pages they point to. For your most popular pages, it should happen within a few weeks. If you have ...


2

Well... I fixed it! But as it usually goes, I'm unsure of the exact thing that put it together. However, I will leave what I did over here, in hopes that it might help someone else in the future. From cPanel, I first changed my php version from 7.2 to 7.1. And it crashed my website. Therefore, I changed it back to 7.2, and voila! It simply works.


2

What I do for pages that I want to mark as canonical is put the following code in my header.php file that is loaded on each page: <link rel='canonical' href='<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>'> This loads the prefix https:// plus the domain www.example.com plus the page page.php resulting in <link ...


2

It means that you should remove/destroy all traces of the person when they log out or the browser (or tab) is closed (if possible). You don't want the next person to sit down at the computer to have hint of what the last person was doing or see anything that belongs to them.


2

I have discovered that you can specify the version of PHP that cron should use like so: /opt/php56/bin/php -q /home/userna5/public_html/testcron.php thanks to this tutorial. All is now working as desired.


2

So, is a redirect to another page with 410 code fine? A redirect is not necessary. Define a custom 410 error document: ErrorDocument 410 /error-docs/e410.php And trigger the 410 in .htaccess, as you did before: RewriteRule ^deleted/ - [G] The G flag is simply a shortcut for R=410 and the L flag is not required (it is implied when using a status code ...


1

Actually these settings should be in php.ini. After editing don't forget to restart your Apache. Indeed there could be some other files, which contain these settings. Read this thread.


1

You will have to adjust the user/group permissions behind the scenes. Here is the guide the default user and group permissions that are installed on the stock API. MediaWiki Help:User rights and groups You may have to work in reverse with the stock permissions by hiding / restricting features to the “all” group then allowing the features to the “users” ...


1

It seems I’d misunderstood how the Plesk update cycle works. Update #55, mentioned in the footnote in the question, was released on 3 June, but it was not installed on our server until 10 June (unlike update #56 which was released on 10 June but has not yet been installed). Part of update #55 is that PHP 7.2 is updated to version 7.2.19. I just changed the ...


1

Do not run Composer in production. Run it on a deploy host, and then depending on your level of paranoia either use rsync/ftp/scp/etc to upload the files to production, or commit them to a deploy repo which production can pull from after manual review.


1

mysqli_stmt_bind_param($stmt, "ss", $param_username, $param_password, $param_type); You are only defining 2 bind variable types s and s in the type definition string "ss" (2nd argument), but you are passing 3 bind variables ($param_username, $param_password and $param_type) in the following function arguments, hence the error: "Number of elements in type ...


1

The reason that it isn't working is that (\d+)$ matches any URL that ends in digits. All of your URLs end in digits. You have a couple other potential problems with your rewrite rules as well. I'm not sure why you would want RewriteCond %{SERVER_PORT} 80 which means that the rewrite rule will only work for HTTP but not for HTTPS. In most cases you ...


1

yes, and no If I understand your question correctly, your site is not actually responsive, in that you/your viewers are not able to adjust the width of the desktop browser and have the site automatically adjust to the format for the mobile viewers. However, you have established different style elements in your CSS file which deliver specific elements based ...


1

Use a hash of the UTC date and the ip address, then use the hash as a seed to a random number generator, use the random number generator to generate a permutation of which content goes to which page. Results: random page content that varies over time while being static per user, unique content per page, no state stored anywhere (not in cookies, not in ...


1

What do you do when a user visits the site for the first time? Presumably you calculate what needs to be displayed, display it, and "cache" something in the session (as you mention). Every Googlebot visit is like the user's first time visit (as @Simon mentions - the Googlebot does not use cookies, so no session data can persist). So, assuming you do display ...


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