Any Ideas On Invalidating A Session From Another Process?
I have a slight problem with sessions. I use a session var to store a
user's details and also a set of permissions to various parts of my
application. This involves several SQL queries which is why I do it once
and cache the result in a session var.
My problem occurs when I change a user's permissions. At this point I
need to invalidate that user's session to reload their new permissions.
I don't think it's possible to do it directly is it? I'm thinking at the
moment of a timestamp in the user record which requires an SQL query
every page.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Fread - Any Ideas?
I have a socket open (opened with fsockopen()) and I'm sending pop3 requests over it. When I use fread() to get the response of the pop server, there's the possibility that the response can be of length anywhere between 1 character and several million (obvious reasons). Does anyone know if there's a way to read the entire incoming data when you don't know the length of it, without putting in some rediculously large number into fread's length parameter?
Ideas ..with Webpage
Hello I didn't do any web page development since university ,I wanted to create a web page for the fun of it ,an I was surprised of how easy it is to use frontpage and dramweaver to do basic stuff ,but I wanted to do something that I am sure it can be done but I don't really know the way . The webpage is not something original and it has been done before . Xe.com is a currency converter from a currency to another currency I have the following questions : 1) Wanted to auto detect the users country and accordingly set the starting currency (from this currency) to the currency that his country is using. And also change the language to the user's language ... 2)lets say that I have users from two countries Germany and Hungary I can create two starting web pages one with Hungarian and one with German ..but lets say I have users from 30 different countries is not very convenient to have to create a web page for each language there must be a way that someone can i have a webpage that takes textiles or something with the language strings and just displays them. 3) Lets say that the language is wrong and the user is using a computer of the Spanish person and the user is Japanese I want to give them the option to change the language at any time ..do they have to install another language e.g Japanese in this case? or only the encoding has to be changed .? 4)I wanted to give the user the option to select the currency in a better way than dropdown box ,or a list box .. like a menu somehow but I can't come with anything ...I don't know what guys can you suggest I guess the list box is the obvious especially if there are so many currencies but I would like something nicer... for example to display the currency image at the side ..not sure.. 5) If I create user login for example and I have different users that they pay for the services how can I restrict certain currency converter for certain users e.g. we have two users and the one user didn't pay subscribed for the free service (he can convert Euro to dollars, visa versa, pounds to dollars visa versa, pounds to Euro visa versa), the user that paid can convert any currency .. 6) How can I restrict users from copying the website (using offline explorer for example). I was wondering what tools do I need to use to create the website(recommended reading books?/online tutorials ),how will I be creating the functionality that I want and how will I be resolving every problem listed ?
Mysql_num_rows .... Error??? Any Ideas?
Does anyone have a good reason why I'm getting this error. I'm clueless on this one... I'm getting the error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource.
Aggregation Class Ideas?
I have many classes that use database connections to fetch data and manipulate on it. I also have database abstraction class that is handling all the database queries and so forth. Usually all my classes take instantiated database object as the first parameter to constructor so they know what database to use:...
Text To MySQL Problem Need Ideas
I know how to upload text files and such my problem is that I may have many many text files so any editing of the files is out of the question. The files are not delimited, well so far I use and it works but with help of some editing.
Colance, Connecting Ideas With Professionals. J5j
Webmasters: Colance specialise in connecting your ideas with Freelance Professionals to produce your project. Programmers: Providing your Service is made easy through Colance. It is free to sign up with no monthly costs. UMwxniywdsCdYae
Any Ideas How To Read A Url That's Changed By The Server?
I apologize, but I posted this in the php general forum earlier and realized that this is the more appropriate forum. Hopefully there's a coder here who has done this in the past. I've got code that uses CURL to go a web page to read the data. When I type in www.website.com, the server automatically adds a session variable to the url. I need to be able to read that session variable. Then I will use that session variable to input into a new CURL session. Any ideas how I can do this? If I use code like this: // find out the domain: $domain = $_SERVER['HTTP_HOST']; // find out the path to the current file: $path = $_SERVER['SCRIPT_NAME']; It gives me the code for where my script is sitting on my server rather than the values for the web site that I'm trying to read. Any ideas?
Ideas For French/english Sites, Using PHP?
I run a small site, I used it to learn html, and now PHP, next MySQL! I live in Quebec Canada and I would like to translate my site into french. I think I can get many more hits if I let the people around here take a look at my site and understand it! I wonder if I could use a smarter way to do this using PHP or even MySQL. Instead of having twice the html/php pages. I don't have any ideas with my limited knowlage of programming. Maybe using variables in the URL like mydomain.com/index.php?language=french&file_id=23 or something??? Well maybe it is more trouble than anything else and I shouldn't even think about it? Right now I'm just planning on making twice the pages and have a french/english page as my index for people to choose. But if anyone has any ingenious ideas let me know! I like figureing things out for myself, but if you would point me in the right direction.
Any Ideas How To Run Macro In Microsoft Publisher Through PHP COM ?
my macro in Publisher changes "123" into "321" (example) but I can't be able to run it. This is how far I get throught with PHP & Publisher: <? $pub = new COM('publisher.application') or die('Unable to load Publisher'); print "Loaded Publisher, version {$word->Version} "; $pub->Open('xxx.pub'); $pub->Documents[1]->SaveAs('xxx2.pub'); $pub = null; ?> this works, but of course does not do anything else than open xxx.pub and save it as xxx2.pub. I am trying to run my macro: $pub->Documents[1]->RunMacro(replaceme); where replaceme is my macro. I tried different variations: $pub->Documents[1]->Run(replaceme); $pub->Documents[1]->Application->Run(replaceme), etc but no luck so far :(
Looking For Recent Visitor Code Examples/ideas
I am working on updating my content management page and wanted to overhaul my "recent visitor" code. The code that tracks who has been and is still on my pages. I have not been able to find some examples I saw here a few months ago and was wondering if anyone could point me to some examples. The more versatile the better.
Data Transfer Problem - Ideas/solutions
I have an interesting problem. I have a (LARGE) set of historical data that I want to keep on a central server, as several separate files. I want a client process to be able to request the data in a specific file by specifying the file name, start date/time and end date/time. The files are in binary format, to conserve space on the server (as well as to increase processing time). The data in each file can be quite large, covering several years of data. New data will be appended to these files each day, by a (PHP) script. The server machine is likely to be a Unix machine, whereas my clients will be running on windows machines. My clients program is written in C++. My main problems/questions are as follows: 1). Transfer method issue: What is the best (i.e. most efficient and fast way) to transfer data from the server to clients ?. I think SOAP is likely to be too slow, because of the sheer size of the data 2). Cross platform issue: How can I insure that that the (binary?) data sent from the Unix server can be correctly interpreted at the client side? 2). Security issue: How can I prevent clients from directly accessing the files (to prevent malicious or accidental corruption of the data files.?
Ideas To Create User Personalize Page Without Login.
Hi,I am new with PHP, I am a new junior internet programmer. My boss asked me to do a personalize page for his search engine. Do any one willing to give some ideas of how to create a personalize page without login by user(only read the user cookies and mysql)
PHP Search Engine Code? (Rather Verbose Php Link) Any Ideas?
I've totally hit a brick wall and I've checked the numerous (some helpful) tutorials in making a php link search engine friendly but the following link: <font face="Tahoma" size="2"> <a href='ps2reviewsdisplay.php?page=ps2/ps2acecombatsquadronleader&type=htm&title=- Ace Combat Squadron Leader Review - www.impulsegamer.com Australia'> <span style="text-decoration: none">Ace Combat: Squadron Leader<br> </span></a></font> I just don't know how on earth to make it search engine friendly?
Process ID
I am starting a process with the system command via a php page. I want to put a button on the same page which will let the user kill the process by clicking that button. To do this, I need to know the process ID. I could grep for it, but that also returns the grep command. How can I make PHP tell me the process ID of a process I started? It seems as if this would not be a problem but I guess I am missing something.
Run Process In Background
I want to run process from my php script in background. I try different functions from functions list but all of them whaiting for process ending. How can I run `wget -b ...` and finish my script, but wget must still working? I use PHP5, Linux, Apache2.
Multithread A Process
can i use php to multithread mail() or something similar? in my company i need to send multiple copies of email to a few hundred ppl affilated and on my list. instead of calling mail over and over again i would like to thread this process. could someone point me to some documentation or perhaps an example of where to start with this?
Fetch & Process
I doing a straight forward webpage fetch and saving it to a file: CODE: $open = @fopen($url, "r"); $urlfile = @fread($open, 50000); @fclose($open); $page = split("",$urlfile); $datafile = fopen($tempfile, 'w'); foreach ($page as $line) { echo($line); fwrite($datafile,$line); } fclose($datafile); So I basically just write the fetched HTML line by line to a local file. The weird thing is I'm getting a bunch of ^M characters in the final file after every $line is written to the file.
PHP Process Problems
I'm having problems with php process in win2k. I have apache+php intalled on a win2k machine and after some use I can find 1,2 or 3 non-terminated process in the system. I try to kill them but I receive access denied (even logged as administrator :confused, and I have to reboot the machine. While I have 1 non-terminated process, I have no problems. But when it reaches 3 process php scripts doens't work anymore. If I try to load a page, it doesn't execute the scripts and the browser keeps waiting forever. What maybe the problem? Why can't I kill the process?
Session Problem: Session Exists, But Session Variables Don't Lasts
I have some troubles with session variables. I can easily create a session, but the variable I append to global session array ( $_SESSION) lasts only until the end of current function. I prepared an example that can demonstrate the problem (see code bellow): The program flow is this: (1) It starts with "session_start()" and displays "login_form()". (2) When user enters his username and password, it goes to "login()" function which sets $_SESSION variables. (3) This function also "Echoes" session_id and user name to the screen. (4) Then it goes to "MyProgram()" function. It only "Echoes" the same variables to the screen. Strange is, that the session_id is the same in (3) and (4), but the user name ($_SESSION["username"]) is only in (3), but not in (4). By other words - $_SESSION["username"] variable filled up by "login()" function is immediately cleared. I don't know why. There must be something missing, but after 3 days of watching it, I can not find a problem here. =========================================== <? Function login($uzivatel, $heslo) { $_SESSION["username"] = $uzivatel; $_SESSION["pass"] = $heslo; $U_Name=$_SESSION['username']; echo "Login username: $U_Name<BR>"; echo "Login session ID: "; echo session_id(); echo "<BR>"; } Function login_form() { echo ("<DIV ALIGN='center'> <H1>Test</H1> <P>Please enter your username and password:</P> <form action='test.php' method='get'> <INPUT TYPE='HIDDEN' NAME='login' VALUE=TRUE> <TABLE BORDER=Ɔ'> <TR> <TD ALIGN='right'><U>U</U>ser name:</TD> <TD><INPUT NAME='uzivatel' SIZE=25 ACCESSKEY='U' TYPE='TEXT'></TD> </TR> <TR> <TD align='right'><U>P</U>assword:</TD> <TD><INPUT NAME='heslo' SIZE=25 ACCESSKEY='P' TYPE='PASSWORD'></TD> </TR> <TR> <TD COLSPAN=2 ALIGN='RIGHT'><INPUT NAME='OK' ACCESSKEY='O' TYPE='SUBMIT' VALUE='OK' TABINDEX=3></TD> </TR> </TABLE> </FORM></DIV></HTML>"); } Function MyProgram() { $U_Name=$_SESSION['username']; echo "Program username: $U_Name<BR>"; echo "Program session ID: "; echo session_id(); echo "<BR>"; } { session_start(); if ($_SESSION['username']): MyProgram(); else: { if (!$login): login_form(0); else: login($uzivatel, $heslo); MyProgram(); endif; } endif; } ?> ===========================================
Process Form Fields
Hi, I need to process a generic html-form. Is there any way to access to the form elemts as an array?
Payment Process Through Nobel Pay
I am in photo business site. is their any one done any credit card payment process through nobelpay(one of the payment process like paypal, surepay etc..) in php. If any one have come across this payment process in php. please tell me how to implement the credit card payment process in php using nobelpay payment.
Does PHP Process Requests Sequentially On One CPU?
With ASP.NET I've found that request are processed sequentially, one at a time, at least on a server with one CPU. If one request blocks for some reason, maybe on a long database query, then all users must wait until it completes, for their request to process. This leaves me wondering about PHP running on IIS and Window. Does this hold true for PHP also? What about PHP on Unix? Does this allow true simultaneous processing of all requests when the server has a single CPU?
Oracle + PHP + Long Process
Oracle 10g RAC on Linux, with an end-user interface via Apache/PHP/AdoDB on a separate Linux box. I need to create a PHP web interface to allow an end-user to run a PL/SQL stored proc that will do a force refresh of a series of materialized views following the loading (through another PHP interface) of additional flat file data into the underlying tables. I want to allow multiple data uploads and then do a single refresh, so I won't be able to use fast refresh or other internal database trigger mechanisms. My real problem is that the time taken to execute the stored proc is likely to considerably exceed the max script execution time for PHP, and I don't want the end-user interface to just sit there bubbling away waiting for the Oracle processes to return a response anyway. I am considering creating a "master" PL/SQL stored procedure which would use the Oracle DBMS_SCHEDULER package to run a nearly-immediate job as a "background" (to the PHP interface) process. Is this the way to go, or are there other better solutions that I am overlooking?
How To Process The Passed Value In Php3?
one of my php3 page passes values to another php3 page. "www.mydomain.com/searchit.php3?variable=value" What are the commands to get/process the passed value? both the scripts or PHP3.
Want To Spawn Process From Windows PHP
I wanted to write some code purely on Linux, but unfortunately the document scanner drivers are non-existent for the high-end commercial document scanners. So, I had to port my Linux PHP project to Windows PHP (WAMP). There, I found a scanning tool (Kodak Image Scan - imgscan.ocx) that I can put on a VB form, tell it to scan some documents into a TIF file, and then shut down. I can run this VB app at command line just fine, but when I run it from either a popen(), system(), or exec() call, it won't detach from the PHP page. Instead, it just sits there. I can see the VB exe I made is being loaded properly in RAM, but unfortunately it sticks and won't unload on its own, nor will it tell the scanner to engage. I have to kill the VB exe and then the PHP page continues. What's the way to spawn a detached process from PHP on Windows?
Process Management In Windows
All I need to do is run a windows batch file from a small php program, and return the windows process id of the batch file. I have played around with proc_open() but that returns a resource id. Does anyone have a suggestion on what call I could use to get the windows process id returned within my program. I am using windows xp pro, and php 5/apache
Calling PHP From A Windows Process
I'm calling PHP from a windowsprocess in a simple Webserver application. I'm using the createprocess Windows API command.... C:PhpPHP Filename.php In this file I will open a TCP/IP connection to my SQL-server. When I do so, I always get the following error mysql_connect(): Can't create TCP/IP socket (10106) No I start a command shell and I call the same... C:PhpPHP Filename.php This will work without any error!! Same effect I get from all TCP/IP Actions (FTP etc....) Can somebody help me. Is it a PHP Setting, a server variable or a WindowsXP Access right problem?
Process Control Problem
I need to process some computation but i do not want the user wait the end of the computation but instead i would send the user a "wait refreshing page". When the computation is finished i would replace the refreshing page with the new page containing the results. So i need 2 processes one that would make the waiting page and one that would do computation and make the results page. I read in the php manual that handling processes within a web server environment could raise problems. Is there a simple and a clear manner to solve this problem?
Process Form With Both Javascript And PHP
PHP/Javascript. I have a simple form I want to validate the fields with javascript and then run the PHP script. All the scripts are in one page. I want PHP to control where the next page is. It works fine without the javascript but when I add the javascript the page doesn't do anything besides the validation. Thanks for your help... Chong ----login.html-------------------------------- <?php ob_start(); session_start(); require('datasource.html'); switch ($_POST['process']) { case 'Login': $_SESSION['login'] = $_POST['login']; $sql = "SELECT first_name, last_name, security_access, expire, passwd_date FROM sy_user WHERE login = '".$_SESSION['login']."' AND password = '".substr(sha1($_POST['password']), 0, 10)."'"; $result = mysql_query($sql); if (mysql_num_rows($result) < 1) { $msg = "Invalid login and password!"; } else { $row = mysql_fetch_assoc($result); $_SESSION['first_name'] = $row['first_name']; $_SESSION['last_name'] = $row['last_name']; $_SESSION['security_access'] = $row['security_access']; $passwd_date = $row['passwd_date']; $expire = $row['expire']; if ($passwd_date + $expire < date('Y-m-j')) { header('location: expired.html'); } else { header('location: main.html'); } } } ?> <SCRIPT LANGUAGE="JavaScript"> function checkrequired(form) { for(f=0;f<form.length;f++) { if(form[f].name.substring(4,length)=="reqd") { if(form[f].value){continue} else {
Starting A Process On The Server
after putting my self through hell trying to call an executable with Java. (which I was doing correctly according to the specs, but there is something f$#%ed up with the implementation of Runtime.exec() on this OS--Linux for those of you who are wondering, when I recomiled everything on NT it runs as expected, which is unfortunate) Anyway, I was just curious, since I haven't really taken PHP very far, and haven't played with it since PHP3, what would one do to call an executable on the server file system? with arguments?
Security With Checkout Process
for the checkout process of an online store...i'm wondering what to do about passing sensitive information between pages. i was thinking of having a 3 step checkout process... if i have a page where they enter their address and phone number and such...is it relatively safe to post that info to another page using a form? is there anything i should be watching for?
PhpCB Batch Process ?
If I have a series of php files under C:INETPUBPROJECT with quite a few SUBDIRECTORIES also (i.e. a standard PHPNuke install), is there a way to have phpCB "batch" process all of the files ? This is the command line that I would be using: phpCB -space-after-start-bracket -space-before-end-bracket -space-after-if - space-after-switch -space-after-while -space-before-start-angle-bracket -spa ce-after-end-angle-bracket -one-true-brace-function-declaration -glue-ampers core -indent-with-tab -force-large-php-code-tag -extra-padding-for-case-stat ement -force-true-false-null-contant-lowercase --comment-rendering-style PHPDoc --padding-char-count 1
Php Software Design Process
Would anyone out there like to explain their web based software design process? I'm analyzing our current methods vs. other more productive ways to handle project management, source code versioning, sftp, ssh, debugging, testing, customer - programmer relationship (ex: new features/requests), and development ide. I'm looking for more efficient ways to produce reliable code, version it, test it, track bugs, and implement. Things I'm looking for are the actual individual processes it takes to get this job done. Not looking for arguments on the best cvs or ide... just a good process to follow in general. Something like.. should you test on an independent development machine or your local workstation to combat concurrent programming falacies? This isn't my first rodeo so I'm not looking for simple answers unless they truly are simple...
Apache Doesn't Process PHP Pages
installed Apache & PHP 4 under Linux via RPM packages Html pages work, not php's (every php script is displayed on the browser as text file) I check'd all the modules directives in httpd.conf, as explained on php.net, but things don't work In my error_log file, there is no trace of php having been installed Anybody has a hint or a link to something ?
Exec Background Process
I want have PHP call another process (another PHP script at the moment but it may end up being a binary) in the background and not wait for process to complete, but rather instantly jump the the next line of code. I've tried things like: exec("./script.php &"); // script.php has executable permissions set exec("at -f ./script.php now"); // and #!/usr/bin/php at the top of the code Neither seem to work. They both execute script.php, but both hang around until script.php has completed.
XP Exec Background Process
I was trying to exec a background process on XP using PHP CLI, but could not get it to work. Suppose the command I want to spawn off is "cmd". On *nix, it is as easy as putting ampersand "&" at the end of the command. I tried the following on XP without working. exec("cmd"); exec("cmd >NUL"); exec("cmd /c cmd"); exec("start /b cmd"); I tried many combination, but on each one, PHP waits for cmd to exit before continuing. Doing this in Windows script host (cscript) is simple: Set objShell = CreateObject("WScript.Shell") objShell.Run "cmd", 0, False The "False" parameter causes the Run method to continue immediately without waiting for the command to finish. So I could make my PHP file exec a VBS file that does the actual background execution of my command. PHP exec documentation says it will not wait if output of the command is redirected somewhere, but this didn't seem to work for me. If anyone has experience in doing something like this on Windows XP SP2,
Help With PHP Process Control Functions
I have written a script that basically sends an email (using sockets). I want this script to be able to run multiple copies of itself so that it doesn't have to wait for one mail sending to finish before starting on the next. I understand that I need to use the PHP pcntl_ family of functions to control the processes, but am not sure where to start. There aren't many helpful articles on the internet about this topic! Any example code or help would be greatly appreciated.
Display If $process Is Running
How can I display if a process is running... For example, I'd trying to write a snippet of PHP code that will check if a process is running and display a message on the resulting webpage depending on whether it's running or not: Code:
PHP Access Process Information
how when open task manager you can see how long a process has been running? He wants that info on a webpage. I've googled around a bit but can't find anything even remotely related to it, so I'm hoping someone else has done something like this before.
Continuously Running Process
Would it be a high load on a server to have a php process run from the executable, continuously looking for existence of files in a folder and processing them if they are there? Just an endless loop that checks for the existence of the files. If they are there, do something with them, if not keep looping? It is not a web accessible application but something for server admin.
How To Handle Long Process
i am developing a php web application where some programs requires a long time to process, such as going through a large table in a database and updating fields in each record. how can i do this without causing a page to timeout?
Process XML File Data
I am currently writing a module for Zencart, where in a sidebox visitors can contact the store owner via Skype. I am currently getting this error: "Fatal error: Cannot instantiate non-existent class: xmlparser" This is the XML file I am trying to process: Code:
Process A File And Then Download.
I have a directory of .wav files set. What I want to do is take the .wav file from its location, pass it through lame to create a .mp3 of the file and then initiate a download of that file, the .mp3 does not have to or need to be saved on the server locally. The filename is being passed via the url as ?name=(filename), and I am using _GET to extract it. I have even gone so far as to set the variable: $name = _GET['name']; so that I can use $name in the php (see, i am paying attention.. ) The whole script i have so far is as follows: Quote <?php $name = $_GET['name']; system('lame --quiet --nohist -b8 -mm ./$name -'); /> Which is working, but is giving me a direct output of the .mp3 file to my screen.
PHP/MySQL Process CPU Limit
i am developing a PHP5/MySQL website and testing it on my local machine, on an Apache server. And I have a problem. I have written a PHP script that does a lot of computing and MySQL queries. I start it from a link on one of the pages on the site and when it's complete, and when it's done it writes in the output a sort of a "OK, DONE" statement on the next page. This script has a lot of loops and can take up to 15 minutes to complete. The problem is that, while it is running, it takes up all of my CPU power, and I can't browse/do other stuff on the site until it's over. Is there any way that I can limit the amount of CPU available to a single script???
Process Array Made With Chcekboxes
I don't know why I can't get this to work I have a form with a number of checkboxes on one page <input type=checkbox name="listing" value=$ID> I then want to process only the listings that were checked, so: (I tried to use a while and a foreach, neither worked)
|