Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

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.

1
vote
1answer
51 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
260 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'...
0
votes
1answer
27 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
12 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
44 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
42 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
31 views

Something is wrong with my XML Sitemap, how to fix

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
22 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
33 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
63 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
17 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
15 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
105 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
13 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
51 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
11 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
17 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
68 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
27 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
27 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
22 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
71 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
1k 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
32 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
80 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
107 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
340 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
126 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
85 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 ...
0
votes
1answer
50 views

Change the PHP version in SSH in CPanel

I've developed a PHP/MySQL system which runs on PHP 7.0 but when I access it to my remote CPanel via SSH and check the php version php -v it show that Im using version 5.4 how can I change this to 7.0 ...
2
votes
0answers
59 views

500 error from Mediawiki for first request after an idle period: Premature end of script headers

So I've got a Mediawiki on a subdomain, and until fairly recently everything was fine (if occasionally a little slow). A few weeks ago we started occasionally getting 500 Internal Server errors. ...
2
votes
1answer
253 views

NGINX - Rewrite .js.php file to .js

I have a dynamically created file start.js.php?c=21 and I would like to rewrite it's extension (to start.js, with query params). Is that possible? Is that a good method having such a rewrite? Is ...
1
vote
1answer
102 views

Scheduling the task in the plesk control panel

How to run web socket scripts coded in PHP in the Plesk web hosting control panel. I need to run the PHP WebSocket scripted in PHP 24/7/365. The path of the script named websocket_server.php lies in ...
1
vote
1answer
35 views

Change max_input_time when you don't have access to php.ini file

I am using freehosting website to host my wordpress blog. However, while trying to use duplicator plugin to migrate my blog it asks me to change the max_input_time value to 0 I don't see php.ini file ...
1
vote
1answer
38 views

301 redirect not seen by googlebot

I have made a function on a wordpress site. The functions purpose is the following. 1) if the post is not found, redirect to the archive of the post. Should be fairly easy right? Well - according ...
0
votes
1answer
35 views

Form submission without page refresh

I have a form and the details gets updated after submitting it and the page refreshes after that automatically and the details of the form will be shown at the bottom of the form. That means all the ...
0
votes
0answers
9 views

Is there any free webhosting with ip subdomain and php? [duplicate]

I would like to know if there is any free web hosting providers, who can provide; free subdomain ip address (digits) instead of their domain name php support mysql / any free db Thanks.
1
vote
2answers
25 views

Backend method to changing base wordpress domain to prevent redirect

My friend has come to me today to tell me he wants his wordpress site moved from example.com to example2.com. I have full access to the same server managing both those URLs, I copied the entire file ...
1
vote
0answers
88 views

which image of AWS to choose for PHP? [closed]

I want to set up a linux server that will run moodle (an application in PHP) on AWS. I think the best two images to choose from are: Amazon Linux 2 AMI (HVM) Amazon Linux 2 comes with five years ...
1
vote
0answers
21 views

Disallow URLs made with mod_rewrite in robots.txts [closed]

Here is my robots.txt file: User-agent: * Disallow: /head.php Disallow: /head/ Disallow: /head Disallow: /header.php Disallow: /header/ Disallow: /header Disallow: /footer.php Disallow: /footer/ ...
3
votes
1answer
39 views

Problem with .htaccess for files having similar kind of names

I have a file with name lang.php and another file in the same folder with same lang_inst.php. The .htaccess am using is: RewriteEngine On Options -Indexes RewriteCond %{REQUEST_FILENAME} !-d ...
2
votes
1answer
40 views

Redirecting from one page to another page on my website causes 404 error after using .htaccess file

Currently I'm working on a PHP blog. Where I have used an .htaccess file to get a clean URL, here is the code: RewriteEngine On RewriteCond %{HTTPS} !=off RewriteCond %{HTTP_HOST} ^example\.com$ ...
1
vote
1answer
114 views

Amazon s3 error 500 when instantiating S3Client

The amazon php sdk is uploaded to site and the autoloader is included successfully. But I'm getting an error 500 with no further details. I believe I've isolated the issue to the instantiation of ...
2
votes
1answer
224 views

Installing mPDF PHP library for website without root access

I would like to install mPDF for use on my website. However, I don't own my own server, and am using shared web hosting. I can log in using FTP, but AFAIK I do not have access to a terminal nor root ...
3
votes
2answers
327 views

Multiple PHP versions on one Digital Ocean droplet

Is there an easy way of using multiple php versions on one single digital ocean droplet. Basically, I want something like what we have for cPanel (https://documentation.cpanel.net/display/68Docs/...
3
votes
1answer
126 views

Why would googlebot be trying to crawl a URL “https://www.example.com/https://www.example.com/other/things”?

I've been trying to clean up crawl errors on my company's website. In one menu, google bot is trying to crawl every link with an extra-base URL attached. These pages (perhaps obviously) don't exist ...
4
votes
1answer
473 views

Nginx rewrite problem - displaying same page with or without .php extension after rewrite

I have implemented the following Nginx code: location / { try_files $uri $uri.php $uri/ @extensionless-php; index index.html index.htm index.php; } location ~ \.php$ { try_files $uri =...
2
votes
1answer
65 views

How to enable a the php_soap extension from .user.ini (no acces to php.ini)

Our application is being hosted on GoDaddy (plesk). We need to enable 'php_soap' extension for our application to work. We contacted the customer support that we don't have access to php.ini file to ...
2
votes
0answers
249 views

503 service unavailable error for ALL files except PHP files when using Apache virtual hosts

Apache 2.4/ PHP 7.0 Virtual hosts setup working correctly. There are no issues loading JPG files when pointing directly to the server using IP address. <VirtualHost *:80> ServerName example....