tmp_path error after launching from localhost - joomla

I did a Joomla3 project in localhost and I launched the website (hosted to a server) today. After I launch now I can’t install any extensions it gives “Path to Temp Folder” error. In Global configuration >> server I changed the path. But still not installing. What paths should I change after launching the website from localhost ?

Try this,
check your configuration.php under root.
Set the log_path and tmp_path
public $log_path = '/home/your_path/public_html/logs';
public $tmp_path = '/home/your_path/public_html/tmp';
Make sure you're changed the file permission before editing.
Hope its works..

Related

Codeigniter 4.0.4 redirecting to 404 - File Not Found

Why I got 404 - File Not Found when I run CI.
I am using xampp 8.0.0, I already put my CI folder to htdocs and also I've changed the config/app baseurl to http://localhost/framework-4.0.4/.
When I open it to browswer and click public it just redirected to 404.
enter image description here
You should setup a virtual host in your xampp for your project.
To do that for this codeigniter projects, open the the Apache httpd-vhosts.conf file which are located in C:\xampp\apache\conf\extra\httpd-vhosts.conf, Added below lines of code at the end of the file.
using the example codeigniter-blog.local
DocumentRoot "C:/xampp/htdocs/framework-4.0.4/public"
ServerName codeigniter-blog.local
Now, Open the hosts file which are located at C:\Windows\System32\drivers\etc\hosts, Added below code into this file at the end.
127.0.0.1 codeigniter-blog.local
restart the xampp server.
If you open the browser and navigate http://codeigniter-blog.local, if you are getting welcome page, that means everything fine otherwise you'll get intl package is not enabled.

Forbidden You don't have permission to access {codeigniter} on this server

I am trying to run CodeIgniter for the first time. I have a running apache2 server on my machine. I downloaded CodeIgniter and copy extracted folder it into /var/www/html folder. Also, I set baseUrl config in CodeIgniter
$config['base_url'] = 'http://localhost/codeIgniter';
But I am getting
Forbidden
You don't have permission to access /codeIgniter/ on this server.
I tried setting .htaccess file but couldn't fix the issue. what is the solution for this issue?
This is a pretty vague question but here are some trouble shooting things.
In the HTML folder do: chown -R www-data:www-data nameOfProject.
Also did you set up everything in your apache/sites-available and sites-enabled. Also set up your host file
If this doesn't work just google setting up a ci project.
The reason you had to chown it was to allow appache to access it

'Unable to open WampServer's config file, please change path in index.php file' not opening localhost in browser

Recently I've been using WAMP server for my project. But due to some reason I need to switch to XAAMP server, so I uninstalled WAMP server and installed XAAMP server.
But when I open localhost in my browser it says:
Unable to open WampServer's config file, please change path in index.php file
What might be the problem?
I had the same problem - check your www folder - delete index.php
Edit: The index.php is an unnecessary default home page for Wamp server which will cause the error when running from an XAAMP htdocs folder. In other words, your localhost is working, you've just got an index.php file from the old WAMP install.
you can edit your index.php and if you move it from one place to another, just change it like this:
$wampConfFile = 'c:/wamp/wampmanager.conf';
$aliasDir = 'c:/wamp/alias/';
$vhostsDir = 'c:/wamp/vhosts/';
I got this same error today. I realized I had uploaded my main's localhost index.php instead of the one in my webpage's folder.
So just make sure you're pointing at your correct localhost folder before uploading the index.php. Problem solved!

local php.ini sessions.save_path issue - sessions not recognised

I have a client who is running a user management script. The host provider had blocked allow_url_fopen but is using suPHP so we created a local copy of php.ini with allow_url_fopen set to "on".
The only problem now is that you can no longer login to using the script - it says 'success logging you in' - then logs you right out (because the sessions are either not getting created or are in the wrong place - excuse my lack server knowledge).
Here are the settings in the local php.ini
upload_tmp_dir = "/home/aspac124/public_html/tmp"
register_globals = On
memory_limit = 256M
session.save_path = "/home/aspac124/public_html/tmp"
safe_mode = off
upload_max_filesize = 32M
allow_url_fopen = On
zend_extension = "/usr/local/IonCube/ioncube_loader_lin_5.3.so"
I'm not sure why the hosting provider turned register_globals on for the client. But is that the correct place for the session.save_path? I've checked and the folder exists and I also set it to 777 just to make sure but no happiness.
Another client using the same system had a similar issue and told me he changed the tmp/ folder to his home directory and everything was fine.
I've tried to put the save path as just /tmp, /home/aspac124/tmp and nothing happens - just get logged out as normal. If I make up a path then I get a "No such file or directory" error.
When I put it as "/home/tmp" I get the following message
Warning: session_start() [function.session-start]: open(/home/tmp/sess_4417d180e599b5f12fc34a28f5467d21, O_RDWR) failed: Permission denied (13) in /home/aspac124/public_html/domainnamehere.com/includes/lightwork_session.php on line 45
What does this mean, is the home/tmp the correct place for this and if so what should I do - should the folder permissions be changed?
edit: I don't have access to folders outside the domain root so cannot change the file permissions - have to wait for the client but would like as much info before then.
Thanks in advance
EDIT: Just for anyone reading this. Please make sure your local php.ini file settings are applied to any sub folder that may require it. I was making ajax requests to a file in a sub folder to the root and this was the issue.
You should place your session and upload directories outside of the document root otherwise these will be accessible by anyone and can result in remote script injection, session hijacking etc.
You should perhaps create a tmp directory as /home/aspac124/tmp and set the permissions so Apache can write to this directory. Perhaps set the chmod to 0760.

Codeigniter not creating any log files

Under config.php I have:
$config['log_threshold'] = 4;
$config['log_path'] = '/home/myaccount/logFilesFolder';
In index.php I have:
error_reporting(E_ALL);
The only way I can seem to get anything to log is if I chmod that directory to rwx (777), which doesn't seem right to me. That and it doesn't see to be logging all the errors.
In my local/dev environment it seems to be working but on my production server nothing is being logged. I can't seem to figure out why.
The log filename in the configuration settings needs a trailing "/" above making sure the webserver process has writeable access to the directory.
Change the logs owner and group to what owner/group your live web server is running, give it write perms and it should work. I take it that in your local/dev server your CI folder is owned by you that is why you need to chmod it to 777 to make it work.
The directory where you want the log files to be saved needs to be writable.
I have tried a lot of solutions and finally what worked for me was this:
Open system/libraries/Log.php
and change the following lines;
set the value of: $this->log_path to a writable directory, preferably home directory so that there are no permission issues. If you want to change the filename also, search for the variable $filepath and change the name.
Example:
$this->log_path = '/log';
touch /log/
restart the webserver.
The logs will start coming.
I have tried a lot of other options, none worked, this is not neat approach but at least I can see my logs now.
I had the same problem with my Codeigniter 4 project. The log was created successfully in my local window machine but was not creating on the remote Linux machine. I was using a custom path to generate log files under the 'app' folder. So what I did is to change the settings in my config/Logger.php file back to
'path' => WRITEPATH.'logs/',
and it created the log files under writeable/logs folder.

Resources