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,169
questions
1
vote
0
answers
239
views
Safari 11.0 is blocking some of our scripts [closed]
Here is a quick video describing the issue - https://screencast.com/t/zTnbBoWYmY
Since the new Safari 11 we have an issue where our content isn't loading properly.
We are getting messages such as
...
1
vote
1
answer
45
views
How to deal with a big structure website performance
first of all thanks in advance for taking the time to help me out.
My doubt resides in how the performance is affected if I decide to develop a website only with html, css and javascript or if I ...
1
vote
0
answers
602
views
IIS showing 404 error for CakePHP routing prefixes for instance located in subfolder
I have this Single Page Application built using AngularJS that resides in the document root.
The SPA communicates with an API built using CakePHP 3.5.x. The CakePHP instance resides in a folder named ...
4
votes
6
answers
288
views
Should my users' profile page URL be /user/bob or just /bob?
Currently, the URL to a user's page is this:
website.com/user/bob
But I'm considering changing this to be:
website.com/bob
Without the /user/ part. It comes across as much cleaner and easier to ...
2
votes
2
answers
196
views
Is this document write of content fetched from another site cross site scripting or something different?
This was on a website I had to work on.
It seems to me its a horrible idea, but I was hoping to get other input before I told them it was.
var url = 'https://www.otherdomain.com/magic_php_file.php'; ...
1
vote
2
answers
15k
views
500 Server Error: Cannot serve directory: No matching directory index
I recently purchased a GoDaddy hosting package and uploaded all of my website files written primarily in PHP from scratch. But when I try going to my site, it only loads the head portion of the file ...
1
vote
0
answers
78
views
Disallowing adblock.php in robots.txt causes Google to report "Severe health issues are found in your property"? [closed]
I need google don't crawl my adblock.php URL, after i added this URL in my robot.txt file like,
Disallow: /adblock.php
The google shows report like,
I had added adblock.php to robots.txt ...
1
vote
1
answer
59
views
If there is no page, redirecting to the other site
I moved my site and I want to use the old site. The best way to use both is to show the current pages, if there is no page, redirect to the same address on the new site.
Can I do this only from the ....
1
vote
1
answer
341
views
setting rewrite rules in httpd.config file at host server
I am a new webmaster. I plan to host my website on a dedicated server. The website has three TLD: .com, .ma and .fr.
I have a couple of rewrite directives in my .htaccess file that force the URL ...
0
votes
1
answer
38
views
AJAX compatibilty [closed]
In 2015 Google stopped supporting their AJAX for Adsense program, So I've researched and developed tons of AJAX content. I understand the flaws so I'm striving for backwards compatibility.
loadPage('...
1
vote
1
answer
400
views
Is it possible to Host single website on multiple server? [duplicate]
I have a file sharing website . It's hosted on a dedicated server which have 16gb RAM and 2tb storage . Now I need more storage and RAM but my hosting service can't provide more than 2tb on single ...
1
vote
1
answer
89
views
After uploading sendmail.php to the webserver, what is its URL?
How do I correctly write out a path to a sendmail.php that is in the parent directly after it's uploaded to the hosting server?
Is it https://www.example.com or https://www.example.com/sendmail.php
...
3
votes
1
answer
6k
views
Logged Out Too Soon; PHP Sessions Expire Too Quickly. Is this a Linux, CentOS, Cookies, CPanel problem?
Recently, I've been getting logged out sooner than expected on several websites that I manage on Linux servers. The problem started spontaneously a few months ago. At the time, I had not made any ...
3
votes
1
answer
918
views
Can't find the IP address of regular visitor which creates %100 Bounce Rate on my site!
Everyday :(, the following user creates one hit on my google analytics which has 3-5 sessions and %100 bounce rate.
ISP: Digital Ocean
Operating System: Linux
City: san francisco
I want to block ...
0
votes
1
answer
6k
views
How to detect visitor's country from his IP for my PHP website right on the server [closed]
the problem:
I need to detect visitor's country from his IP so I can display specific code based on the user location (different ads, etc.) in my PHP website.
There is many different external ...
0
votes
1
answer
386
views
Will domain name with keyword "Android" makes any legal problem? [closed]
I am planning to buy a domain with keyword "Android" to my website. But i am worried about having any legal problem doing this. If i am buying what all things i have to look forward?
1
vote
1
answer
419
views
Why is the php.ini timezone setting is not used to determine when a PHP cron job runs?
I use shared hosting at Bluehost and changed the default date.timezone to UTC in my php.ini. Everything works fine with my PHP script and date() return the UTC time as expected.
The problem occurs ...
2
votes
1
answer
776
views
Redirect subdomain to their folders without double slash and such that parameters get sent through login
I have a wildcard DNS setup on my server, something like .example.com. In my root folder there are some sites, so what I need is to have something like this: test.example.com should use test directory ...
3
votes
1
answer
7k
views
Which version of XAMPP is compatible for php 5.4.45 and where can I find it?
My hosting server have php 5.4.45 installed along with mysql 5.6.28-76.1 cpanel 58.0 (build 47)
I've got so many errors because I was using latest XAMPP with PHP 7.1 on my computer. I want to be in ...
3
votes
1
answer
659
views
Why are there requests for non-existent WordPress URLs on my vb.net website?
I have a vb.net website and in the website I've also a WordPress blog website. I'm getting unknown URL in my log file which do not exist in the website. I logged in to Google Webmaster Tools and there ...
2
votes
1
answer
5k
views
Url rewrite not work in wamp localhost
I am developing a PHP web application. I have pages, posts, categories, product and etc.
Here is my .htaccess file to create SEO friendly URL:
Options -Indexes
RewriteEngine on
RewriteRule ^Page/(.*)...
2
votes
0
answers
767
views
How to start troubleshooting extremely high ttfb on large queried pages?
We have a dedicated server that feeds a very large wordpress site with a lot of advanced queries - large integrated CMS/Video-enabled with a ton of extra WP fields added on.
The server is 32G memory, ...
2
votes
1
answer
963
views
.htaccess ErrorDocument directive does not catch 404 errors triggered by PHP http_response_code(404)
Apache 2.4.10 on Windows. I have a stable Zend Framework 1 PHP application. I just decided to add an ErrorDocument directive to .htaccess. I'm completely baffled by the three different behaviors I get ...
5
votes
2
answers
14k
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=...
2
votes
1
answer
76
views
Not receiving mail sent through PHP SM_SMTP, but can get mail when sent through same server via telnet
Having heard so many bad things about PHP mail() I skipped it and downloaded kid moses' SM_SMTP class. This seemed easy enough to config. server, port, user, password etc. But when I tested it I ...
1
vote
1
answer
124
views
New line characters stopped getting written to PHP app's log file after switching FTP clients
I have a website running on PHP and I fwrite a log file. I append PHP_EOL to get each log entry on a new line. This was working fine but about a week ago the newlines stopped appearing so the ...
4
votes
2
answers
2k
views
Apache not working on AWS Linux after reboot - 301 Response code
I have setup an EC2 instance with the Amazon Linux image and installed LAMP and Wordpress as per the Amazon docs.
It works fine, serves the default Wordpress page, but as soon as the instance is ...
1
vote
0
answers
83
views
Why is my Ubuntu server not sending emails from my website visitors through PHP? [closed]
I have hosted my website on my Ubuntu server. I have added an email forum on my website so visitors can send emails to me. But it is not working anymore. Here's the full php code
<?php
$...
3
votes
0
answers
93
views
Remote document root being overwritten with local
Today an interesting problem has arisen. A piece of code that relies on the Server Document Root suddenly stopped working on only my browsers. My machine is where I develop locally using xampp, and ...
1
vote
0
answers
50
views
php - A website works in server , same code downloded and tried to run using xampp its not working [closed]
Recently I have joined to a company. They given me task of maintaining the website and to add new features to existing website. This site is developed 3 yrs back.Developed using Php and sql as backend....
1
vote
2
answers
4k
views
Is it illegal to track website visitors' ip addresses? If so, what precautions can you take to make sure you're covered?
Essentially what I'm wanting to know is, if I set up my website to collect user IP addresses using a mysql database to see when they first visited + when they last visited and other info like what ...
1
vote
1
answer
130
views
Use .htaccess to make pretty URLs that expand abbreviation codes
Yes, I know, there are tons of questions like this, but I can't find one which solves my problem so at cost of receiving downvotes I'm going to ask this again. Even a duplicate link may help me.
This ...
1
vote
1
answer
32
views
All contact forms in all Wordpress sites on the same VPS stopped working - php mail() malfunctioning?
On my VPS I use Ubuntu 16.04.2, Apache2 and PHP 7.0.15. Back when I installed the server environment I executed:
php-zip php-curl php-xml php-gd php7.0-mcrypt php7.0-mbstring -y
apt-get install lamp-...
1
vote
1
answer
429
views
Nginx deny-all fails to execute PHP code in 403.html
I want to deny access to some directories and files, so I use the deny_all option to return a 403.html page. However, it does not allow me to execute any PHP code in that page.
Something to do with "...
1
vote
0
answers
137
views
How do I create flat link URL with .htaccess [closed]
I am relatively new to URL rewriting. I recently created a forum and wishes to rewrite some of the thread URLs.
I want to internally rewrite this link
www.example.com/306/slug-title/6
(on client ...
2
votes
1
answer
118
views
Redirect 301 from old domain to a new one affect google rank
I did the redirect from my old domain store to a new domain using 301 rules on .htaccess as simplified below:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{THE_REQUEST} /store/catalogsearch/...
-1
votes
2
answers
4k
views
PHP website page loading is very slow in localhost [closed]
PHP website pages are taking very long time to load for huge data in localhost(using Xampp). The page loading becomes faster for less data. Could anyone tell why how this can be?
2
votes
2
answers
83
views
Deleting WordPress and replacing with php files
I have a website with a "tips" section administered using WordPress (the rest of the site is made up of basic HTML files).
For multiple reasons (including security and the fact I rarely add content ...
3
votes
1
answer
2k
views
open_basedir restriction causing huge error_log in WordPress
I am running a Wordpress blog with cpanel and I get an huge error_log file (40GB) in my public_html folder.
The content:
Warning: is_readable(): open_basedir restriction in effect. File(/var/www/...
2
votes
1
answer
2k
views
PHP doesn't work on Amazon AWS S3 for email contact form
I built a website with Adobe Muse, it as HTML, uploaded it to a bucket in Amazon AWS S3, enable webhosting on the bucket, and attached the domain to my website with Amazon Route 53. It can be visited ...
3
votes
4
answers
5k
views
How to hide h1 and h2 tags using JavaScript while still having them for SEO
My website does not currently use H1 and H2 tags, but I want to use them and hide them to make my site SEO friendly.
0
votes
1
answer
94
views
Cannot connect to Wordpress MySQL on Fedora 25
On Fedora 25, I want to develop a Wordpress website. Here's a summary of what I did, but I still cannot get it to work and enter Wordpress management panel:
1- I started MySQL by running
sudo ...
3
votes
1
answer
715
views
HTTP To HTTPS sitemap issues
Today I moved my site from HTTP to HTTPs successfully.
Code I used:
if($_SERVER["HTTPS"] != "on"){
if(php_sapi_name() === 'cli'){
}
else{
$host = $_SERVER['HTTP_HOST'];
...
1
vote
0
answers
413
views
Wordpress in Suexec or suphp
I have a Hsphere 3.6S.0SPU installation (that I am begging management to get rid of, but anyways...) that has several customer WordPress installations in it.
I have discovered that the only ...
2
votes
1
answer
134
views
Browser Cache Control | Individual Resources
The boss suggested to read the documentation on Google Leverage Browser Cache after testing with Google Page Speed Insights ...
There was a list of about 30 or so resources that need to be cached for ...
0
votes
1
answer
39
views
Forcing better logging of mail requests in PHP
I provide virtual hosting for a number of websites (mainly wordpress) maintained by others. Unfortunately one of them gets compromised and used to send spam (typically from a PHP script) from time-to-...
1
vote
1
answer
157
views
Desktop application vs web application [closed]
I have a custom accounting + user specific needs desktop application (which i developed using delphi 7 + mysql and over 20 users are actively using the application), it has bills, personnels, banks, ...
2
votes
1
answer
2k
views
Make 404 error not redirect when on different domain/subdomain
I have a PHP file on my error subdomain (https://errors.example.com).
And this is meant to serve as the error page for all subdomains.
The format it goes through is https://errors.example.com?type=...
0
votes
1
answer
92
views
Extracting from JSON REST API
I would like to know how to extract particular field of data from the REST API.
I would like to get the "bits-per-second-tx" data, only and I have tried
http://localhost/net/json?field=bits-per-...
-1
votes
1
answer
24
views
RE MEDICAL SEO and web building [closed]
From an SEO Point of view, what is better for a medical or dental website? PHP, HTML or Wordpress and why? My SEO person said php is read better by google bots - Somebody verify....thanks