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
0
votes
0answers
15 views

System PHP version upgraded to 7.3 but domain is stuck at 7.2

I recently upgraded PHP from 7.2 to 7.3 on my Centos and Apache server by using cPanel/WHM. I'd updated the System PHP version to 7.3 but the domain is still stuck at 7.2. When I attempt to upgrade ...
1
vote
1answer
20 views

Schema data for Google & Bing bots crawling partial hydrated pages

We are using static html, combined with partial page hydration via javascript. Visitors download a full html page when they first arrive at the website, from there javascript intercepts any internal ...
1
vote
0answers
24 views

How can I add an image to a WhatsApp message created from a click on my website through the API?

I want to send an image, text with product URL to WhatsApp from my website when the user clicks on the WhatsApp icon. Currently I can send text with product URL but I don't know how to add a image ...
0
votes
0answers
16 views

.htaccess script working in Chrome/Safari but not in Firefox

Purpose of the script is to allow traffic only if referred to from a link / php script on the website itself. Direct access to link should not be allowed. Referral from 3rd party website should also ...
0
votes
0answers
68 views

Adsense not showing

This is kind of a strange glitch, but still..? I can’t figure it out. When I go to a question on my database almost every time, the ads don’t show, but when I change the url by adding page.php?...
0
votes
1answer
33 views

How to fix warning in php : Warning: Undefined variable $nameError in C:\xampp\htdocs\mysql\insert.php on line 84 [closed]

