Fixing PDO Exception on Bake - cakephp

I've just created a new project and I'm trying to bake my tables. I've added the database config information to the config/app file and MySQL is running. When I run bake i get the following error:
Exception: SQLSTATE[HY000] [2002] No such file or directory in
[/Users/Marcus/PhPStormProjects/comet_mobile/vendor/cakephp/cakephp/src/Database/Driver/PDODriverTrait.php, line 48]
Can anyone tell me what this is referring to or how to fix it?

Related

SnowSQL - Getting permission denied error

I'm kinda new to SnowFlake. I've installed SnowSQL but when I'm trying to launch it's throwing the below error: I guess some issue in the config which I'm unable to figure out. Please advise!
PermissionError: [WinError 5] Access is denied: '%USERPROFILE%'
[27056] Failed to execute script bootstrap
It looks like the configuration​ options log_file and log_bootstrap_file also point to the %userprofile% directory by default. Maybe set those to the network location too? You can do this by putting the options in the config file or using the -o flag when calling the CLI as described here: https://docs.snowflake.net/manuals/user-guide/snowsql-config.html#snowsql-config-file

Jenkins: File not found exception

I am trying to load a file from a repository I checked out. I am getting this error:
new File( iFilePath )
Err: Build failed with Error: java.io.FileNotFoundException: Y:\Jenkins\workspace\TestBuilds\Matlab\m\Contents.m (The system cannot find the path specified)
This is explained because Jenkins try to look for the file on the master. While the file is actually located on the slave agent.
Any way to get around this ?
Check out this answer: https://stackoverflow.com/a/42018578/3486967
I don't think you can use the File class on anything but the Jenkins master; try using the FilePath class

sybase iq - "operation failed on file due to file permission"

I'm trying to get to a local file from sybase iq.
My code to connect to my file is like this:
USNIG CLIENT FILE 'C://TEMP/A.TXT'
If i run it on iq workspace it's working perfectly.
If i run this query via a service.cs it's not working and i get error:
ERROR [HY000] "operation failed on file due to file permission FILE: C://TEMP/A.TXT
i tried to find an answer via google but nothing...
the DSN is ok.
Any idea what to do?
Thanks!

The following error occurred while opening the file '\\?\E:\TempDB\MDTempStore_1584_1_j1pv2.tmp': Access is denied

I'm trying to start a fresh install of TFS 2013 but running into the issue TF255356: The following error occurred when configuring the Team Foundation databases: TF400711: Error occurred while executing servicing step Create Warehouse for component InstallWarehouse during Install: Create Analysis Database schema failed: Error generating Analysis Database: File system error: The following error occurred while opening the file '\?\E:\TempDB\MDTempStore_1584_1_j1pv2.tmp': Access is denied.
I have tried to remove the read-only flag from the tempdb folder but it keeps getting set to true after applying the change. I have also added the registry entry UseSystemForSystemFolders which allows read-only to be removed from the folder but it does not persist.
Any help with this would be great
Thanks
Chris

How to deploy CakePHP-application on CentOS?

I almost managed to deploy a CakePHP-application on CentOS-server, but it still needs little configuration. I have enabled mod_rewrite in /etc/httpd/conf/httpd.conf and restarted apache-server.
Then I have put Cake core library in /home/user/cakephp-core/
I get message "500 internal error" when i try to go to this page through web-browser.
In apache-logs I found following messages:
PHP Warning: include(/$HOME/cakephp-core/lib/Cake/bootstrap.php): failed to open stream: Permission denied in /srv/www/site/public_html/main/index.php on line 96
PHP Warning: include(): Failed opening '/$HOME/cakephp-core/lib/Cake/bootstrap.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /srv/www/site/public_html/main/index.php on line 96
PHP Fatal error: CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your /cake core directory and your /vendors root directory. in /srv/www/site/public_html/main/index.php on line 101
it says something about "permission denied"... to whom I should give permissions and where? I gave "apache:apache" to tmp/-folder... Any ideas?
Simply read the log and try to understand it.
It pretty clearly tells you what has insufficient permissions. The linux command to set permissions is chmod. You also want to make sure, as the text already tells you, that your CakePHP core include path is correct. Double check that too.

Resources