We want to update the PHP version for our site hosted in a virtual server, from 5.2.17 to 5.3, but haven't been able to do it.
We asked the ISP for instructions but they take some days to answer and we need to update it as soon as possible.
If anybody could at least give us a suggestion or guide to achieve it, we'll be really grateful.
You could use your own php.ini in public_html but would have to configure it and that's not a good idea.
The best thing to do is to use the ISP ini files. This should work for any ISP:
.1 Find out where the ini file for the PHP version you need is located .
The path should be something like /usr/local/phpNN/lib/php.ini where NN is 53, for example.
.2 Login to your site account using (Bash) SSH. You can download Putty to do it, in case you don't have a suitable application.
.3 Copy the corresponding php.ini to your home directory with a command like this one:
cp /usr/local/phpNN/lib/php.ini ~/php.ini
.4 Add this at the end of .htaccess file at /public_html:
AddHandler application/x-httpd-php53 .php
SuPHP_ConfigPath /home/MyAccountName
.5 Confirm the PHP version with this code:
<?php phpinfo(); ?>
Related
I have server on centos system. Has php 7.4, apache version and also laravel project on it. And when i go to my site it gives me blank page. So i think it can't to show php error codes. I need your help.
Although your question lacks adequate information, you can achieve what you desire in two ways.
Via php.ini file
open your php.ini file and look for this line:
display_errors = off and change it to display_errors = on
Via your php file
In your php file just add these lines to the top:
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
Please share some more details of what you actually want to do so i can help you out ...
I was playing around with wordpress on my linux machine, and now I am stuck as when i call the ip address on any browser xxx.xxx.xxx it always gets redirected to xxx.xxx.xxx/wordpress which was a directory below /var/www/html/ where i put all the wordpress files. I must somehow damaged my httpd conf / .htaccess or anything in between. I am not very experienced in those areas, thats why I ask you guys.
How can i disable the permanent addition of a suffix to my systems default url?
Thanks in advance
Is there any Virtual Hosts added to your httpd conf. If yes try removing it
My php script that uploads files in my centos - apache server was working fine.
Today I enabled suphp in server and after that script is not uploading any files.
I was used "php_flag register_globals on" in .htaccess before. But I removed that line from ".htaccess" in order to prevent 500 server error.
Pls help
After a long search and testing, I found the solution myself.
Just created a php.ini file and added a line:
register_global = on
and removed all php flags in .htaccess.
Now its working fine.
As you figured out the parameter has to be in a php.ini file and suPHP has to be instructed to read this file. More information in this answer: php.ini not being read (Debian / ISP Config)
But; If your upload script requires register_globals to be enabled it's probably badly written or outdated. You should try to avoid using register_globals since it poses a security threat. More about that here: What are register_globals in PHP?
I've been trying to get a website up an running on my work's servers using Verio windows server 2003 gold and they've been quite useless when it comes to helping me out.
All I'm trying to do is set up a Wordpress installation, which they apparently require to be in a subdirectory. This is done and I have it in domain.com/wp ready to go. At this point they recommend that I use an .htaccess file to redirect to that url, so as they just sent me basically an "About .htaccess" link, that was of no help.
Did some searching, found a couple options like this one:
http://www.site5.com/blog/apache/htaccess/redirect-to-blog/20090427/
and nothing I use seems to work, not even as a straight redirect. Just gives me a "Directory Listing Denied - This Virtual Directory does not allow contents to be listed."
I do want to mention I did enable URL Rewrite for IIS via ISAPI_Rewrite 3 in the control panel.
As I mentioned Verio support is useless and I can't seem to find anything searching that seems to help my situation.
So pretty much what I need is domain.com/wp to rewrite as domain.com so all links centered around it do the same (ie domain.com/about domain.com/contact)
Any help? Thanks
If I understand you correct you need your Wordpress application to be available from the root of your web site instead of /wp/ folder? Then please try following .htaccess:
RewriteEngine on
RewriteRule ^(?!wp/)(.*) /wp/$1 [NC]
By the way I think you could try simply copying /wp/ folder content to the root folder.
I am newbie for LAMP dev environment. is it possible to change the apache responses with a Linux shell script? Let's assume Browser request www.sam.com/styles/main.css and I want to serve www.sam.com/styles/main_new.css not main.css. I want to do this by using apache or Linux script. is this possible ? (sometimes this may be a silly question :D)
Thanks!
Asoka
You can learn something about url rewrite. And it is not possible to change the apache response by a linux shell.
You can use mod_rewrite.
Create a file named .htaccess in the site root directory with the follow content:
RewriteEngine on
RewriteRule /styles/main.css /styles/main_new.css