We’re rewarding the question askers & reputations are being recalculated! Read more.

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
3
votes
1answer
102 views

blog/index.php/author/ how to create this kind of a URL for my php page?

WordPress blog URL has this notation. chapter .php there is another path. it is not an actual existing directory on the server. my question is how they do that? can I do something like that on my ...
2
votes
1answer
62 views

blog/index.php/author/ what kind of a URL?

as mentioned in the title my WordPress blog has this URL. which is not familiar to me. that not a GET request right? what is that? please help.
2
votes
1answer
700 views

cPanel Mail Function [closed]

There is a wordpress installation installed on a cpanel account. They have a contact form on that wordpress installation that is sending using the php mail function. It is supposed to be sending like ...
0
votes
2answers
365 views

If there is a time delay before a redirect, is link juice affected?

If a redirect happens with the following code: <?php $delay = 5; //seconds sleep($delay); header('HTTP/1.1 301 Moved Permanently'); header("Location: http://www.example.com"); ?> is the ...
0
votes
1answer
30 views

PHP syntax issue [closed]

I'm reading a Sentry tutorial for implementing an authentication workflow in a webapp. I'm a PHP beginner. There's a thing I don't understand in this code: <?php // set up autoloader require ('...
1
vote
0answers
139 views

Why is my Last-Modified header always sent using GMT timezone?

I want to send the last-modified in IST timezone, But it always sends in GMT. What is wrong with this PHP code? echo "Timezone " . date_default_timezone_get () ; //==>verified, timezone set ...
1
vote
0answers
121 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
1answer
38 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
0answers
346 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
6answers
228 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
2answers
49 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
2answers
9k 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
0answers
66 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
1answer
46 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
1answer
111 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
1answer
36 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
1answer
118 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
1answer
82 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 ...
2
votes
1answer
4k 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
1answer
828 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 ...
0
votes
1answer
4k 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
1answer
211 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
1answer
222 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
1answer
493 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 ...
2
votes
1answer
3k 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
1answer
511 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
1answer
2k 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
0answers
476 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
1answer
511 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
2answers
8k 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
1answer
70 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
1answer
92 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
2answers
911 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
0answers
68 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 $...
2
votes
0answers
70 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
0answers
48 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
2answers
1k 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
1answer
89 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
1answer
29 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
1answer
282 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
0answers
112 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
1answer
100 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
2answers
2k 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
2answers
75 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
1answer
1k 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
1answer
1k 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
4answers
2k 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
1answer
66 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
1answer
605 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
0answers
294 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 ...