Questions tagged [php]

PHP is a free server-side, general-purpose scripting language that is especially suited for web development. Originally PHP stood for Personal Home Page, now it stands for PHP: Hypertext Preprocessor.

Filter by
Sorted by
Tagged with
1
vote
0answers
17 views

I am looking for a way to set noindex tags on all the string filters parameters

I don't want to use robots.txt for this. Any PHP code or any .http access lines will work like a charm. Now I show you what types of urls I want to eradicate. https://www.example.com/search-gadgets/?...
0
votes
0answers
5 views

Laravel and TCP Server hosted on GoDaddy [closed]

Can anyone pinpoint me in the right direction to setup a TCP Server on GoDaddy in order to accept incoming data from a device. I've found this guide which seems fine but I'm not sure how to handle the ...
0
votes
0answers
7 views

Uncaught Error: Call to a member function the_post() [migrated]

So I was having translation issue(WPML - TAGDIV composer) on my wordpress site and checked the debug log. I saw a fatal error on wp-includes/query.php Uncaught Error: Call to a member function ...
1
vote
1answer
23 views

Have Google index different languages at the same URL instead of just the default (English)

I have a multilingual PHP site. I have set English as the default language. The language changes automatically according to the browser settings. If it is French, the site will be seen in French. ...
0
votes
0answers
13 views

Wich external CMS to use inside existing WebApplication? [duplicate]

A quick question on external CMS usage inside existing web applications. I have a bunch of custom made web applications based on LAMP. Some of them have a lot of landingpages and (as of now) the ...
0
votes
1answer
19 views

CDN cached PHP page vs HTML one - Loading speed

Is there any difference at all in terms of loading speed if we have a fully cached PHP generated site (by for example, using CloudFlare rules "Cache everything") and a HTML page? Cloudflare allows ...
0
votes
0answers
6 views

Form action Linking to Non-existent File [migrated]

I'm taking over a project with very little documentation. Landing on the website provides the user with a log in HTML form with the following <form class="login-form" action="check" method="post"...
0
votes
0answers
15 views

Updated MediaWiki to version 1.31. Now Spam Blacklist and Title Blacklist are causing errors

I had (I think) version 1.23 because that's what the auto-installer on my host put there. So I uploaded the files for 1.31 and ran the update.php script. The site seemed to run fine until I tried to ...
1
vote
2answers
39 views

Handling extended Latin characters in URLs correctly with PHP and percent-encoding

I am currently tying myself up in knots over URL percent-encoding of extended Latin characters. Step 1 of 4 I have the following URL: https://example.com/fußgängerbrücke/ The offline folder name (...
1
vote
1answer
37 views

Removing Some Content from website by giving 410 status code

I have some content to be permanently deleted from my website. This is a permanent deletion and I am planning to give 410 status code. I can very well return the status code in PHP page as header( "...
1
vote
0answers
126 views

Use .htaccess/SSH/Cpanel to prevent a specific part of a specific PHP script from being processed

I have a website built with MediaWiki CMS which I host on a CentOS based Apache "shared server environment" (SiteGround) in which I can partially control Apache by: .htaccess files SSH Some Cpanel ...
2
votes
1answer
54 views

How To Create An Exception, or or exclude certain files from a php-file-extension Snippet in .htaccess? this example failed

This is a .php file extension removal snippet, for displaying links online. RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC] RewriteRule ^ %1 [R,L] This is where I make an exception to ...
2
votes
1answer
45 views

I'm using PHP 7.1 but Hostgator says they are on 5.4, and Cron throws an error

Trying to make sense of this. Doing a quick phpinfo() I get: PHP Version 7.1.14 System Linux gatorxxxxx.hostgator.com n.nn.nnn-nnn.nnn.nnn.x86_64 #1 SMP Tue May 21 13:24:40 CDT 2019 x86_64 But ...
0
votes
0answers
7 views

Please I want to Restructure this php URL to SEO friendly URL [duplicate]

I have this is the listing page: <div class="group"><a href="/category?id=<?php echo $data->slug;?>"><?php echo $data->title; ?></a></div> I have this https:/...
0
votes
0answers
10 views

Static Site Generator CMS [duplicate]

I'm looking for a CMS system that generates a static site. I'm probably about 1/4 of the way of creating one myself - which violates one of my rules about reinventing the wheel. I'm mostly a nodejs ...
5
votes
2answers
115 views

I'm using a public device vs Keep me signed in

