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.

0
votes
2answers
49 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
52 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 ...
0
votes
0answers
38 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
31 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, ...
0
votes
0answers
5 views

Multiple database select in PHP, but print IDs separately [migrated]

I want to perform a multiple database select, but print IDs separately. $sql = "SELECT * FROM peron, peronmedia WHERE peronmedia.PID=5" and peron.ID=5"; $xc = mysqli_query($baglanti, $sql); $rs=...
0
votes
1answer
12 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
34 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
5 views

Url requests refused [migrated]

I can’t make url requests work properly on Centos7 (with Apache). I’ve prepared some simple java script -> php request sample to present my problem : file1.html: <script type="application/...
0
votes
0answers
20 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
31 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
27 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
37 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
41 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
26 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
36 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
26 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
27 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
vote
1answer
41 views

Robot.Txt File interpretation problem?

I have a Joomla/Shopware For an eCommerce website, but I see some problems and I think google didnt crawl pages: {block name="frontend_robots_txt_user_agent"} User-agent: * {/block} {block name="...
0
votes
1answer
45 views

MediaWiki: How to delete the about page?

in a MediaWiki project I don't need the automatically created About webpage because in this case the homepage already covers the about details of the project. I can delete any webpage but for some ...
1
vote
1answer
77 views

How can I edit the php.ini folder on shared hosting (in /etc/php7/)?

Using this simple script (<?php phpinfo(); ?>) reveals me that my php.ini file is located in /etc/php7/php.ini folder. However, my hosting company's master ftp user account does not have an ...
2
votes
3answers
299 views

Will google still index a page if I use a $_SESSION variable?

For a couple of pages on our site, I'm writing a widget that relies on what it displays on other pages to determine what it displays on the current page. Basically, the purpose is just to ensure there'...
2
votes
1answer
88 views

IIS 10 and PHP 7.3 cant upload 4M file in one POST request

I have changed the maxfile size in the php.ini settings, but i do not know how to change it in the IIS 10 config. My hphinfo: I am getting the error 1 in the $_FILE array (which as I understand ...
0
votes
0answers
19 views

New LAMP server running wordpress with 4GB instead of 1GB RAM, which settings to change?

I was having some problems with a LAMP server running a wordpress website. The server would become unresponsive even via ssh. The average memory usage was 90% according to 'sar -r'. Now the average ...
1
vote
1answer
66 views

FrontController dosen´t work

i have a example FrontController, its really simple. index.php: if (isset($_GET['page'])) { $requested_page = $_GET['page']; } else { $requested_page = 'home'; } switch($requested_page) { ...
1
vote
0answers
58 views

Apache alias directory only working for index page, sub pages give 404 unless directory name is omitted [SOLVED] [closed]

So I've got this weird problem, I am trying to host a php codeigniter project but I can only access my index page all the other pages give me a 404 error I want it on port 81 so in ports.conf I have ...
0
votes
1answer
41 views

Google reports no discovered URLs in my sitemap and thousands of errors

My question is related to my previous question How to remove indexed pages from google effectively where I was advised to create XML sitemap and submit it to google. The advice looked solid so I ...
1
vote
1answer
26 views

Configure Apache for multiple web roots based on domain

I have a single app, which shares a large amount of code in PHP but which has 3 separate application-level folders depending on the domain name entered. IE: app.example.com is /apps/app-name/...
1
vote
1answer
36 views

Stop email notification of cPanel backups in custom script

I've been using the following (partial) code to backup my websites: Generated by https://www.ericzhang.me/projects/cpanel-auto-backup/ */ $auth = base64_encode("{$cpuser}:{$cppass}"); $domain = "{$...
2
votes
2answers
97 views

How to remove indexed pages from google effectively

My site was getting traffic and it was on the rise, then I added https and somewhere in that time I also created tons of extra link for google to crawl, thinking this will increase traffic in those ...
1
vote
1answer
30 views

Why is there no apache2handler section?

I try to figure out if the module mod_expires is installed. So I created a phpinfo() site and loaded it, but there is no section called apache2handler anywhere. In this post there is apache2handler. ...
0
votes
0answers
27 views

Will changing my website platform affect search engine rankings? [duplicate]

I have a website, it's in asp.net platform we are going to change it into PHP platform?. how it will affect the site's SEO ranking and backlinks?
2
votes
1answer
251 views

Nginx PHP setup: no input file specified

I inherited this web server with Nginx and I'm trying to get a new basic PHP site setup on here. I've followed instructions here. https://gist.github.com/GhazanfarMir/03bd1f1f770a3834d47274586d46ea62 ...
0
votes
1answer
16 views

Log folder permissions in Linux servers: Is it a good idea to use 0666?

Its a well known problem: When migrating or deploying systems often log folders are not writable because of permission problems. But giving 0777 on them can be a security problem in a production ...
1
vote
1answer
94 views

htaccess category seo url redirecting to 404 page in localhost [closed]

I am trying to edit my htaccess. All urls working fine on server, but same htaccess setup redirecting category/cat_name/ url to 404 page without giving any error. all other urls working fine accept ...
0
votes
0answers
12 views

Avoid duplicated content include/require [duplicate]

Greeting, I am aiming to do a website with a "onePage style". As I have 3 different pages I want to display, I want the first section of the page to be the content of those 3 pages and the other ...
2
votes
1answer
12 views

Are 807 NodeJS modules really required to use Font Awesome?

We contracted a web developer to make a really simple 40 page website using PHP+Twig. They sent the site to me in a zip file and when I unzipped it, it took almost 45 minutes to unzip because it had ...
2
votes
1answer
19 views

Why tracking pixels opposed to JavaScript calls? Aren't there caching issues?

As I understand it, a "tracking pixel" is a script that contains code that includes a header that make the response appear to be an image, which is then called using an image tag, like: <img src="...
1
vote
1answer
150 views

server reached pm.max_children setting (5)

Sorry, I am new and deleted my question thinking I had posted some info I should not have. I am posting the edited question once again: In our website, php5-fpm takes care of the php calls made by ...
1
vote
1answer
29 views

How to determine where a open_basedir restriction is coming from

We are trying to upgrade to Mediawiki 1.30 through Mediawiki's release tarball. upgrade.php is failing because the release tarball is missing components (for example, PHP Fatal error: Uncaught Error: ...
2
votes
0answers
28 views

Can I check for thumbnail existence with RewriteCond !-f and have my controller create files that don't exist?

My team have an application written in PHP. Most requests are rewritten to our index.php file using the condition below, in the Apache .conf RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /...
1
vote
0answers
23 views

All In One WordPress SEO plugin creates a meta description from the post and joins lines without using any spaces

I have a question regarding Worpress All in One SEO pack. It creates description without space to new lines. Here is an example: <meta name="description" content="Welcome to my websiteHere is ...
2
votes
0answers
108 views

ISP Config broke my PHP sessions and cookies [closed]

To explain my problem I have to add some context info: We have a website, it works with sessions and has been working for 7 years with no problems, except for our server administrator, he can not ...
8
votes
2answers
2k views

Does a PHP script stop executing when you receive 504 Gateway Timeout?

I am on a shared server (Siteground), and since my WordPress PHP script takes more than 30 seconds, it returns a 504 Gateway timeout. Will my query run and complete if it doesn't encounter a further ...
0
votes
1answer
34 views

What meta tag yoast focus keyword insert to my page?

What meta tag or custom tag yoast focus keyword insert to my page? How to simulate that in a .php base website? Because The Meta Keyword Tag Is No Longer Used by Google.
1
vote
2answers
136 views

Does redirecting the client using the PHP header function always work in client's modern browsers?

I want to redirect users back to login page if they wrote the wrong password. I usually use header(location: "login.php?msg=wrong password"); when they type the wrong password or something. Does this ...
0
votes
1answer
126 views

SEO: Is a redirect without using 301 but a PHP script, OK?

I've been reading about redirection, and how it can affect (or not if done properly) SEO. I'm changing my website's content platform from Drupal to a PHP custom made code. In my current site I have ...
2
votes
1answer
548 views

How do I run WebSockets as a service when the web server starts and monitor it to make sure it is always running?

I need to run the PHP WebSocket scripted in PHP 24/7/365 as a service automatically whenever, the server restarts/stops/starts the process. The process must invoke automatically Suppose if we ...
3
votes
2answers
205 views

SEO method to set page titles differently? (same header PHP)

My PHP-based site files start off with <?php include("PHP/header.php"); ?> which includes all the HTML (metadata, scripts, etc.) shared by every page - along <head> and <title>. The ...
3
votes
1answer
101 views

Hourly connections to my WordPress site via XMLRPC block my IP on BlueHost because they see many email logins

I currently own a WordPress site in a hosting (BlueHost). On the other hand, I have an application in our offices in .Net. This application, updates WordPress via XMLRPC every 1 hour. The problem is ...