User Runs PHP
I have an app that uses PDFLib to read some images off the file system (Red Hat linux) and puts them into a PDF. I have permissions set on the directory to be readable by the owner and the group, 'images'.
I made apache a member of the group 'images' but get a permission denied error when trying to read an image from the images directory. Is there some other user that owns the PHP app.
Env.
PHP 5.03
Red Hat ES4
Apache 2.02
View Complete Forum Thread with Replies
Related Forum Messages:
PHP Only Runs From Command Line
I know very little about PHP, but I was just curious to know why exactly would some PHP code run fine from the command line but not from the browser? I'm just curious. I was working with someone else's PHP code that supposedly created MySQL tables in a database and for some reason it just wouldn't create the tables at all (no specific error message). Someone suggested I run from the command line and when I did, it worked...
View Replies !
Bad Query Runs With No Error!
there must be some weird setting on the mysql database i am using for this latest project. the following query runs without throwing an error: SELECT start_time, last_access_time, user_ip session_data FROM demo_sessions WHERE id='b31fd40c7e9135f2b52e4f17c23fc3c54da137b8' notice there is no comma between user_ip and session_data what's the story here? seems like a real security risk to me because my server won't log bad requests.
View Replies !
Why Script Runs Differently With CRON?
I am running a PHP Script that downloads my RSS News (and the accompanying Thumbnail images)from the Web. When I execute it from CMD line, no problem. The News and Images are downloaded, great! When I begin to update via CRON, no images are downloaded/written to disk.--I don't have this problem when it's RUN from a shared hosting account, it's only on my home Linux Box.
View Replies !
Bug 23891 MySQL Runs Out Of Connections
http://bugs.php.net/bug.php?id=23891 According to this report, what the person was asking isn't a bug, it's a feature (rimshot). I'm running into this problem almost exactly, and really don't understand what the answer is. The support person snidely suggests reading the manual, which is always great advice, but in this case really doesn't help out. Could someone explain what "If you use mysql_select_db() or slightly different connection string you can have more open connections then you have process." means? If I don't use mysql_select_db, then what do I use?
View Replies !
EXEC() Runs Process In Background
Exec, shell_exec, system, popen functions all run the process in the background. how can i get it to run the process normally. my code looks like this: <? exec("batch_file.bat"); ?> am i doing anything wrong?
View Replies !
Close Window After Script Runs
When a user clicks on a link in their email, I have a browser window that opens in the background and runs a script confirming their desire to be added to our email directory. I basically want this window to open, run and then close without the user having to deal with it. Is there a way in PHP to close the window after the script finishes running in it? Or should I revert to JavaScript? I want the script to be mobile so I've sort of ruled out processing it server side. TIA.
View Replies !
How Often Does Garbage Collector Runs In Sessions?
Does anybody knows how often the session garbage collector checks for expired session to delete them? is it possible to modify this timeframe? is it possible to call this function manually? I am storing my sessions in a mysql database and i am using a session expiration of 5 seconds (just for testing), but after the session is expired the session record in the db table still exists. and it looks the sessions aren't expiring either because if you still have the session cookie you can keep up with the session. Code:
View Replies !
Email Form Which Runs From An Iframe
I have set up an email form which runs from an iframe. The only problem is that when the script redirects the user to the success or error pages, these pages open within the iframe. Is there a way to specify the target window as 'parent'? Someone said that this could not be done via the php script and would have to be done with javascript in the html form itself.
View Replies !
Optimizing Query That Runs Slowly On Linux
I was wondering if anyone has any insight into why the query I have posted below runs exceedingly slow on my Linux server. I am using Php with a MySQL database. On both my development computers the query runs briskly. They are however both Windows boxes, one running Windows XP and the other running Windows 2000 Professional. Here is the culprit.....
View Replies !
Header Function Runs Before Update To Database Is Made
I have been having some problems with a part of my login script. This is the two lines of script I am having problems with: mysql_query("UPDATE " . $userName. " SET login = '$loginIN' WHERE pass = '$password' AND course = '$courseID'"); header( 'url=http://www.somewebsite.com/logged_IN.htm' ); The problem is that when this php script is executed the second line executes before the first and an update to the database is not made. I also tried the script without the second line and the first works then.
View Replies !
Query Runs In Mysql But Returns Error 1064
The same query runs in mysql and in Zend interface but not runs when using inside php script. I am receiving the error: "1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'str_qry_Insert' at line 1" INSERT INTO fnd_script_type (type_name) VALUES ('test1') I already have tried it with as: INSERT INTO `fnd_script_type` (`type_name`) VALUES (`test1`) INSERT INTO fnd_script_type (`type_name`) VALUES (`test1`) INSERT INTO fnd_script_type (type_name) VALUES (`test1`) what am i doing wrong ?
View Replies !
Query Runs Multiple Times Under Heavy Server Load.
I have been having an issue with some MYSQL queries running multiple times when the server is under a heavy load. Example, if I do an 'update Table1 set item1 = 0 where 1 = 1' This runs fine under normal conditions, but will repeat itself multiple times when the server is under load. Is this just an optimization or server resource issue. If so, I would assume the query would just timeout and not run at all instead of running a few times.
View Replies !
Working With Dates - Runs And Queries The Database To Produce A List Of Information
I have a script that runs and queries the database to produce a list of information, based on a date range. This is to fllow up on a script that is automatically run each Sunday night. What I want to try and acheive is, for example, if someone manually runs this report on a Tuesday the script will assume that it is run on the Sunday night, to make sure the results are exactly the same as the emails that have gone out. PHP Code:
View Replies !
Perform Redirection Of The User's Browser If The User Isn't A Valid User.
I'm running PHP on Windows, but that's just the local test... in production it will be on Apache. I am not using PHP as a CGI. I want to perform redirection of the user's browser if the user isn't a valid user. I don't want to use the refresh meta tag or javascript to do this. I want to do this with some sort of server command. Does anyone know how to make this work? Here's my code... <?php session_start(); $goal = ""; if (array_key_exists('goal', $_GET)) { $goal = $_GET['goal']; } if (isset($HTTP_POST_VARS['userid']) && isset($HTTP_POST_VARS['password'])) { $userid = $HTTP_POST_VARS['userid']; $password = $HTTP_POST_VARS['password']; $db_conn = mysql_connect('localhost', 'webauth', 'webauth'); mysql_select_db('auth', $db_conn); $query = "select * from auth where name='$userid' and pass=password('$password')"; $result = mysql_query($query, $db_conn); if (mysql_num_rows($result) > 0) { $HTTP_SESSION_VARS['valid_user'] = $userid; } }
View Replies !
"Please Wait" Page While Php Runs Mysql Queries
Does anyone have any idea what I should google to create a "splash page" that tells the user to wait while a few mysql quieries are run through the php page? It takes anywhere from 5 to 20 seconds, and I don't need a progress meter, just a splash page so they do not go anywhere and the user doesn't think there is a problem with their browser or network connection.
View Replies !
User Is Verified By A MySQL Database, And Then A Session: 'user' Is Registered.
I have a problem with sessions. In my code admin.php the user is verified by a MySQL database, and then a session: 'user' is registered. Well when the user presses a link to a another page called news.php it will be checked if the session is the same as in the same script, or if it's even registered (to prevent people trying to break in). But everytime i redirect to news.php I get a file included ip.php wich tells me Im about to break in. Code:
View Replies !
If The User Logs In, And Closes The Browser Window, How Do I Know That The User Has Logged Out.
I am creating a site that has a session based log in. Pretty simple stuff, but the bosses have asked if we can make it so that only 1 person can log into an account at once (ie if someone logs in with a specific acocunt, lock the account and dont let any one else log in) I'v been fiddleing around with session, and various session variables etc. and the only part that I cant figure, is if the user logs in, and closes the browser window, how do I know that the user has logged out.
View Replies !
PHPmyadmin Access Denied For User 'user'@'localhost'
WinMe machine as server, with Apache 2 installed and working PHP4 installed and working ( had PHP 5.05 installed and working, but i couldnt get the mysql extensions to load - phpinfo() didnt list mysql :(, so i installed PHP4, which now lists mysql when i run phpinfo). MYSQL 4.1 installed and working. I dont know the console commands too well, but i know its working ok, cos I have used a few simple DOS prompt commands to check its alive and I can connect to the database using MyODBC frontend/driver 3.51 and also using Navicat 2004. When i try to connect to the database via PHPmyadmin from another network PC I have an error: #1045 - Access denied for user 'user'@'localhost' (using password: YES) I have played around alot with different settings in the config.inc.php file.... nothing seems to work. This almost appears to be a simple login problem ( probably is too), but I can access the database locally from the Winme machine with the username and password that wont work over the network! I have tried not using 'localhost' as the host name but the IP address of the Winme PC but I get this error: #1130 - Host 'MYSERVERNAME' is not allowed to connect to this MySQL server
View Replies !
Notice: Use Of Undefined Constant User - Assumed 'user'
I have a script for a shopsystem on a Linux. There it works fine. But when I try to run it on my Windows machine, PHP says things like Notice: Use of undefined constant dbname - assumed 'dbname' in c:apachehtdocsaposhop estshopclassesxxx.clas s.php on line 77 On Windows I run PHP 4.3.2 On Linux runs PHP 4.3.1
View Replies !
Makes A User To Log Out Automatically If The User Is Inactive For 30 Minutes
im making an web-based game and im trying to make a code that makes a user to log out automatically if the user is inactive for 30 minutes, but im totally stuck on doing it. And im also trying to make a countdown script. Example: The user is buying an item, the delivery of the item takes 2 minutes. 2 minutes later the user have the item. How do i make that in the MySQL table, and continue ticking even if the user is not logged in?
View Replies !
Redirect The Logged In User To Home.php Without Any Clicking From The User
I have this login script that calls on itself to authenticate the username and the password. It redisplays the login page if there is an error. My question is how do I redirect it to a different page, when the user is authenticated (i.e. the address in the address box changes to a new name, for example, if the login page is called login.php,. then I want to redirect the logged in user to home.php without any clicking from the user). I realize that there is a header function available, but I've heard that any information related to the current session is lost upon using this function. Is there any better way?
View Replies !
Php Runs Slower And Slower
I have phpmysql runs to fetch information from a database.One proble I have is that as the number of rows it fetched, it ran slower and slower. Sometimes it even says the query is wrong, although it is not.
View Replies !
Authenticating User Common User Names
I want to create a password protected page with PHP and Mysql. I have 2 groups User and Admin. The respective groups have a common user/password. The user/password are stored in a database. I want to authenticate the user through a login form and not through a pop-up ($PHP_AUTH_USER) way. What I want is, if a user logs in and he moves from one page to another, he should not be asked for validity again. Is this possible only with scripting (without session and $PHP_AUTH...). If yes - how do I keep track of an authorised user and unauthorised user, so that he should not be validated again. Does setting the user variable to global in all the pages do the trick.?
View Replies !
User Authentication And PHP Saving As Specific User.
the users of my server had to upload their pages by sftp and only the user who uploaded a page was able to edit itafterwards. I've been asked to make a secure way for users to log on through the web and edit their pages online. However, although using .htaccess to authenticate users, the script saves as user 'nobody' and is not able to edit pages previously uploaded (and saved as user 'john_doe'). What I am trying to do is make the script save using the same username as the user used to log on.
View Replies !
Fill Fields When User Selects User From DB
I have a field with a selectbox which contains a list of client names and several other fields which display information from the DB. I need to be able to make the fields change to the appropriate information when a user is selected from the select box. Can anybody please give me an example of a bit of code that will do this?
View Replies !
Access Denied For User 'user'@'localhost'
First time using mysql, I keep getting this error: Access denied for user 'user'@'localhost' to database 'databaseName' PHP Code: $conn = mysql_connect('localhost', 'user', 'xxxxxx'); if (!$conn)     {die('Could not connect: ' . mysql_error() . '<br>');     } else     {echo 'Connection to mysql server made <br>'     } $db = mysql_select_db('databaseName', $conn); if (!$db)     {die('Cannot connect to database: ' . mysql_error() . '<br>');     } else     {echo 'Connected to database'     }
View Replies !
If Register_globals Is Turned 'off', Will USER A Display The $user ?
Scenario: User posts information to a page from a web form. USER A PHP Code: //remember, a form POSTed information here echo 'User is '.$user; USER B. PHP Code: $user = $_POST['user']; echo 'User is '.$user; If register_globals is turned 'off', will USER A display the $user ? If register_globals is turned 'on', will both users display $user ?
View Replies !
User Permissions - User Level 4 Or 5
I'm making a website with an admin section, and one facet of that is user management. I've made a script for this task, but I want it to be accessable only to people with user level 4 or 5. Here's the code for the script. At present, it isn't accessable to anybody, even level 4 and 5 users. Code:
View Replies !
User Authentication - Verify The User
I put the password in the database kind of like this. crypt($pwd) When I try to verify the user, I do something like this if (crypt($pwd_user_just_entered) == $pwd_from_database) { //user logged in OK } else { //invalid login }
View Replies !
Detect What Option The User Selected And Then Direct That User To The Selected Page.
Quick question regarding HTML forms and select fields. I want to be able to detect what option the user selected and then direct that user to the selected page. <select> <option name="1">1.html</option> <option name="2">2.html</option> </select> when the user selects, 1.html, it'll direct them to http://www.domain.com/1.html same with 2.html. I wasn't sure if this was done with PHP or Javascript, if its possible on both, which is better?
View Replies !
User Name
i am going through the process of password protecting a directory using ..htaccess and .htpasswd Is there a function to get the user name?
View Replies !
Getting User ID
I have a system where a user can log into the members area. Is there a way for the users to edit their profile WITHOUT using session_id? My database table looks like this: ID, Name, Surname, Address, Email, Username, Password. In other words, when the person logs in, I want the ID to be dragged with it and available on the members index page on the Edit Profile Link, ie. edit_profile.php?id=35.
View Replies !
PHP User
I would like to know the most efficient way I can learn this programming langauge and the things I need to be able to set up a website for the use of PHP.
View Replies !
Get User OS
I implemented a log function in my scripts to log IP adress, time of visit, browser and what have you from my visitors. Now I would like to add the operating system. I already used "$HTTP_USER_AGENT" which gives me the following output: Opera/9.00 (Windows NT 5.1; U; en) Can I guess the Operating System (like Windows XP or Windows 2000) with these information? Or how do i get this information?I think it is possible to get thevisitors OS.
View Replies !
Add User
i have made my own add user script and i need some help with the password bit, i want to be able to check if confirm password is the same as password, and i would also like to check if the email has a @ symbol in it. my code: <?php $email = $_POST['email'] ; $first = $_POST['nameFirst'] ; $last = $_POST['nameLast'] ; $username = $_POST['username'] ; $password = $_POST['password'] ; $cpassword = $_POST['cpassword'] ; $age = $_POST['age'] ; $gender = $_POST['gender'] ; $ip=$_SERVER['REMOTE_ADDR']; if ($first == "") { echo "Error: You havent entered your first name<br/><br/>"; ..................
View Replies !
Get *nix User Name
The title says it all. Can PHP retrieve a *nix username after someone has logged into a site via a .htaccess restriction. I have an application that has several users. Each user gets their own database based on the login username. Problem is that if user1 logs in via sub1.domain.com and then types sub2.domain.com into browser they have access to sub2.domain.com and that database. I understand why it is happening, but am fairly new to .htaccess so not sure how to prevent it.
View Replies !
User ID
I have a form where users can register. When they register, i would like to generate a user ID for them. what's the best way to do this? I thought that maybe I can create an ID field in the DB and have that be their user ID as it auto-increments.
View Replies !
User Cam
I am having a bit of troubles on a login. I have to login forms which are processed by the same php file. But on the block login a hidden input says public, and on one login in a contentarea a hidden input says internal. So what I want to do is send users login in in a content area to the internal area, and the ones using the block to login back to the site they were browsing. I put a if else conditional statement to manage that, when the hidden input is public now, you are taken to the internal area by a refresh. But now the real problem.
View Replies !
|