Different PHP Programs - 1 Registered User Possible For All?
I am new to php and I have three php softwares that I want to install on one website. I'm wondering if a person registers for one, is it possible that he can access the other softwares also? Otherwise that person will have to register three different times for the same website to access all the resources.
If it is possible, will I have to change anything?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Registered User Paths
I tried looking this up on the internet but do not think I am using the correct terminology for this problem. I am making blog-like system where new users that register can view their blogs by going to an address similar to: http://www.website.com/username Where username will change depending on the individual's username. I believe this has not only to do with PHP but with server setup (virtual directories or something) but i just wasnt sure. I am using Apache 2 web server if that is necessary to know in order to solve problem. Also I am using PHP5.
PHP Calling Programs On AS/400
I have a website (running on a linux machine) that currently makes use of JSP to access data on an AS/400. I've found information telling me that after setting up ODBC drivers on the linux server I'll be able to access the databases on the AS/400 however I've not found any information about executing programs on the AS/400. I've looked at the docs for exec, passthru, etc. and it appears those will only work on the local operating system. Is it possible for a PHP page to execute a program on a remote machine? If so, how does PHP handle the ASCII <--> EBCDIC conversion for parameters passed and returned?
Executing Programs On A Server
i've written a c++ program that converts one file type to another via two arguments (the input and output filenames). i want to execute this on my server, using something like exec("myprogram.exe $arg1 $arg2"); but then I realized my server is linux, and my program was compiled for windows. so I uploaded the .cpp instead, and now i'm trying to compile it doing something like exec("gccp hello.cpp"); which returns an exit code 127... not really sure what that means. I'm guessing I probably don't have permission to be creating files on my server...is there anyway I can change this permissions or anything?
Executing External Programs
I know all the different functions that allow me to execute an external progam, however I have come across and interesting problem that I need to fix if it is at all possible. Is there a way that I can use the php functions and execute an external program by some other user other then who ever owns the apache process?
POST Variables From Programs
we are trying to make a program in C++ that will comminicate with a PHP script. But we dont know how to get the variables from the program. We got it figured out with perl/CGI, but PHP seems to be a better way to connect to SQL server. On PHP the GET works, its easy, but it's not secure enough. I need informtion on what headers does the PHP require to get the POSTed data from a program.
Session Registered Variables...
How do I validate session registered variables with http_post_vars (php-4.0.6)??? Page 1 Session_start(); Session_register(“check1”); Session_register(“check2”); Session_register(“check3”); Session_register(“check4”); $check1 = “abc”; $check2 = “def”; $check3 = “ghi”; $check4 = “jkl”; via form (method = “Post”) I submit $check5 = “abc”; Page 2 Session_start(); foreach($HTTP_SESSION_VARS as $key => $value_) { If($HTTP_POST_VARS[“check5”] == $HTTP_SESSION_VARS[“key”]) { echo "<br>Equal"; } else { echo "<br>Not Equal"; } }
Registered Users Online
Right now I'm programming a user authentication system in PHP and I have a question about a fun feature I want to add. I want to have one of those things that tells you if a user is logged on at the moment, such as the one on PHP Freaks. I was thinking that I should have a mySQL table dedicated solely to online users. I just don't know how (and where) I should put the script that deletes old users from the "online" table, say if the users didn't use the log out feature, but just closed his/her browser.
How To Check If DOMAIN Is REGISTERED?
what is the simple and fastest way to check if domain is registered? I don't need any information about it (whois or etc.). Just return "yes" or "not".
Running Php Programs On Apache Server
I am using Apache web server and i am trying to run php programs over it My problem is that the php programs aren't running at all. Instead i am receiving messages "BAD REQUEST ERROR 400".
ImageMagick And Executing External Programs
I have installed ImageMagick and GhostScript (Windows/IIS) and IM is working from the command line (specifically the convert command) so now I need to get it working in php. To that end I have the following code: <?php system("c:Program FilesImageMagick-6.3.4-Q16convert.exe c:InetpubwwwrootexpgraphicsimgMagick est_file.ai c:InetpubwwwrootexpgraphicsimgMagickAIC.png",$retvar); echo $retvar; // Now you can check the $retvar for errors ?> c:Program FilesImageMagick-6.3.4-Q16convert.exe - the root folder for IM, location of convert.exe c:InetpubwwwrootexpgraphicsimgMagick est_file.ai - the location of the target image to use for conversion c:InetpubwwwrootexpgraphicsimgMagickAIC.png - the location, name, and format for the converted image Using the above code, it does not create a new png image. Before I set the permissions for the Internet Guest Account user to "read & execute" for the cmd.exe file located at C:WINDOWSsystem32, $retvar was echoing a value of -1. Once I set the permissions on C:WINDOWSsystem32cmd.exe, $retvar is echoing a value of 1. In either case, the new graphic is NOT generated. Is there something wrong with my syntax?
Php Function To Implement C Language Programs
I want to know of a function in PHP that will allow me to run C language code. I am using a C library, for that I need to write C code. So how can I incorporate C code in a PHP program.
Registered Php Steams - Https, Ftps
How do you make Php be able to open secure streams (see "Registered PHP streams" in the first block of phpinfo() output). I run WAMP on my home PC (Windows XP Pro - Apache 2.0.5.5 - MySQL - and Php 4.4.1-pl1). I struggled with this with Php4. I installed OpenSSL, but that was not enough. Finally, I downloaded and unzipped xampp, copied the php folder (that's the Php4.4.1-pl1 I am now using) and there they were. I have a script that logs into my remote host cPanel every day, and I want to use https so that I can send the username and password over a secure link. I have installed Php5 from php.net, but no luck. It works fine, but I can not open secure links (e.g., fopen("https://......");) I downloaded the latest xampp, unzipped it, and tried using that Php5, but no luck. Apache would not start, saying that the module php5apache2.dll could not be found, even though it was right where I told httpd.conf it was. Some research indicated that I could encounter this problem if I was running Apache 2.2, which I am not ..... so this error is confounding me. The bottom line, though, is that I want to get a copy of Php with https and ftps as registered streams.
Executing Large Sclae Programs In Fortran Using PHP
I have some large scale programs in fortran in server and i would like to execute them by giving input through HTML/PHP forms.Iam trying with shell_execute... Is there any other approach to execute the programs (fortran,matlab,'C' etc) in server using PHP.
Session Counter Won't Increment But Registered Fine?
I eagerly started the devshed tutorial on sessions and discovered I cannot get the simple counter script to work. I have read a bunch of other posts and I am still not exactly sure why things aren't working. I have the session directory set in php.ini, I have cookies enabled in my browser. Here are two files which I have changed around in various ways, paying attention to putting the session_register in different spots.
Registered Globals And Sessions Interfering With Eachother
I'm using sessions and registered globals are on. I have a post form on the page with a field called "address". I also have a $_SESSION['address']. When the page is submitted, I have 3 variables. $_SESSION['address'] which is everywhere anyway. $_POST['address'] from the form $address because of registered globals. On other pages I've worked on without sessions, when I submit a form I would get the $_POST['var'] and $var. And if I went $var="whatever" it didn't affect $_POST['var'] at all. I thought registered globals just created extra vars named after array keys. Hmm, now that I think about it, it uses superglobals, right? I just checked php.net and it doesn't say anything about priority. If I have $_POST['var'] $_GET['var'] $_SESSION['var'] or even if 'var' coincides with some $_SERVER variable... what order is the priority in? Anyway, with sessions it's really messing me up. registered globals are registering $_SESSION variables over $_POST variables. And if I go $address = "else" then $_SESSION['address'] becomes "else" as well. I don't know why or how they are linked, but I don't like it at all. How can I stop them from being linked? So $address and $_SESSION['address'] aren't sharing the same memory address. I know, obvious answer is disable registered globals, but this site is in a subfolder of another site that uses registered globals all over the place, I don't think $_POST[] is even used once, nor are sessions. And I thought registered globals weren't supposed to be &.
Sessions Stay Registered With Multi-logins
I log in with one username, and it says Welcome User1. I click back, and log in with a different user and it says Welcome User1. Now when I click log out with either username, it destroys the session. How do I get it so this doesnt happed. I mean so it will display the correct name and the correct info for each log in name.. PHP Code:
Blog Software With Many Registered Users Categories
I have a blog made with b2evo, but I'd want to migrate to another software. I need this feature: different user levels, and each level see only the posts intended for them. I'd want to be able to do posts for everyone, posts for customers, posts for friends and posts for close friends. The user levels deployed in b2evo and Wordpress seem only to limit editing and blogging, but not readability of the posts (actually, in b2evo you may limit the visibility of a post to the registered users, but all of them, not a category). The only tool I know who could enable me to do that is typo3, but frankly, installing typo3 for a blog seem a bit of a overkill to me... Do you know any blog software who enable the owner to have different levels of visibility for each post?
Scalability Of Perl Cgi Programs That Load Text Files
Suppose you have a perl program that is called by a web page to generate another web page. The program is written to load data from a text file on the server and make certain substitutions in the loaded text prior to the output of html. If one user is on the site, it should not be a problem. If many users try to access it nearly simultaneously, will it be a problem? example:
Component 'MSCOMCTL.OCX' Or One Of Its Dependencies Not Correctly Registered:
I've previously installed PHP on my Win2K machine at work with great success. Now I'm trying to load it onto my laptop (also Win2K) and I get the following: Component 'MSCOMCTL.OCX' or one of its dependencies not correctly registered: a file is missing or invalid Does anyone have any ideas about how I might fix this? PHP doesn't work on the laptop, and IIS/Windows/etc. were installed the same way on both machines.
Executing External Programs From PHP4 On Windows98 With Apache 1.3.14 For Win32
I did a search, and did not find anything specific on this topic, so here goes: Trying to create a webpage button or link that when pressed executes Win98's "dialer.exe" with a phonenumber as a passed parameter. From my understanding, the exec function in PHP seems to work best with Linux (correct me if I am wrong please!). Are there alternatives? The other bit of knowledge I have not been able to find (and really is outside this forum), is that dialer.exe is supposed to accept control from external programs, but I have yet to find docs or examples of such.
Registered PHP Streams (fshockopen Error While Opening A Https Stream) Urgent Help Needed
I am running PHP5.0.2 over apache 1.3.29 and openssl-0.9.7d on a Debian Linux and with a fake (internal)ip. Php Configure command './configure' '--with-apxs=/www/bin/apxs' '--with-openssl-dir=/usr/local/src/webserver/openssl-0.9.7d/' '--enable-trans-sid' '--disable-libxml' Registered PHP Streams : php, file, http, ftp Registered Stream Socket Transports : tcp, udp, unix, udg allow_url_fopen : On On Now when i try to open a https url via it gives me this error [Wed Jun 15 19:03:36 2005] [error] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to ssl://www.testcall.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /www/htdocs/testcon.php on line 2 I am trying to fix this from last few days but not successful can some please help me its very urgent. Do I need to register ssl and https as registered php streams? and if so how do i register them.
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
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
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.?
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.
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?
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?
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.
Web Server User Name
Probably two really stupid questions and I expect they've been asked before. 1. How do I find out what name the server / php is running under? (nobody or whatever) 2. Is there any reason why I shouldn't be able to chown a directory to this user or do I need to be root? I'm asking because I don't seem to be able to chown to nobody.
Get User Information
Hi, how do i get some information about my visitors? Things like IP, Operating System,used browser, referrer url and so....
User Management
I have PHP 4 installed and am wondering what is the best way to handle users. Should I use cookies or the built in session management in PHP 4? Are there any tutorials on any of these?
User Authentication.
I got the following script from the PHP4hosting site, it was done by devshed. I am trying to use it but it doesn't accept any of the usernames or passwords I enter, any ideas why pls? <? function authenticate() { Header( "WWW-authenticate: basic realm='MySQL/PHP Demo'"); Header( "HTTP/1.0 401 Unauthorized"); echo "You must enter a valid login ID and password to access this resource "; exit; } if(!isset($PHP_AUTH_USER) || $PHP_AUTH_USER=="" || $PHP_AUTH_PW=="") { authenticate(); } else { mysql_connect( 'localhost','user','pass'); mysql_select_db("users"); $result = mysql_query("select * FROM users where name = '$PHP_AUTH_USER' and password='$PHP_AUTH_PW'"); $row = mysql_fetch_array($result); if ($PHP_AUTH_PW!=$row["password"] || $PHP_AUTH_USER!=$row["name"]) authenticate(); } echo "User ID :".$row["id"]; ?>
What User Does Php Run As On Win32
I need to know what user php runs as on win2k/iss 5 installed as cgi. Basically what i'm trying to do is modify files on another server with php, and I can't figure out what user needs access to those files/directories so php can get at them.
Apache User Through Php Possible?
As a part of a "system test" page I'm writing, I want to find out what user that apache is running for the virtual host that it is running. Ex: (from apache's conf file) DocumentRoot /home/ron/public_html/ User ron Group ron I want to find out that the virtual server is running as user "ron".
Retrieving NT User ID
Does anyone know how to retrieve the NT user id that someone is logged in as? System is running IIS. Have tried HTTP_AUTHENTICATION but that doesnt appear to work under MS - unless someone knows a works around. Alternatively - how can I retrieve a UNC pathname for a specific drive mapping.
User Registration In A DB
I am creating a web application which involves users registering details in a DB. Obviously this is a very common thing to do and there seem to be many different ways to solve this problem. 1. Is there a way to do this without needing to hard code DB login details into the source? 2. Is it better practice to create individual DB users for new members when they register and use DB authentication, or should the DB connections all be through a single user and use code to check a table containing user name and password hash? 3. Is there a way to create a connection pool in PHP?
User/Pass In URL
Hello all, I am trying get one server to authenticate to another server possibly with a browser window in the middle. My browser throws a syntax error at this url http://username:password@domain.com:2082 but will allow the same with ftp - ftp://username:password@domain.com I want to have a page that has login buttons for remote sites (hosting client sites and the like). I understand that with "AuthType Basic" the server sends a request for login information (403 or something like that). The browser subsequently sends the user/pass on every other request for a page/resource on that site. Is there a way to do this in advance? ie can I do something like this in html ? .. <form action="http://theirdomain.com:2082" method="post"> <input type="hidden" name="user" value="username"> <input type="hidden" name="pass" value="password"> <input type="submit" value="Your cPanel"> If not then can I proxy it on the server? ie can I place the username and password into the headers to the remote site and pass a cookie back to the browser so they can continue the session with the remote site?
User Access
Can anyone help me with user access? I want to have different levels of access for users. For example; when I create accounts for users to og into my websitem, I want to be able to specify the level of access they will have. Let's say user A can access pages 1,2&3 and user B can access pages 3,4&5. I would like to have check boxes that I can check to allow them access to the specified pages!
Redirecting A User
I am looking to create a directory when a user logs in, and have that user redirected to their page logon. I have this script, which I haven;t implemented, but I would like your opinion. <script> // Define the URL for when the user is logged in $url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']); // Make sure there is no trailing slash if ((substr($url, -1) == '/') OR (substr($url, -1) == '') ) { $url = substr ($url, 0, -1); // Chop off the slash. } // Redirect to the page at logon $url .= '/' . $_POST['username'] . '.php' </script>
How Do I Set Up User Accounts?
I am building a Lab Information Management system. I am trying to give access to some of the data in my MySQL DB to users. I would like for a user to be able to log in and view any of the data that pertains to his/her projects only. This needs to be pretty secure as we have some external customer information which is sensitive. (but not top secret). The specific question I have is, how do I build such limited access? Do I use the user_id (primary key in the user table) stored as a variable and use session management to move from page to page? How secure is that? Would it be better to use secure cookies? Either way I take it that the user_id is stored as a variable and used in the sql query to restrict the dataset? Is this a secure way of doing things or could some unscrupulous hacker come along and steal my data?
User Authentication
I am using my webhost's username and password system, which generates .htaccess and .htpasswd user verification (Bluehost). I want users to login to the password protected subdirectory (let's say www.example.com/clients/) with the browser's default login dialog box, which is all automated by Apache and the web browser... But once they are logged in, I want the target page (www.example.com/clients/index.php) to read the username that they logged in with and redirect them to a subdirectory with that name (www.example.com/clients/username/). Is there a way for PHP to read the username that they logged in with through Apache? Perhaps some kind of HTTP request that will return the username as a variable?
User Details
building a login system for my website and i need to know how do i get the name of the computer the user is on? i have already figured out how to get the ipaddress but testing that on our network here if i login on one computer all others get logged on automatically so i need to be able to identify the particular computer so as to prevent this.
User Accounts
I'm desigining a website using php/mysql which has user areas for clients to upload information and details into their respective user areas. Each user will have their own directory in the site based on their own database with the exact same tables, fields etc, the only difference is the 'connection.php' will be different for each user as it will connect them to their respective database. I then plan to have a login based on a members table which will redirect user/pass combinations to the relative directory. What i want to know is, is there a way that insteadof having seperate directorys for each user, when they login the respective 'connection.php' can be loaded for the user eliminating the need for directorys for eachj user.
Validate User Name
I need to validate the characters in a user name. what PHP function can i use to check if the user name has only letters, numbers and/or underscores.
Validate User
I have a web page that cost(been worth) the user and password against mysql, which happens is that the users give themselves the login and password and several persons enter with the same information. It(he,she) wanted to do that alone it(he,she) could deposit one simultaneously using the same login ...
|