As a beginner in PHP, I was trying to learn how PHP runs along with MySQL. So I was practicing how to insert data into a database using a form. So far this is what I did. <?php error_reporting(...
1
vote
0answers
69 views

I consider if I should delete a /load.php?lang= URL resource and I don't know if it would cause a problem

I have an Hebrew 1.35.1 all-core MediaWiki website; generally I have no significant performance problems reported in Google Page Speed insights with that website besides one problem which occurs in ...
2
votes
5answers
286 views

Can I develop and test WordPress and PHP without a domain name?

I intend to learn and develop a website using WordPress and PHP. I read from the web that as a start, these two are sufficient for a typical website with database storage and retrieval/query ...
2
votes
1answer
43 views

Can I use Google Analytics on URL shortener redirects powered by PHP?

I have a short URL website like Bitly which currently redirect users with PHP from my site to a site of their choice. I want to add Google Analytics to the redirect pages but I am stuck on the problem ...
2
votes
0answers
20 views

Will adding parameters to URLs with JavaScript to pass information to Google Analytics affect SEO?

I have written some simple js/php that adds WordPress taxonomies and categories of posts to the urls of blog posts so that we can search in google analytics which posts with matching taxonomies are ...
1
vote
1answer
53 views

Htaccess - replacing a query string with a numeric value

I don't know why but this htaccess item doesn't work for me. I have something like this after update user profile public/user_profile/show_user.html?id=4 and I want to have public/user_profile/...
1
vote
0answers
16 views

How do I configure the available memory in my PHP-FPM pools?

I have 20 GB available for PHP-FPM on my server, the average consumption of my PHP-FPM pools is 55 MB. I want to create a www.conf for the site and a www2.conf for routines that run during the day. I ...
0
votes
1answer
77 views

There is a way to block a access to a page if user typing the url?

I have a php page A which redirects to page B. I have a shortlink on page A. I want access to be denied to A unless the user accesses from the shortlink. The problem is that the shortlink creation ...
1
vote
1answer
78 views

PHP Undefined index: REDIRECT_STATUS - error 404

Custom 404 page in PHP using .htaccess file. If page dosen't exist redirect to error.php. I don't know why but it doesn't work. Notice: Undefined index: REDIRECT_STATUS on line 2 <?php $error = $...
1
vote
1answer
18 views

Site B filling out form from Site A and Site A processes form submittal [closed]

I have a need for website B to grab a form from website A and post the form data to a process on website A. Site A is the 'keeper of data submitted', and site B is an approved client of A that is ...
0
votes
1answer
40 views

Are static websites significantly faster than dynamic? [duplicate]

Lets say we have a blog site: METHOD #1 When an admin creates a new blog post, it will be added to the database. When a user loads the website, PHP will check the database for all posts. METHOD #2 ...
2
votes
0answers
23 views

Problem with URL path when I applied SEO friendly URL [duplicate]

I was working on PHP project and making SEO friendly URL Like, OLD : http://example.com/list_product?q=men-top-wear New : http://example.com/list_product/men-top-wear Here is my .htaccess file: ...
4
votes
2answers
85 views

Bot calling my php script too fast

I have a hobby website, where a php script presents a html page displaying information for a particular surname. I am capable of displaying information for over 100,000 surnames. So the script is ...
1
vote
0answers
72 views

mysqli_connect() & GoDaddy (New Versions of PHP) [closed]

I am using GoDaddy to host my website and it says in php that I have a Fatal error: Uncaught Error: Call to undefined function There is a problem when I use "mysqli_connect()" function in ...
1
vote
1answer
50 views

How does “PHP Extended Support” work?

Some big providers like 1&1 or Stratos sell "PHP Extended Support" to their customers. These practices have caused - for good reason - a lot of controversy, but this is not the topic. Do ...
2
votes
1answer
29 views

htacces rules for mobile and desktop site

I have a site that stores an index.php for desktop computers and a mobile.php for mobile devices. Both files are in the same directory (say /var/www). As default the user accesses index.php and if ...
0
votes
0answers
41 views

Running Python script via PHP exec() on shared hosting

I have a PHP script that launches a Python script. It works fine when I am testing locally, but not on the shared hosting server. I've made the Python script, as well as the Python program files, ...
1
vote
1answer
29 views

Use PHP 5.6 for a site under Control Web Panel Pro rather than the global PHP 7.3

I'm using PHP 7.3 on a CWP Pro installation. Most of the domains are fine with 7.3 but on one I'm using PHP 5.6 installed with PHP selector V2. .htaccess: AddHandler application/x-httpd-php56 .php The ...
1
vote
1answer
30 views

Server Side Amazon Affiliate Ads Possible?

Is it possible to have server-side Amazon Affiliate ads - from my server, in order to bypass ad blockers? If I use the code supplied by the Amazon Affiliate tools, I get something like this (...
2
votes
1answer
36 views

Prevent gobbledegook submissions to web contact forms

I have a PHP web contact form I put together which checks for spam words and cleans out any HTML coding before sending, but I am receiving some messages with gobbledegook, which I believe the sender ...
2
votes
1answer
32 views

Phpmyadmin - How to let users create and manage their own databases without allowing them to see other databases

In PhpMyAdmin I want to allow certain users the ability to create and manage databases without having to manually give them permission to every database they need. I've noticed when giving a user the ...
0
votes
1answer
24 views

Dynamic PHP Pages [closed]

I'm trying to make a database of herbs with their many uses. Instead of making an individual page for every single one of them, I would like to just put the info in MySQL and call it to their ...
1
vote
0answers
30 views

Why does Dreamweaver save the same .php file twice?

I am creating a website on localhost (WAMP) as of now. I have set up the testing server the new php files that I create are saved in a sub-foldor of www folder specific for my website. [ C:\wamp64\...
2
votes
1answer
45 views

Cloudflare returns 200 when server returns 404

When I make a request to my site that is proxied through Cloudflare, if I am requesting a resource that doesn't exist (such as /foo), my server returns a 404 (I see my 404 page and testing without ...
6
votes
1answer
439 views

HTTP2 is enabled and working, but PHP $_SERVER['SERVER_PROTOCOL'] still says “HTTP/1.1”

I've been migrating to a new host (AWS Lightsail with a Ubuntu instance) and while everything is working just fine I'm running into a quirk that I can't quite figure out. I've enabled HTTP2 on my ...
1
vote
1answer
966 views

my laravel sub-domain urls does not work except homepage

I am new to hosting web apps online. I wanted to host an app in my subdomain eg departmennt1.example.com. I added the subdomain in cPanel. Located its directory in file manager. It happens that the ...
1
vote
1answer
66 views

Internal Server Error caused by rewriting [closed]

Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html [NC,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{...
1
vote
0answers
16 views

Monthly search value in adwords api is much larger then in a Keyword Planner

I am trying to use an adword api to get some keyword statistics. But what I see is that with a same parameters my monthly search volue is about 7 mln searches. While adword keyword planner shows ...
1
vote
2answers
57 views

What happens when someone fills in a contact form on a website?

I am trying to debug a problem on a wordpress website I am working on. The contact form doesn't work. In my quest to find answers it occurred to me that I don't even actually know what's going on in ...
0
votes
1answer
106 views

Can a 410 gone page remain indexed?

Does somebody experienced a page with 410 status code in index? Could you imagine, that an indexed healthy page, which is set to 410 only through adding of <?php header( "HTTP/1.1 410 Gone&...
0
votes
0answers
7 views

How to implement traffic correlated ad rate algorithm for different sections of a forum

I'm working on a forum with at least 15 sections. I built an Ad management system that allow users to run their own Ad campaigns and place Ads on any of the sections that best suits their target ...
0
votes
1answer
44 views

Blacklisted IPs visiting my site

I have a website and I wanted to see what volume of traffic I was receiving, using $_SERVER['REMOTE_ADDR']. However, when checking these IP addresses against blacklisting services I found that around ...
0
votes
0answers
21 views

Update “hosts” file on CentOS server with cPanel

I'm migrating from an old server to a new server running cPanel/WHM v86.0.18 and I'm in the process of migrating and testing two websites, let's say example.com and web.example.com. These two websites ...
1
vote
1answer
56 views

How can a search engine crawl a dynamically generated website?

A dynamically generated website doesn't have most of its content hard coded on the HTML file. Sometimes it waits for a user to login or wait for an input to generate its views. So it would look ...
-1
votes
1answer
25 views

What is the difference of an `if` statement that has an {open-close} brackets, and without {open-close} brackets [closed]

if statement has an open {} close brackets if(example){ return example; }else{ return example; } if statement without open {} close brackets if(example) return example; ...
0
votes
0answers
255 views

error: AH01276: Cannot serve director… after I copied my website to new domain (host under same server)

error log: AH01276: Cannot serve directory /var/www/vhosts/example.com/httpdocs/images/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm,index.shtml)...
1
vote
1answer
115 views

Lighttpd - configure multiple PHP versions

I have 2 php fpm services in my server, one is php 5.6 in port 9001, and the other is php 7.2 in port 9072. I have a website that is running on PHP 5.6, working using the following config: fastcgi....
1
vote
0answers
15 views

Geo specific content and CDN caching [closed]

Our Wordpress website has a list of products which is generated on the server side. Depending on user ip (country) the list gets populated with different items. Some products are meant to be displayed ...
1
vote
0answers
27 views

Which PHP extensions do most web hosts commonly have installed and enabled?

I'm building a WordPress plugin intended for wide release, and would like to be able to rely on the openssl and gmp extensions, which require that PHP was compiled with those extensions specified and ...
1
vote
0answers
17 views

Is it possible to create mysql accounts for 'user' and have that account access a different page of the website? [closed]

I'm creating a website where me "as an admin" can create other accounts for "users". When I login as an admin it will be directed to a page like "superuser.php" where I can create an account for "...
1
vote
0answers
171 views

How can a file download link download an old file that doesn't exist?

Early last year, I created a website that parses a CSV file and parses / displays it in a certain way for internal use. One page of this website provides an upload / download function so that the CSV ...
3
votes
1answer
267 views

Hide the subfolder from appearing in url

I want to move from www.example.com/_/randomfolder to example.com/randomfolder. It should acces the contents from /_/randomfolder but should show example.com/randomfolder. What I have tried: Trial 1 ...
1
vote
1answer
24 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/?...
1
vote
1answer
197 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. ...
1
vote
1answer
37 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 ...

1
2 3 4 5
23