I know this might be an obvious question, but its escaping me. When logging on websites, I have seen check boxes for things like "i'm using a public device" and "Keep me signed in". I know keep me ...
1
vote
1answer
31 views

How redirect directly to the final domain URL rather than a chain through variations of `www` and `https`?

When I type example.com in the URL it first redirects to http://example.com then to https://example.com and finally to the https://www.example.com (the original address). Why doesn't it straight away ...
0
votes
2answers
164 views

Need help setting canonical within PHP

First, I want to preface that I am not very good with php so I am looking for some guidance. I'm working on a website using Dreamweaver that is being accessed through .davaccess each php page has ...
1
vote
1answer
90 views

How to fix “Missing a temporary folder” error in Wordpress?

Today I pushed to live (using Softaculous) a staged version of my WordPress website which was working perfectly. Afterwards, the only thing that doesn't work properly is uploading files/media. The ...
2
votes
0answers
124 views

Phone number on wordpress website magically being changed to different number

I have a very strange problem on the website of a client of mine. It's a wordpress website I have designed with a child theme of the Leisure theme. I have coded a couple of simple plugins to suit ...
0
votes
0answers
13 views

CPanel - replace all references in user account of domainA with domainB

Trying to solve an easy case for when a user's domain name expired (and got stolen by squatter wanting a ransom!), for a global replacement of any text in that user's cpanel folder of the old expired ...
3
votes
0answers
35 views

405 for POST requests, download triggered for GET requests for specific php file only

Apologies, I know this is a basic question, but I'm learning nginx! I've inherited a Nginx driven site, the problem is that when browsing to a specific php file it initiates a download. The file, ...
2
votes
1answer
166 views

Why can't update.php connect to my database when my site connects to it just fine?

I'm trying to upgrade my MediaWiki installation. My site runs just fine locally at http://localhost:8888/. I can connect to my database using the "Socket" connection on Sequel Pro on port 8888. My ...
1
vote
0answers
19 views

I am trying to make a file upload form for my website, I have some code but it is not working [closed]

