cakephp: warning 512 /tmp/cache/ not writable on shared host justhost - cakephp

When I go to www.merryflowers.com/webroot/ i'm getting the following warnings. Based on the guidance i got from my previous post (cakephp: configuring cakephp on shared host justhost), I right clicked on the app/tmp/ (on the remote server) and all the folders within that and set the permission to be writable (ie. 777). But I'm still getting the same warnings.
Since i'm using windows 7 (chmod doesn't work), I also tried CACLS on the command prompt for tmp folder. Since i'm not familiar with CACLS, i don't know the exact command to make tmp writable to all. Can someone please help me out. Thank you.
Warning (512): /home/aquinto1/public_html/merryflowers.com/tmp/cache/ is not writable [CORE/cake/libs/cache/file.php, line 278].php, line 429
Warning (512): /models/ is not writable [CORE/cake/libs/cache/file.php, line 278]
Warning (512): /persistent/ is not writable [CORE/cake/libs/cache/file.php, line 278]

Is your site hosted locally on your Windows machine, like through XAMPP or WAMP, etc? Those are *nix paths, not Windows paths.
Did you FTP to your sites - like, with an FTP client - and change the permissions? Doing this through FTP clients isn't always 100% reliable. It looks like you changed the perms on /tmp, but they didn't cascade to /tmp/cache, etc. like you thought. Try setting them all one by one.
According to your other post - cakephp: configuring cakephp on shared host justhost - your site is set up with remote hosting. I looked at their service briefly, from the looks of them, you can probably remote (aka, "shell" or "ssh") into your server and get access to the command line. A lot of webhosts provide this these days, although you may have to specifically request they enable it for you.
On a Windows machine, you can use PuTTY to shell into your remote server: http://www.chiark.greenend.org.uk/~sgtatham/putty/
HTH. :)

Related

SQLAlchemy/pgAdmin: Error: password authentication failed for user "root"

I'm conducting a study and I need to store some data. I found an open source data scraper and parser online: https://github.com/hicsail/materials
I've followed some instructions (some of which but not all came from here) and
installed Postgres, created a docker-compose.yml file, and created a config file:
Above is the config file, and this is the .yml file
I started by going into the pgAdmin folder and running "docker-compose up", after which, this was the result:
I'm not sure if the "no privileges flag" means anything. Anyway, after this, I opened up a localhost:5050 in my browser and logged into pgAdmin.
I named the database "materials" as this was what it was supposed to be named.
Same thing with the username and password; both were named "root". However, when I run the command to parse the data, I'm getting this error:
I've been stuck on this for a long time now, and I can't seem to find any solution. This is running in a python2.7 conda environment, as per the requirements. These were the other installed libraries (I'm not 100% sure those were the exact versions, but I tried to get them as close as possible).
psycopg2==2.7.3.1
requests>=2.20.0
SQLAlchemy==1.0.9
wheel==0.24.0
If I need to clarify anything please let me know.
Thanks.
I found an answer for this. I had to go into services, then to postgres, and stop it from running. I then had to kill the port "5432" and run it again.

Xdebug remote debugging

I have been trying very hard to get xdebug working. Tens of hours have been spent but still not making much progress. I think that is because there are some basic concepts being not very clear to me. One of them is "remote debugging".
Let's say I have a remote php file in VPS, if I download it and xdebug it, how does the IDE know the local file is a copy of the remote one? Can someone describe what happens when xdebugging?
What I guess is: after setting the remote port in IDE and setting browser, when I open the PHP file in the browser, when a breakpoint is reached, the IDE will establish some connection with the server and display the remote file's content in the editor. Now I can watch variables, step running functions etc, and any change I make to the file will be saved to the remote server. Is this understanding correct?
when I open the PHP file in the browser, when a breakpoint is reached, the IDE will establish some connection with the server and display the remote file's content in the editor
That is not correct. The IDE does not establish the connection, but Xdebug/PHP does. The IDE acts like a server and listens for incoming debugging connections.
You don't mention which IDE you use, but most of them will allow you to setup a "path" mapping. Such a mapping tells the IDE how to map remote paths (the ones that PHP and Xdebug see), to the ones on your local system (the ones your IDE sees).
PHP Storm should ask you for a mapping if it can't find a file for example, but otherwise you can configure them yourself in File -> Settings -> Build, Execution, Deployment -> Deployment and then the "Mappings" tab.
Other IDEs do it in other ways, but all IDEs (except Komodo) need to have the files locally available. Please note that the protocol does support only having the files remotely, but only the Komodo editor knows how to deal with that. PHP Storm does not yet.

pnp4nagios not logging performance data for new host

We've just updated Nagios from 3.5.x to the current version (4.0.7) and subsequently added a new host for monitoring.
The new host shows as 'Down' in Nagios, and this seems to be related to the fact that pnp4nagios is not logging performance data (the individual checks for users, http etc are all find).
Initially there was an error that the directory
/usr/local/pnp4nagios/var/perfdata/newhost.com
that contains the xml setup and rrd files for the new host was missing), so I manually created this directory, but now it complains that the files are missing.
Does anyone know the appropriate steps to overcome this issue?
Thanks,
Toby
PS I'd tag this 'pnp4nagios', but that tag doesn't exist and I can't create them
UPDATE
It's possible that pnp4nagios is a red herring/symptom. Looking more closely I realise that Nagios actually believes the host is down, even though all services are up. The host status information is '(Host check timed out after 30.01 seconds)'...does this make any more sense?
It's indeed very unlikely that pnp4nagios has something to do with your host being down. pnp actually exports output and performance data to feed the rrd database and xml files (via npcd module or evenhandler command).
The fact that nagios reports the host check timed out after 30 sec means that :
- you have a problem with your host check command, please double-check the syntax
- this check command times out after a certain timelapse (most likely defined in nagios.conf) because the plugin was still running.
I'd recommend running this command from the server's prompt. You want to do something like :
/path/to/libexec/check_command -H ipaddress -args
For example:
/usr/local/libexec/nagios/check_ping -H 192.168.1.1 -w 200,40% -c 500,80% -timeout 120
See if something might be hanging. Having the output would be helpful.
Once your host check returns correct output and performance data to nagios, pnp will hopefuly do the rest.
In the unlikely event it helps anyone, pnp4nagios was indeed a red herring. The problem was that ping wasn't enabled for the host being checked, and this is the test for whether a host is up or not. Hence this was failing, despite other services being reported as working.

