jazzman1
Staff Alumni-
Posts
2,713 -
Joined
-
Last visited
-
Days Won
12
Everything posted by jazzman1
-
Why it's too hard for you to add a second email?
-
You need to have "r-read" and "x-execute" permissions to this file to be executable for others group of users like apache for example. Try, chmod 755 /home/wvbadmin/pdf2/index.swish-e I wanted to know if this app was created a special user/group named "swish", but obviously no.
-
Hm...... did you restart apache after changes? /sbin/service httpd restart // as root account Let me see the system permissions to this file, ls -la /home/wvbadmin/pdf2/index.swish-e Can I see the output of: cat /etc/passwd | grep swish // run the string in the console as root account
-
Sorry for the delay, busy day... I'm not sure that the problems is there but try, UserDir pdf2 Did you make some changes in apache conf file before? Why are you using this extension - .swish-e? Does this extension a part of apache options directive is? What language are you using inside this file index.swish-e?
-
I am on CentOS as well. Next step is to login into a shell as apache user and run the same code. Open up the console again, login as root and then change the shell prompt to apache user. I want to check who has permissions therein. [jazz@centos-box ~]$ su -l root password: [root@centos-box ~]# su - apache -s /bin/bash -bash-4.1$ whoami apache -bash-4.1$ php -r 'print_r(glob("/home/wvbadmin/pdf2/*.PDF",true));' If you get all pdfs as in the example above then you'd need to enable the userDir directive in apache conf file, if not I need to see the output of: ls -la /home/wvbadmin/pdf2/
-
What's the host's name? Does it contain any special chars? If the "crio1" directory is in relative path to public_html, try to set absolute path to this file, something like, fopen('ftp://user:pass@server/home/username/public_html/crio1/cRIO01_live.csv', "r") We need to know the absolute path to this directory on the file structure in the remote machine! http://ca2.php.net/manual/en/function.getcwd.php
-
Open up a linux console (as a regular user) and run (copy/paste) the following command. php -r 'print_r(glob("/home/wvbadmin/pdf2/*.pdf",true));' What linux distro is that?
-
You should set permissions of 755 to "/home/wvbadmin/" to let the php parser to read and execute documents/files contained therein. My suggestion is: su -c 'chmod 755 /home/wvbadmin/ -R' or sudo chmod 755 /home/wvbadmin/ -R
-
FTP is a protocol that is created/designed for the transferring of files from a remote location to a local machine, or vice versa. As a file transfer protocol, FTP is only capable of transferring files from one point to another, and some basic file operations, like copying, moving, or deleting files and directories on the remote machine. In your example you're trying to run a command whose is not a part of the ftp protocol. That's why you failed. To be able to run a wide variety of applications or commands on the remote machine using your local one you need to use a different approach like a SSH or vulnerable Telnet network protocol.
-
Everything looks good for me using the script above to my Gmail account. What the content-type of mail headers is, or try to show us some sample of code.
-
Psycho's sql logic is correct for me, just add an IN sql operator. Try, $query = "SELECT injuryreport.*, 0 AS section FROM injuryreport JOIN injurylocations ON injuryreport.injury = injurylocations.location WHERE report='yes' AND injurylocations.general IN ('$general'"); // list of items
-
Some actual errors would help. As for debugging application server's error you need to turn on php error_reporting function, for the mysql server errors use mysql_error() and read up the pink warning message box when you open the link. Use the forum's code [ code ] tags when providing code in the future.
-
You need to send the file or a group of large files "chunking" uploads into small pieces of data and send it to the file server via ajax methods. Plupload and others similar JS libraries can do that for you.
-
Put the following code at top of every file ( template ) where you called a session. ini_set('display_startup_errors',1); ini_set('display_errors',1); error_reporting(-1); You need to set a session_start() to first and second code you're provided above. If you're using one centralized "controler" file that includes all other files you don't have to, but since I don't know how the code is designed i can't tell you much more on that, just check for errors using php error reporting functions.
-
No, everything is just fine. The function name should be quoted as a string parameter - if (function_exists('ftp_connect')), it was my fault. However, I see you get a message of the echo command "Couldn't connect to server", so I thing you might have a filtered ports issue. Try to install some port's scanning tool and check which ports are filtered by your ISP. I cannot recommend you a tool for windows. I'm using nmap on my linux machines, check on the web for a windows packet.
-
where do you set a session_start() for logged in users?
-
This isn't filtered ports issue, if so you could get at least the echo of "Couldn't connect to server". If you are running into a blank page, my best guess is that there is no compiled (or it's not installed) ftp enabled support to this version of php and the directive controls whether or not and where PHP outputs errors is set to "display_errors = Off" in the php conf. file. Try the following, <?php error_reporting(E_ALL); ini_set("display_errors", 1); if (function_exists(ftp_connect)) { echo 'the function is available'; } else { echo 'the function is not available'; } $conn = ftp_connect("ftp2.bom.gov.au"); if (!$conn) { echo "Couldn't connect to server\n"; return 1; } if (ftp_login($conn, "anonymous", "test@example.com")) { // turn passive mode on ftp_pasv($conn, true); $files = ftp_nlist($conn, "anon/gen/radar"); foreach ($files as $file) { print("File: $file\n"); } } "
-
Don't forget to turn passive mode on if the server required. $conn = ftp_connect("ftp2.bom.gov.au"); if (!$conn) { echo "Couldn't connect to server\n"; return 1; } if (ftp_login($conn, "anonymous", "test@example.com")) { // turn passive mode on ftp_pasv($conn, true); $files = ftp_nlist($conn, "anon/gen/radar"); foreach($files as $file) { print("File: $file\n"); } }
-
[jazz@centos-box ~]$ ftp ftp2.bom.gov.au Connected to ftp2.bom.gov.au (134.178.63.130). 220-Welcome to the Bureau of Meteorology FTP service. 220- 220- Disclaimer 220- 220-You accept all risks and responsibility for losses, damages, costs and 220-other consequences resulting directly or indirectly from using this site and 220-any information or material available from it. 220- 220-To the maximum permitted by law, the Bureau of Meteorology excludes all 220-liability to any person arising directly or indirectly from using this 220-site and any information or material available from it. 220- 220-Always Check the Information 220- 220-Information at this site: 220- 220-. is general information provided as part of the Bureau of Meteorology's 220- statutory role in the dissemination of information relating to 220- meteorology. 220-. is subject to the uncertainties of scientific and technical research 220-. may not be accurate, current or complete 220-. is subject to change without notice 220-. is not a substitute for independent professional advice and users 220- should obtain any appropriate professional advice relevant to their 220- particular circumstances 220-. the material on this web site may include the views or recommendations 220- of third parties, which do not necessarily reflect the views of the 220- Bureau of Meteorology or indicate its commitment to a particular course of 220- action. 220 Name (ftp2.bom.gov.au:jazz): anonymous 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> UserName: anonymous Password: your e-mail address Works for me as you can see from the log.
-
The programming is just my hobby Jacques
-
PUT method? I've not heard of it more than 13 years ago when Java was on top of the world. Is it a Java application?
-
Display information results from my multi drop down menus
jazzman1 replied to adandy's topic in Javascript Help
First check if the form is submitted, second if the values of the form elements are correct,third send the values in the database. To do this you need to have some javascript debugging tool. -
My suggestion would be to hire some programmer to replace the old mysql_* library to mysqli_* or pdo_mysql and fixing the issue with sql injection. For the question above it could be much more secure to escape the value in sql statement before to call mysql_query function. $var = 1; $query = sprintf("SELECT p.id as parentID, p.name as parentName, p.description, p.logo as parentLogo, p.parent, p.active FROM com_catalogue_category p LEFT JOIN com_catalogue_category c ON (c.id = p.parent) WHERE p.id = %u", intval($var)); function dbQuery ($query) { $result = mysql_query($query); return $result; } There is a ton of examples on the web how to prevent a sql injection in php using the mysql server.
-
A credential is a record that contains the authentication information (credentials) such as a server address, username, password etc... required to connect to a resource outside MySQL.
-
Yes, of course, just mask your database credentials when posting your script. Also, use the forum's [ code ] code tags when providing code.