Upgrade shows error

Hi all,



I’m trying to update my cs-cart to 2.1.4 from 2.1.3 and get the following error about a million times:



Warning: file_put_contents() [function.file-put-contents]: Filename cannot be empty in /home/website/public_html/core/fn.log.php on line 268



Anyone knows what this could be? Permissions?



Thanks!

It seems like a files/directories permission problem.



If your server uses suPHP or FastCGI then the file permissions should be as below:



all files = 644

all directories = 755



Otherwise: [url]https://www.cs-cart.com/installation.html[/url]

There is a class called ‘logger’. If it is not properly initialized before use (I.e. setting the path/filename of the logfile) then $this->logfile will be empty and the subsequent file_put_contents($this->logfile, $data, FILE_APPEND) will generate the error.



Apparently the upgrade uses this class. It should be initializing the logfile to var/upgrade/upgrade.log.



I don’t think it’s a permissions issue based on the message. It seems that the logfile name is not being initialized. Did you see a notification about the log file not being writeable?

first of all, thanks for the help.



I also don’t think it’s a permission problem… I’m running PHP as an Apache module and my permissions should be correct.



I did not see a notification about the log file not being writeable… this is the only error I get…



Update: fixed this by changing the permissions of the upgrade.log file. It was on 644. Strange thing is, I renamed it… upgraded and it wrote a new upgrade.log with again 644 permissions.

The gremlins are back… Oops, that’s another movie!

Flow,



Check the following code near the bottom of config.local.php to ensure it contains the proper permission variables that are compatible with your server environment.



If using mod_php it should be as below

```php // Default permissions for newly created files and directories

define(‘DEFAULT_FILE_PERMISSIONS’, 0666);

define(‘DEFAULT_DIR_PERMISSIONS’, 0777); ```



If using suPHP or fCGI it should be

```php // Default permissions for newly created files and directories

define(‘DEFAULT_FILE_PERMISSIONS’, 0644);

define(‘DEFAULT_DIR_PERMISSIONS’, 0755); ```










[quote name=‘Flow’]first of all, thanks for the help.



I also don’t think it’s a permission problem… I’m running PHP as an Apache module and my permissions should be correct.



I did not see a notification about the log file not being writeable… this is the only error I get…



Update: fixed this by changing the permissions of the upgrade.log file. It was on 644. Strange thing is, I renamed it… upgraded and it wrote a new upgrade.log with again 644 permissions.[/QUOTE]