I'm trying to build up a new project with Symfony1.4.
I'm not new to Symfony but today I faced with a new problem, never seen before.
When trying to run
php symfony doctrine:build-schema
i revieve this error
Warning: mkdir(): SAFE MODE Restriction in effect. The script whose uid is 10045
is not allowed to access /tmp owned by uid 0 in /var/www/vhosts/my site.it/httpdocs/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/
doctrine/Doctrine/Lib.php on line 292
So, my question is, how can I solve this problem?
It seems that doctrine save a temporary file in /tmp dir, where I cannot access.
Can I maybe change it somewhere?
Yes. The error seems to be occurring because Symfony is trying to create a directory and it's incapable of doing so because of permissions.
If you open
/var/www/vhosts/mysite.it/httpdocs/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Lib.php
You can see this line of code on 292
return mkdir(trim($path), $mode, true);
$path contains the path to a directory that Doctrine is trying to unsuccessfully generate. It could be your mysite.it\httpdocs\data directory where the fixtures or schema.yml is kept.
Try doing a die(var_dump($path)); just before the above line to see what the path of the directory is. Then you might need to physically create it yourself on the file system.
Related
I am trying to move my location on disk of a Bolt.cm install. Config.yml doesnt have any details of location.
When I rename the directory I receive app config issues as well as this :
Fatal error: Uncaught exception 'Bolt\Exception\LowLevelDatabaseException
Thrown from within Bolt. Seems like I need to update a config file but I don't see one with the path do web root or path to database stored.
Does such a file exist?
You need to flush the cache.
This can be done from the command line by:
php app/nut cache:clear
Or inside app/cache/ you will find the file config_cache.php that can be safely deleted.
I am in a serious problem while installing mysql on ubuntu 12.04 32 bit. when i start mysql with command ''./mysql.server start'' I got this error Manager of pid file quit without updating pid file. I installed ''mysql-5.1.39-linux-i686-glibc23''.
I thoroughly search for the solution to fix this error but cannot resolve it yet. I copied my-medium.cnf file to the /etc directory and rename it by my.cnf also edited this file in the section ''The mysql Server'' and add these lines ''datadir = /exports/disk0/data'' but could fix this problem. Can any one help on this.
The message bout the pid file is kind of a red herring. It just means that the init script /etc/init.d/mysql did not return success. The root cause could be a variety of things, for example file permissions problems in your datadir, or the config file contained an invalid line, or dozens of other possible problems.
When you get the error about the pid file, the first thing you should do is to go read the MySQL error log file. Usually this is in the data directory, and it may be called hostname.err (where "hostname" is the name of the server you installed MySQL).
Search the file for any lines reporting "ERROR" and then use Google to research the error.
I'm trying to use the dbext vim plugin to connect to a MySQL database.
When I give commands like <Leader>se I get an error:
Can't open file
/var/folders/b3/s3wyytf90_ld113h1w3p86ldcg4glv/T/vQ0XMX3/7
That file doesn't exist. But the SQL I expect to be executed does exist in:
/var/folders/b3/s3wyytf90_ld113h1w3p86ldcg4glv/T/vQ0XMX3/dbext.sql
So it looks as if the plugin is writing a temp file in one location and looking for it in another.
I'm sure the plugin can't be broken and I must have done something wrong, but I don't know enough Vimscript to follow it through.
I have Vim v7.3, dbext 20.00 and have just installed by unzipping the plugin zip into my .vim directory.
I've used
:DBPromptForBufferParameters
to set up my connection parameters.
The full error looks like:
dbext: Executing SQL at 13:54
Error detected while processing function dbext#DB_execSql..dbext#DB_execFuncTypeWCheck..<SNR>42_DB_MYSQL_execSql..<SNR>42_DB_runCmd:
line 24:
E484: Can't open file /var/folders/b3/s3wyytf90_ld113h1w3p86ldcg4glv/T/v0BN3Qw/7
Press ENTER or type command to continue
Can anyone point me in the right direction to resolve this?
Edit: I've since tried an install into an empty .vim directory, with all of my other config and plugins removed, so I don't think that it's a case of conflicting configuration.
I'm running MacOSX, in case it's relevant.
Dumb mistake on my part.
I was supplying a bare password which needed to be quoted in this context due to a special character.
I'm now quoting the password when prompted for it by :DBPromptForBufferParameters and everything is working.
I am running a fresh install of XAMPP 1.8.2 for OSX and am currently trying to upload an exported database that is 171kb in size.
Getting hit with this error
Warning: File upload error - unable to create a temporary file in Unknown on line 0
From what I have discovered it may have something to do with write permissions to a /tmp file which doesn't seem to exist on my system.
Trying to set this up so I can make changes locally on a clients website without breaking the live site.
Cheers and thanks for taking a look.
Solved
within the file uploads section of your php.ini there resides this:
;upload_tmp_dir =
To allow for uploads uncomment and give the tmp dir a home:
upload_tmp_dir = "/tmp"
The the most recent default installation of XAMPP on Lion has a couple of very important lines commented out (in regards to phpmyadmin/mysql). Not sure why, but I would love to learn the reasoning behind it.
I am trying to read and write into app.config file of user-settings. I found a snippet of a code for working with confige file. I finally got it compiling and running, but it absolutely seems to be doing nothing to the App.config file.
Here is the code:
Method MainForm1.Button1.Click(sender: System.Object; e: System.EventArgs);
var
config : System.Configuration.Configuration;
begin
config:=ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings.Add('PreferenceToRemember','value1');
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection('appSettings');
end;
It is compiling without any errors, but I don't know if it is doing anything.
Is there anything wrong with the code? I need to be able to write/read a section and write/read a key/value. Thanks in advance.
UPDATE: Instead of using ConfigurationManager, I simply use Properties.Settings.Default. However, I am having bit of a problem writing into it and reading back from it, although program complies with without any errors and the code seems simple.
How do you read and write to Properties.Settings.Default from within your code?
Maybe you're looking at the wrong file?
The app.config you have in your solution will be copied to YourProgramFile.exe.config in the bin/Debug or bin/Release folder. When running your program it will update this file, not the app.config file in your solution.
Then perhaps you also should check write permissions on your application folder. Normally (Win Vista, Win 7) the User executing an application does not have write permissions in the Program Files folder where your application should reside, so updating the .config will most probably fail due to the lack of write permissions. This is even more true for Linux/Unix systems.
You should try to separate the elements you need to write and write an additional config file in a user-specific folder. You can take the defaults from the normal application config for that initially and just update the user-specific config file, this way you are not hindered by file permissions and every user can update their settings specifically.