Hosting Multiple Domains on Same Server Port with Apache2

How do I configure Apache2 via webmin or command-line (I'm using RHEL5 Linux) so that I can have multiple domains on the same server on the same port but in different subdirectories?
For instance, trying to get homerentals.ws and homerepair.ws to be detected on port 80 (default port) on the same server. I know that my DNS holds the two addresses and web hits currently go to the same test page. Now all I need is for web hits to go to a subdirectory, but not show this subdirectory. For instance, I do not want people going to http://homerentals.ws and being redirected back to http://homerentals.ws/homerentals/. Instead, http://homerentals.ws would go to /var/www/html/homerentals, while http://homerepair.ws would go to var/www/html/homerepair, but would not look any differently in the URL.
On IIS, I did this once with host-header detection. But I don't know how to do it on RHEL5 Linux via webmin or file editing. I'm stuck.
The feature you're describing is known as virtual hosts. Have a look at Apache's documentation. In general you need to edit /etc/apache2/httpd.conf file to make things happen (maybe it can be edited through webmin, but I'm not familiar with it).

How do I turn SQL logging on in Postgres 8.2?

I've got the following settings in my postgres conf:
log_destination = 'stderr'
redirect_stderr = on
log_directory = '/tmp/psqlog'
log_statement = 'all'
And yet no logs are logged. What am I missing here? There is reference on the internet to a variable called "logging_collector", but when I try and set that, postgres dies on startup with a FATAL: unknown variable.
This is on MacOS 10.4.
Ta.
I believe that you need to change log_destination to "syslog" or a specific directory. Output that goes to stderr will just get tossed out. Here's the link to the doc page, but I'll see if I can find an example postgresql.conf somewhere http://www.postgresql.org/docs/8.2/static/runtime-config-logging.html
This mailing list entry provides some info on setting up logging with syslog http://archives.postgresql.org/pgsql-admin/2004-03/msg00381.php
Also, if you're building postgres from source, you might have better luck using a os x package from Fink or MacPorts. Doing all of the configuration yourself can be tricky for beginners, but the packages normally give you a good base to work from.

Resources