I cannot get this to work am I doing something wrong? $extensions= array("jpeg","jpg","png"); if(in_array($file_ext,$extensions)=== false){ $errors[]="extension not allowed, please choose a ...
3
votes
2answers
53 views

Change the product URL to a directory and drop the PHP to put articles about the product within its URL structure?

I have a product with url http://example.com/category/product.php. In short will come some blog articles, having urls like http://example.com/category/product/article1/, http://example.com/...
1
vote
0answers
23 views

Getting weird, process.php hits on my rails based site. What is this an indication of? [closed]

I was looking in my google analytics and discovered a few php hits to pages that, as a rails site obviously not apart of it. Here's an example: /process.php?d=WnCeik5EGhC5sO5YToPnII5eaQ==&b=1 ...
2
votes
0answers
152 views

PHP 7.3 doesn't show in Web Platform Installer (WPI) in IIS 8.5

I have 3 Windows servers, two of them are Windows Server 2012 R2 - IIS 8.5 and the other is Windows Server 2012 - IIS 8.0. I wanted to update to PHP 7.3.x automatically through the Web Platform ...
2
votes
1answer
27 views

I can't run 2 or more url rewriting rules at once

I was trying to shorten the URL more, but I was removing .php file extension from the URLs using URL rewriting too. I can't run both at the same time. Removing the extensions and trying to shorten ...
0
votes
0answers
334 views

How to fix .htaccess error? Keeps asking for authentication

I'm setting up basic http authentication for my subdomain dev Laravel site with .htaccess and .htpasswd. First, I created my .htpasswd user and password by command htpasswd -bc .htpasswd admin ...
-3
votes
1answer
56 views

Why does my website say that I can not update to Wordpress 5.2.2 because my php is out of date

I can not update to wordpress 5.2.2, I am receiving a message that says You cannot update because WordPress 5.2.2 requires PHP version 5.6.20 or higher. You are running version 5.4.45. While ...
0
votes
0answers
11 views

Can multiple vhost use the same php-fpm pool

I have several vhost setup on my apache server. I'm wondering if there are any issues with them all using the default php-fpm www pool, if I have it set to ondemand? Some are development sites, some ...
1
vote
0answers
21 views

Selecting a forms “select” option based on referring URL [closed]

I have a seemingly simple question that I can’t find an answer for. Scenario: I am developing a ”single-page” website based on a HTML5 UP! template that shows/hides content after clicking a button ...
1
vote
1answer
22 views

How to stop google from indexing old URLs of a website which redirects to new URLs

My old WordPress configuration added index.php to the permalinks of all my pages. e.g: https://example.com/index.php/contact etc., It was indexed already by google crawler. Now I reconfigured ...
1
vote
1answer
20 views

Debian Server Upload-Limit via PHP and SFTP

do you know where upload limits can be set on a debian server running apache2 and php7 outside of php? Problem: Can't upload files bigger than ~2MB Tried solutions: configuring php.ini (both ...
0
votes
2answers
64 views

Do browser developer tools expose your PHP code?

Browser "development tools" are a great way to learn from others, but are they a security risk? I'm working on a project using PHP. My understanding is that PHP code is hidden. So, someone calling for ...
0
votes
1answer
72 views

How can I resolve htaccess causing social media bots to see 404 response even though the page displays correctly?

I use the below htaccess code which appears to function correctly to rewrite URLS, however when a page is shared to social networks or scanned by bots like AHREFs, they all return 404 yet the pages at ...
1
vote
1answer
90 views

MediaWiki: Hiding certain HTML elements for non-logged-in users

In a MediaWiki-based non-communal website there are some HTML elements that should be presented only for logged-in-users (an administration menu or some of its links). Usually if I want to hide ...
0
votes
1answer
106 views

PHP randomly cannot load classes, causes FastCGI process to crash, and loads normally

I manage the website for the small company I work for, but I’m not an experienced server admin – I just kind of took over as the default IT guy because I knew more than the others. Generally speaking, ...
1
vote
1answer
20 views

Disable third-party composer scripts when running through composer.phar?

We have a MediaWiki update procedure at Website | mediawiki-install.txt. MediaWiki requires the use of developer tools like Composer on a production server. It is a bad idea, but we cannot change it. ...
1
vote
0answers
41 views

Is it safe to give write permission to index.php file?

Today I accidentally gave write permission to my index.php file to using sudo chmod +x index.php. I don't know what permission it had before. My index.php contains a php script for collecting number ...
0
votes
0answers
30 views

How to track internal redirect urls on Google Analytics User Explorer?

In our wp site the external urls replaced with internal links and when someone clicks on them they go to redirected external url, but those are not logged by google analytics user explorer. How to ...
0
votes
1answer
88 views

Duplicate, submitted URL not selected as canonical [duplicate]

I use https for my website. all my http requests are redirected to the https. I have submitted my sitemap. and google search console is showing below error for few of my web pages. Duplicate, ...
0
votes
1answer
41 views

I'm getting some error messages on add field 'type_login' in php script [closed]

I want to add one field "type_login" than I'm getting some error messages PHP script. missing code please help me... error -> Warning: mysqli_stmt_bind_param(): Number of elements in type ...
0
votes
1answer
159 views

Sign in PHP script add type of user superadmin,admin and user [closed]

I have Sign-in script PHP single user working fine. But I want to add sign-in multiuser like superadmin, admin and user. I have need please help me... I have need login_type full code Sign-in ...
1
vote
2answers
86 views

htaccess url rewriting 2 get values

I am using PHP 7.2 URL Rewrite Rules. i am making 2 links first link is "category.php?inventory_id=" and second links "show-subcategories.php?cat_id" but the result is always the first link is working ...
1
vote
1answer
32 views

Does it matter if I use a different design elements for desktop and mobile versions of my site?

My question is about responsive designs (HTML + CSS). Does it matter if I use a different elements for desktop and mobile versions of my site? I mean that my page isn't really responsive, it only ...
1
vote
1answer
44 views

Redirected too many times when I try to force https for all URLs

I want to redirect all website urls to https. I used the code below to do so. My website is built up using simple PHP. I don't use any opensource framework or CMS. RewriteEngine On RewriteCond %{...
1
vote
0answers
36 views

Remove the link to create a talk page from MediaWiki when the create page permission is off [closed]

I have a website that I created with MediaWiki but this website is not a community of two or more users and I am the only registered user as this is a personal website where I publish my services and ...
1
vote
0answers
24 views

How to run a code from a particular country [closed]

I am trying to access data of an e-commerce website of another country. The problem is that different data is displayed in different countries. I want to access the data from the UAE. My server is in ...
0
votes
0answers
40 views

What Is The PHP Binary

I was setting up a cron job in cPanel and started with usual: /usr/local/bin/php I'm an SEO and not an admin or dev so I've never really thought to wonder what I'm actually doing. I get the broad ...

1 2 3 4 5 22