No XHProf runs specified in the URL - drupal-6

I have configured XHProf on linux server but on accessing xhprof_html/index.php, instead of displaying logged slow queries, it just displays this "No XHProf runs specified in the URL." What does this refer to?

Seems to me that you were trying to reach the index.php file with ?run= query parameter set to something.
In order to really list the runs, it should be accessed without any arguments. The profiling files are usually stored in the system temporary directory, usually /tmp on Linux.

Related

Run Buffer(.exe) without writing files in Nodejs

Suppose I had a console app in the terminal I created using C language, shouting "Hello world!"
The program is called hello.exe.
I upload hello.exe to static server.
Now I can download the file by typing the following address in the chrome.
http://localhost:8080/hello.exe
Or I can get a Blob object using the http method in Nodejs.
Is there a way to run this obtained Blob object right away without making a file? And get string Hello world!
No similar topics were found.
Do I need to create and run the file and erase it right away?
I want is for the files to run and not remain on my PC.
I'm not aware of any way to run an .exe file without first putting it on disk. You would essentially need to write your own exe loader that worked from memory instead of disk and that would be no small effort.
Keep in mind that a client that just automatically runs some executable it gets from a URL like http://somedomain.com/hello.exe without any user intervention could be a very dangerous client as rogue web servers could send it any arbitrary executable that did all sorts of harm (viruses, ransom-ware, etc...).
Do I need to create and run the file and erase it right away?
Yes, erase it after the program is done running.
I want is for the files to run and not remain on my PC.
You will just have to clean it up at some point after it has run. If you have a programmatic client, it should be no big deal to put the file in an application-level temporary directory that your app can regular clean up. If this is from a browser, then he user controls where the file goes on disk and the user controls when it gets deleted - you can't manage that yourself from within a webpage.
Or I can get a Blob object using the http method in Nodejs.
You can download a binary. Not sure exactly what you're asking here.

Informatica creates a zero byte file and then can't write to same file

I have an Informatica workflow that is supposed to generate a .dat file.
The issues is that the wroflow creates a 0 byte file, but then can not write to the file it JUST created. It's baffling.
The target directory is a linux server, and there is a developer on our team that is able to run the workflow just fine, without this file-writing issue.
However, I have checked with our linux admins and several of them have confiremd that there is no major difference in access/permissions between her linux ID and my own. She is in two more user groups than I am, but I have been told that they would not have anything to do with this issue.
The ID used by the connection object is also in the same user group as my id on the linux server, enduser. Therefore it should be able to write to my home directory.
The workaround we have devised is to remove the files using my id, touch the files and then chmod them. This allows the id used by the Informatica connection object to write to the files, but it is not a permanent (or correct) fix.
My best guess is that this is most likely some sort of (very obscure) Linux environment issue.
I am also not able to make any changes to the Informatica workflow or mapping, since it is built correctly and this issue appears to be completely local to certain linux user ID's.
Does the etluser have write permissions? have you tried running a post session command script for chmod and giving full permissions and then writing into the file?

retrieving files from NAS linux network in PHP

I'm working on a php project where a particular feature will have to access the files stored from an external directory:Network Attached Storage(linux). Lets say the path is /volume1/accounts and this is mounted in the linux server where my site is hosted using apache. I will have to retrieve files from that directory. is there a way in PHP to do that? My client says that its already been mounted.
No matter what I do I cant access using these test codes
print "<pre>".print_r(scandir("/volume1/accounts/"), true)."</pre>";
print "<pre>".print_r(scandir("192.168.0.233/volume1/accounts"), true)."</pre>";
print "<pre>".print_r(scandir("192.168.0.233:/volume1/accounts"), true)."</pre>";
How am I suppose to do it? Please help me.
Generally, PHP engine is executed with apache server's privileges. So mounted directory has no permissions or ownership for apache server, It'll be not able to show file lists. Could you try to make directory on /volume1/accounts/ and change ownership and permissions? If apache server is working with apache:apache ownership, please change ownership of directory as same.

linux hosting permissions shared server

What is the actual difference between executable and read permissions on a shared linux server, meaning, how exactly does that relate to what a web visitor can do with, for example a php file? Using godaddy shared hosting, for example, under basic permissions, if web user is not readable, but is executable, the same thing happens as when it is readable but not executable - the php file executes. Also, on a shared linux server, what exactly does making a file writable for web user- someone who doesn't have access to server login but visits the page through a browser do?
The basic answer is: nothing. Visitors to a website aren't directly accessing any of the files, PHP or otherwise. They send an HTTP request to the server service (wow, that's terrible wording) on the computer (e.g.: Apache), which then loads the page, executes the PHP, etc. So when you're changing permissions, the pertinent permissions to change are what permissions the Apache account (which, depending on the distro, can be either nobody or www-data) has on those files. As for what the permissions actually do, this Wikipedia page describes it quite well.
You can test this yourself if you have a Linux box. Take a directory with files in it and sudo chmod -R 744 it. Then, try to ls -l into it. You'll be able to see file names, but not any other information about the file (including the contents - nanoing any file in that directory will result in creating a new file).
You have to remember that all this relies on what the web server wants to do, since everything has to go through the web server. It's not like reading a file from a disk. So when you request "index.php" or "index.cgi", you are not reading the contents of the file. The web server will see that the file you're requesting is a program, and it will run the program. Instead of outputting the contents of the file, it will output whatever the program outputs. This is simply a setting, and has nothing to do with permissions. Also, you do not have the ability to change this setting if you're using a shared hosting account.
on a shared linux server, what exactly does making a file writable [...] do?
You can't make a file "writable" with HTTP. Again, this is not like accessing a file system on a local drive. You can make a server-side program that can handle file uploads, but again, this is has nothing to do with permissions.
I hope this is what you meant. Let me know if you meant something else.

Coldfusion security issue...how to hide directory of files?

So, I decided to try to break my website...I googled my site by typing in site:mysite.com/whatever and behold, all of the users uploaded files were available for view under a specific directory.
What kind of script/ counter measure should I use to block these files from being viewed? I already have a script that checks the path and the logged in status, however this doesn't seem to be working. I've looked all over for solutions...but I can't quite find one. I'm using ColdFusion 8.
This isn't a ColdFusion issue so much as a web server configuration issue.
You should either:
configure your web server not to show a directory of files when using a URL without a filename (e.g., http://www.example.com/files/)
drop a blank default web document (index.html, index.htm, default.htm, index.cfm, whatever) into that directory so that it displays that document rather than the list of files. If you use index.cfm, it'll fire your Application.cfm/cfc in your file path and use whatever other security you've built.
(or, better, do both)
The best way to secure your file listings and the files themselves is to store them in another folder outside of the Web site root folder. You can then serve them up using CFDIRECTORY and CFCONTENT. The pages that display the files can check your access controls and only serve the files to those allowed to see them.

Resources