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
1answer
19 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 %{...
0
votes
0answers
14 views

Is there a somewhat reliable way to turn an ugly HTML table (as a string) into a nice JSON/array structure in PHP? [closed]

PS: Stack Overflow has started showing perpetual CAPTCHAs, never allowing me to post, so I cannot ask there. I keep finding myself in this situation: I find some data table somewhere, or get sent it ...
0
votes
1answer
36 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 ...
1
vote
2answers
25 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 ...
1
vote
3answers
2k views

php image upload library [closed]

I'm looking to NOT reinvent the wheel with an image upload system in php. Is there a good standalone library that allows for: Creating the system for uploading, renaming, and perhaps resizing ...
2
votes
7answers
2k views

WordPress keeps redirecting my users to install.php, Is it caused by an injection hack?

I don't really know how to express my problem, so bear with me. This is a bit hard to explain. I have a Wordpress installation, the latest, and often (once a day) my site redirects users to the /wp-...
1
vote
0answers
14 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 ...
2
votes
2answers
1k 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
1answer
30 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
0answers
15 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
30 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
17 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; ...
1
vote
1answer
548 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 ...
0
votes
0answers
18 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
0answers
387 views

Phone number on wordpress website magically being changed to different number [closed]

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
2answers
634 views

Is it possible to create a full SEO website with Firebase?

I work a lot with PHP, and as many of you know, you have a lot of flexibility when it comes to creating dynamic pages. You have sessions for authentication, database queries, etc. But the most ...
1
vote
1answer
31 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
1answer
52 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
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
0answers
14 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
16 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
14 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
25 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 ...
5
votes
2answers
10k views

Redirect from URL with parameters to SEO friendly URL in .htaccess

I have category page with this structure example.com/Category.php?Category_Id=10&Category_Title=some-text i want to write htaccess rules to redirect from example.com/Category.php?Category_Id=...
3
votes
1answer
854 views

with PHP: How to restrict access from one Addon domain to another?

With some hostings (000webhost, ovh, active24 and several other hosting, which DOESNT USE cPanel), when you add a new domain, an entirely separate public_html is created and a separate FTP login. But ...
1
vote
1answer
94 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 ...
3
votes
1answer
45 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
27 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
17 views

Can I use REGEX to 301 a URL with extra characters at the end? [duplicate]

I've just set up PHPlist to manage my email subscribers. When folks opt-in, they're taken to this page: https://www.example.com/lists/?p=subscribe&id=1 I'd like to redirect them to a custom ...
2
votes
3answers
194 views

Database of websites for a search engine [closed]

I'm planning to make a search engine, so I've downloaded this script. It works well, but I have to add a list of websites manually in a php file for the search engine to index. Is there any kind of ...
2
votes
1answer
3k views

Accessing server stats using PHP

There are over 10 stats packages installed in my server (AWStat, Webalizer, etc) and cPanel has an interface to show them in terms of visitors, bandwidth, popular pages, etc. It is possible to access ...
1
vote
0answers
71 views

Facebook Web app development: Storing user access token in a session variable

If i store facebook user access token in session variable , as there will be huge users (may be 10000 daily) will it cause the hosting server any issue ? EDIT 1: Server specification: 400mb disk ...
1
vote
2answers
2k views

Figure out which Instagram users click my referral link

I have an external bio link on my Instagram business page, i want to detect "which" Instagram users click on link and visited my website. Is this possible by analyzing referral link or other ways? , ...
1
vote
1answer
37 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
14 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 ...
9
votes
10answers
25k views

Need to Stop Bots from Killing my Webserver

I am having EXTREME bot problems on the some of my websites within my hosting account. The bots utilize over 98% of my CPU resources and 99% of my bandwidth for my entire hosting account. These bots ...
0
votes
0answers
16 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
79 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 (...
3
votes
4answers
7k views

How can i check how many users can visit my website at the same time?

i have my website on a shared webhosting account. I would like to check how many people can visit my site at the same time without the server slowing down or crashing. I don't have SSH, if that makes ...
1
vote
1answer
54 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( "...
3
votes
3answers
4k views

CloudFlare Not Sending If-Modified-Since Headers

I'm trying to reduce my server load by providing 304 Not Modified responses for content where appropriate. CloudFlare is my middle man, so they should be sending If-Modified-Since headers whenever a ...
1
vote
0answers
134 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 ...
3
votes
4answers
1k views

Simple CMS for clients? [closed]

I'm looking for something fairly simple for clients to use and very easy for me to skin (somewhat complicated themes). something like Perch or Couchcms, but has to be open source to satisfy some ...
2
votes
1answer
90 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
122 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
8 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 ...
3
votes
1answer
2k views

Rewrite and hide page ID from URL

I am working with the following on a football website and when a user clicks an event they get the following URL format: /live/1/event-name.html Currently the number in the URL represents the ID ...
3
votes
2answers
85 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
2 3 4 5
23