[PHP] Re: Unable to load dynamic php_oci8.dll
Hi all, Kindly help me out Ramesh On Thu, Jun 25, 2009 at 9:48 AM, Raj rameshs...@gmail.com wrote: Hi, I get the following error when i start the Apache Server. PHP Startup: Unable to load dynamic library 'F:\\Apps\\PHP\\ext\\php_oci8.dll' - The specified procedure could not be found.\r\n in Unknown on line 0 I dont see there is any issue with the dir as well as the ini file. everything is in place. oracle version in 9.2 windows XP PHP 5.2.10 Kindly let me know, what needs to be checked. Thank you Raj -- Thank you Ramesh S Raj
[PHP] Unable to load dynamic php_oci8.dll
Hi, I get the following error when i start the Apache Server. PHP Startup: Unable to load dynamic library 'F:\\Apps\\PHP\\ext\\php_oci8.dll' - The specified procedure could not be found.\r\n in Unknown on line 0 I dont see there is any issue with the dir as well as the ini file. everything is in place. oracle version in 9.2 windows XP PHP 5.2.10 Kindly let me know, what needs to be checked. Thank you Raj
Re: [PHP] Unable to load dynamic php_oci8.dll
i tired this earlier, it is not working. On Thu, Jun 25, 2009 at 9:54 AM, Kun Niu haoniu...@gmail.com wrote: http://forums.oracle.com/forums/thread.jspa?threadID=412805 Will this be of help? 2009/6/25 Raj rameshs...@gmail.com Hi, I get the following error when i start the Apache Server. PHP Startup: Unable to load dynamic library 'F:\\Apps\\PHP\\ext\\php_oci8.dll' - The specified procedure could not be found.\r\n in Unknown on line 0 I dont see there is any issue with the dir as well as the ini file. everything is in place. oracle version in 9.2 windows XP PHP 5.2.10 Kindly let me know, what needs to be checked. Thank you Raj -- 牛坤 MSN:haoniu...@hotmail.com msn%3ahaoniu...@hotmail.com -- Thank you Ramesh S Raj
[PHP] Re: Image editing?
Hello, I might have to start doing some automated image editing or rezising with PHP. I've never done anything like this before so I would need some guidelines to get started. Basically what sections of the manual to read and what tools need to be installed to the server side to get things like this done. Are there any websites about this issue, other than php.net, that might provide help to beginners? Thanks for your assistance! http://phpcommunity.org/gazette/2005/aug/imgresize.html http://phpcommunity.org/gazette/2005/jun/img_with_php.html -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Maps and plotting data
Adrian Bruce [EMAIL PROTECTED] writes: Has anyone used any of the php mapping classes that are available? (Image_GIS etc) I would like to create dynamic maps and plot data i.e. postcodes on them like you do in applications like map-point. I am not quite sure if there is any php scripts/programs that already do this or if i have to do this myself. I can see it being very time consuming to geo-map a map image and match up all co-ordinates with postal code values! Any suggestions/experiences would be most appreciated. You might want to check out http://toys.lerdorf.com/archives/36-More-fun-with-the-Yahoo!-Maps-API.html . -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: cms type session - how to ?
in infinite wisdom Gregory Machin spoke thus On 11/23/2005 04:28 PM: Sorry for the lack of clarity on the single page... eg : http://127.0.0.1/index.php? where the index.php holds the logic of what is displayed and by passing vars back to it's self determins what is next displayed .. hope that helps.. What you mean is that you want a MVC framework. This might help http://www.onlamp.com/pub/a/php/2005/09/15/mvc_intro.html and this http://www.tonymarston.co.uk/php-mysql/model-view-controller.html#2005-06-21 -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: cms type session - how to ?
in infinite wisdom Gregory Machin spoke thus On 11/23/2005 04:28 PM: Sorry for the lack of clarity on the single page... eg : http://127.0.0.1/index.php? where the index.php holds the logic of what is displayed and by passing vars back to it's self determins what is next displayed .. hope that helps.. What you mean is that you want a MVC framework. This might help http://www.onlamp.com/pub/a/php/2005/09/15/mvc_intro.html and this http://www.tonymarston.co.uk/php-mysql/model-view-controller.html#2005-06-21 -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: cms type session - how to ?
in infinite wisdom Gregory Machin spoke thus On 11/23/2005 04:28 PM: Sorry for the lack of clarity on the single page... eg : http://127.0.0.1/index.php? where the index.php holds the logic of what is displayed and by passing vars back to it's self determins what is next displayed .. hope that helps.. What you mean is that you want a MVC framework. This might help http://www.onlamp.com/pub/a/php/2005/09/15/mvc_intro.html and this http://www.tonymarston.co.uk/php-mysql/model-view-controller.html#2005-06-21 -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: access resources via a proxy
in infinite wisdom Vedanta Barooah spoke thus On 09/09/2005 10:46 AM: what about existing apps... do i need to rewrite them :( if you want to ask if you will need to rewrite the scripts that fetch the data, then yes - I think you will need to rewrite them. I am not sure how these scripts are retrieving data currently, hence I cannot give a definite answer. You will not have to rewrite the scripts which are giving the data. -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php.ini and php.config Tutorial?
in infinite wisdom Vizion spoke thus On 09/09/2005 03:56 AM: If you check the php.ini file that comes with the php source code, you will find it to be heavily commented. If you get stuck on some ini setting, you can always double check it with the php manual As I said in another postiing : Sure -- I did look at those - my feeling is that they are high on providing the facts but low on providing meaning, context and interpretation. The core php.ini settings are explains here http://www.php.net/manual/en/ini.core.php . If you want the settings for a particular extension, (like mysql), you will find an explanation for it in the php.net/ETENSION_NAME (like php.net/mysql) -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php.ini and php.config Tutorial?
in infinite wisdom Vizion spoke thus On 09/08/2005 09:04 PM: Questions: 1. As I am new to php I would appreciated if someone could help me locate a tutorial which not only describes what is in the configuration files (which the distributed configuration files do quite well) but also, some explanations that might be understood by a php neophyte, plus guidance and detailed examples on one might choose on option over another in different circumstances. For those who are not familiar with php the configuration files can appear daunting. If you check the php.ini file that comes with the php source code, you will find it to be heavily commented. If you get stuck on some ini setting, you can always double check it with the php manual 2. Recomendations for forum, wiki and blog modules. Wiki - PmWiki http://rajshekhar.net/content/view/24/26/ Blog - s9y -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: access resources via a proxy
in infinite wisdom Vedanta Barooah spoke thus On 09/08/2005 07:22 PM: A typical scenario: Server A needs to display news, which resides on Server B as RSS feeds. For this the PHP script hosted on Server A need to go via the proxy http://proxy:8088 then read the feed in Server B for it to display… how this can be achieved? Any clues please help!! http://pear.php.net/manual/en/package.http.http-request.proxy-auth.php -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: FTP Chmod problem
Matt Palermo [EMAIL PROTECTED] writes: ftp_chmod($connId, 0777, $folder); The function almost works, but when I check the permission of the folder after it's run, the folder has 410 for permissions instead of 777. So, it is changing the permissions, but not to the correct value. Now when I use the following code, it seems to work fine: $chmodCmd = CHMOD 0777 .$file; ftp_site($connId, $chmodCmd); This properly changes the folder permissions to 777. Does anyone know why the ftp_chmod() function doesn't work correctly? As a side note, the ftp_chmod() function works correctly on a file, but not a directory. Any help is appreciated. Some ftp server (like vsftpd) can be configure to change the mode of all uploaded files . There is a possibility that your server is configure to chmod your files (in vsftpd it is controlled by the file_open_mode option in the config file) -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Generating images on the fly, linking via symlink?
Dan Trainor [EMAIL PROTECTED] writes: Hello, all - This is a question that could depend on a completely different (yet, relayed) subject, so I'm sending this email to both php-general@ and [EMAIL PROTECTED] I thank you in advance for your understanding. I am currently generating some images on the fly using some of PHP's image generation and rendering functions. I'm having loads of success, and like the results that I see. What I'd like this script to do is, to create symlinks to the origional image, and then when the script is done running, the symlinks are deleted. Basically trying to make it so that the origional image is not known to the client or browser. In your page where you display the image, put in the tag img src='imgenerator.php', where imagenerator.php is your script which creates the images. You can add tests in your imagenerator.php script to make sure that the user has some session variables set and the user is not calling the imgenerator directly. That way you will not have to worry about the browser knowing about the original image. However, the user will still be able to save the image to his hard disk. -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Getting queries from files FYI
Robin Vickery [EMAIL PROTECTED] writes: On 8/23/05, Jay Blanchard [EMAIL PROTECTED] wrote: You may (or may not) remember me posting to the list a couple of weeks ago asking about using REGEX to get queries out of PHP files for a migration project. I had to let it go for several days, but started working on it again yesterday, here is the code (no REGEX was used in the making of this code); Just a thought - and I know it's a little late, sorry. Have you considered writing a wrapper for mysql_query() that logs its parameters? (I cannot locate the original post, hence replying to this mail) You can enable logging in mysql server itself to log all queries http://dev.mysql.com/doc/mysql/en/binary-log.html ( there are ways to restrict logging to only some databases) . Later when you want to replay the sql statements, you can use mysqlbinlog -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php vulnerability
Shafiq Rehman [EMAIL PROTECTED] writes: Hi all, Thanx to all of you. My server is running on Linux and there is not any phpbb running on it. If vulnerability is in my code.. Is there any way that I can find the buggy code on my server which allowed that trojan to write into all the index files. I analyzed the apache logs but did not found any thing wrong. My server is protected with firewar and only port 80 is opened. - If you have a backup of your data (which was taken before you detected the crack on your server), it would be a good idea to reload linux on your box and populate it with the sane data. - How did you analyze your apache logs ? - Check out http://public.yahoo.com/~radwin/talks/one-year-of-php-oscon2003.htm especially the security part. -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Be careful! Look at what this spammer did.
Dotan Cohen [EMAIL PROTECTED] writes: I don't really like CAPTCHA's. I'm filtering the content now, which is in my opinion better anyway. In my university one of the computer science projects (for an assignment!) is to break CAPTCHA's. Jpg- bmp and once it's a bmp the white noise and lines can be removed (think photoshop filters), then OCR software extracts the words. It even works on squiggly text with the right fonts installed in the OCR. Not 100%, but it is easier for the computer to decipher than a handicapped person, or a text browser. And I don't want to lock those out. you might find http://www.videolan.org/pwntcha/ helpful -- Raj Shekhar (still trying to get over his email backload) blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: parallel execution of php code?
Martin van den Berg [EMAIL PROTECTED] writes: I have this piece of php-code which inserts data into a database. Before inserting it must verify if the data is unique. The php code looks something like: $query = SELECT id FROM mytable WHERE bla LIKE . $x .; $rows = execute( $query ) if ( $rows == 0 ) { /* some more processing */ $query = INSERT INTO mytable .. etc etc execute( $query ) } Now here is the problem: when the user enters the page, and directly refreshes the record is inserted twice Is is possible that both requests are processed simulatiounsly by the server (apache on linux)? And can I add something like a critical section or semaphore to overcome this problem. There are 2 ways to handle this problem - - create a UNIQUE index on whatever columns you want to be unique in your database. This way, when the user refreshes the page, the second insertion will fail. Of course, it means you will need to handle the duplicate key error that the database will throw up gracefully. - When the page loads, check if the $_SESSION[_insert_success] is set. If not, then do the insert part and if the insert is successful, set $_SESSION[_insert_success]=true. If the variable is set, then do not do the insert part , simply display the page again. -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Running a PHP script everyday
[EMAIL PROTECTED] writes: My host uses cPanel. When I setup the crontab it e-mails me back this response: /bin/sh: public_html/wap/mailer/dailylist.php: /usr/bin/php : bad interpreter: No such file or directory I'm assuming that it means it can't find /user/bin/php I ran a whereis php through a cronjob and got this: Try which php instead. Another option would be to put the php script in the decomentroot of your server. Schedule a cron job on any of your desktop/dev machines to wget that php script. -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Question on exec() to call a php script from a php script
Liang ZHONG [EMAIL PROTECTED] writes: If my php is configured as ( http://liang.ns2user.info/php/info-train06.htm) an apache 2.0 filter module. The php is invoked by apache on request of http client. Can I do an exec() to call another php script to run in the background? If yes, how? This page might be of help http://in2.php.net/manual/en/ref.pcntl.php Though I am quite sure there is an easier way to accomplish whatever you are trying to do by running a background process -- Raj Shekhar blog : http://rajshekhar.net/blog home : http://rajshekhar.net Disclaimer : http://rajshekhar.net/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Redirection after login with security
Adam Hubscher [EMAIL PROTECTED] writes: Problem: I would like to possibly utilize a login system (created on the remote server), that would then check their username and password against the CMS database located there, then redirect with that information (encrypted of course), to the local site where the information gets stored in a session. Then when they go to create a new account, it stores the extra verfied information into the database. However, the issue at hand here is, I'm not sure how secure it would be if I were to say, create a secure login form, verify the data... and then create another pseudo form that directs the person to the local-based site using hidden post variables (this is my original thought on the subject). Is there another way I could go about doing this (ie, a way that I could identify a user that is almost assuredly never going to change) or is there a more secure way? Or, am I on the right track? Maybe instead of passing the password, you can create a unique sessionid for the user. The userid+the sessionid can then be stored in a database and you pass the sessionid ahead instead of passing the password. On the other end, you can check if the userid and the sessionid that you have received has been authenticated or not. (This assumes that the database in which you kept the sessionid is accessible to both the sides). You will also need to store the timestamp of when the sessionid was created and discard old sessionids. -- Raj Shekhar Y! : Operations Engineer MySQL DBA, programmer and slacker Y!IM : lunatech3007 home : http://rajshekhar.net blog : http://rajshekhar.net/blog/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: alternative to mysql_real_escape_string()
[EMAIL PROTECTED] writes: Hello, I have a quick question: To use a custom solution for inhibiting sql injection attacks and not a database specific solution like mysql_real_escape_string() http://php.net/manual/en/function.mysql-real-escape-string.php ... that will run on any database, not just MySql, would the following be a viable solution: a. addslashes() to all variables and I used the Adodb (adodb.sourceforge.net) class for working with the database. It could work to a bunch of DBs (mysql, oracle, pgsql). The most interesting bit about it was that it tool care of escaping the strings before putting the data in the database. Each db had its own backend, which took care of escaping characters. For example, if you want to insert John's Old Shoppe into MS access, it has to go in like John''s Old Shoppe and not John\'s Old Shoppe. I think Pear::DB also provides this functionality. b. remove specific unwanted characters from input including: -- [comment sign in SQL] ' [single quote] It is possible to just destroy the unwanted characters in a login form and prohibit use of those characters in username and password fields. If you prohibit the use of some characters in the password field, your users will be forced to use weak passwords. In this case, your best bet is to insert the md5sum of the users password instead of the cleartext password. -- Raj Shekhar Y! : Operations Engineer MySQL DBA, programmer and slacker Y!IM : lunatech3007 home : http://rajshekhar.net blog : http://rajshekhar.net/blog/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Oracle rpm?
D A GERM [EMAIL PROTECTED] writes: Is there an rpm to install the oracle compnents for version 4.3.4 php? I don't think so. The way to do it is to download the SRPM for the php from your vendor's web site, do a rpm -ivh php-blah.srpm. This will give you a spec file in the /usr/src/SOMETHING/SPEC . Open the spec file in your editor and add --with-oci8 to the compile options. (I think you will find a comment in the spec file which will tell exactly what options to use to get the oracle support) After that you need to do a rpmbuild -bb php-blah.spec to get the rpm that you can then install. PS : Congratulations on getting Oracle installed on Linux :P -- Raj Shekhar Y! : Operations Engineer MySQL DBA, programmer and slacker Y!IM : lunatech3007 home : http://rajshekhar.net blog : http://rajshekhar.net/blog/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Avoiding SQL injections: htmlentities() ?
[EMAIL PROTECTED] writes: So if I could broaden the question and ask, in general, what people recommend for pre-processing data before it goes into a SQL statement.. for security and for things like making sure singlequotes and other special characters are escaped properly? htmlentities() addslashes() (if magic quotes isn't turned on right?) What else? Using some sort of database abstraction library (Pear::Db, Aoddb) also helps. At least Adodb escapes the slashes in a SQL statement before it is sent for execution. Using a library also provides a choke point and you can add your own additional checks in the library without letting the developers worry if they have done all the checks and validations correctly. -- Raj Shekhar Y! : Operations Engineer MySQL DBA, programmer and slacker Y!IM : lunatech3007 home : http://rajshekhar.net blog : http://rajshekhar.net/blog/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Full-text searches sucks?
Ryan A [EMAIL PROTECTED] writes: Hey, I dont want to do that as its only mysql 4.1+ compatable, IN BOOLEAN MODE was added in version 4.0.1 not 4.1, for what it's worth. Oops, thats what i meant. The problem is a LOT of hosts are still on 3.23.xx so I dont want to do the BOOLEAN MODE thing. Here is the workaround that I used. - If the search term is smaller than 3 words, I did a LIKE. - If the search term is greater than 3 words, do a fulltext search i.e. MATCH AGAINST (no BOOLEAN MODE) - If the fulltext search did not find any results, do the search again, but this time use LIKE instead of MATCH AGAINST. This gave me good enough results. -- Raj Shekhar Y! : Operations Engineer MySQL DBA, programmer and slacker Y!IM : lunatech3007 home : http://rajshekhar.net blog : http://rajshekhar.net/blog/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Setting cookies for other domains
Scott Haneda [EMAIL PROTECTED] writes: Cross domain cookies are indeed possible, look at microsoft.com, msn.com and msnbc.com which indeed do share your cookies from one site to the next, however, they do it by redirects and get/post methods, which is perfectly legit since they control those domains. No one outside someone with access to those servers could implement it. I might be wrong on this analysis, but here is how I think the MSN thing works - When you go to hotmail.com, it redirects you to login.passport.com - If you do not have your cookie (from the passport.com domain), which identifies you as a valid MSN network user, you are asked to sign in. After successful sign on, your browser gets a passport cookie. - The passport now redirects you to the hotmail.com and it passes your user information using the url. I think it passes some sort of session id. Since in the background, passport and hotmail share the same database, hotmail can check on a user's authentication based on the session id passed in the URL. - The same thing happens when you go to msnbc.com. You are first redirected to passport.com and your passport.com's cookie is examined. Thus, even though you think that msn, hotmail and msnbc are sharing the same cookie, they are not. It is the passport.com that is doing the dirty work of setting and examining the cookie. -- Raj Shekhar Y! : Operations Engineer MySQL DBA, programmer and slacker Y!IM : lunatech3007 home : http://rajshekhar.net blog : http://rajshekhar.net/blog/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Ensure only one instance of a script is running
Jay Blanchard [EMAIL PROTECTED] writes: [snip] I have a script that inserts data from files uploaded to our server. I need to make sure that only one instance of this script runs at anyone time, can anyone tell me how I can do this? [/snip] Don't run another instance. ba-dump ching! Ok, here is a quick and dirty way to do it, have the script check for the existence of a file containing a date and timestamp, if one does not exist the script creates one. If it does exist, the script exits. Once the script is nearing completion have it destroy the file (unlink). Unluckily, this will not prevent a race condition. The only file operations that are guaranteed to be atomic are mkdir() and symlink(). Try to create the directory and see if it fails. Also remember to rmdir() the lock directory before exiting -- Raj Shekhar Y! : Operations Engineer MySQL DBA, programmer and slacker Y!IM : lunatech3007 home : http://rajshekhar.net blog : http://rajshekhar.net/blog/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Ensure only one instance of a script is running
Mikey [EMAIL PROTECTED] writes: How about grabbing the output from `ps -ax` and looping thourhgthe results to see if your script is being run? Again the problem is of atomicity. This is a multi step process - do a ps -aux - do a grep on the output - start script processing What if second script between step 1 and 2 ? That is why we need something that is guaranteed to complete in 1 step. -- Raj Shekhar Y! : Operations Engineer MySQL DBA, programmer and slacker Y!IM : lunatech3007 home : http://rajshekhar.net blog : http://rajshekhar.net/blog/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Permissions on uploaded image don't allow for over writing
Dave [EMAIL PROTECTED] writes: The Question: How do I allow a user, who is uploading via the web, place an image on the server with permissions that allow the file to be over written? Since you say that the images are uploaded using HTTP, the files will be owned by the user apache (or nobody). The file permission allow read and write to the owner. You do not need to modify them. If the user again uploads the files via HTTP, you do not have to worry about whether he has the permissions to overwrite the files. He *will* be able to overwrite the files. -- Raj Shekhar System Administrator, programmer and slacker home : http://rajshekhar.net blog : http://rajshekhar.net/blog/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Multi-language in script
Zoran Lorkovic [EMAIL PROTECTED] writes: Hi I'm interested, which is the best way to include multi-language support in scripts? By this I mean that with new version of script/program end-user don't need to translate whole site again... See http://www.php.net/gettext or have a look at http://www.onlamp.com/pub/a/php/2002/06/13/php.html for a gentle introduction -- Raj Shekhar System Administrator, programmer and slacker home : http://rajshekhar.net blog : http://rajshekhar.net/blog/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: end of array
M. Sokolewicz [EMAIL PROTECTED] writes: Raj Shekhar wrote: M. Sokolewicz [EMAIL PROTECTED] writes: Raj Shekhar wrote: $n_elts = count($myarray); for ($i=0; $i $n_elts ; $i++) { if ($i = $n_elts -1) ^^^ Use of == required to make it work { echo On last element; break; } else { echo Somwhere in the middle; } } that's an eternal loop in case you hadn't noticed (*rolls eyes*) Oops :( not eternal loop though, only one loop why one? for($i=0; $i$n;$i++) { $i = ($n-1); } My statement was, if ($i = $n_elts -1) { echo On last element; break; } i.e. - assign ($i = $n_elts -1) and check the return value of the assignment. - If the assignment succeeds (which should, unless you are running short of free memory) THEN - echo - BREAK out of loop Since this conditions are met the first time the loop runs, the loop will run only once. I know I am correct, since I ran the code this time :P -- Raj Shekhar System Administrator, programmer and slacker home : http://rajshekhar.net blog : http://rajshekhar.net/blog/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: end of array
Jeffery Fernandez [EMAIL PROTECTED] writes: Hi all, I have a foreach loop on an array and within that loop I need to find if the array has reached the last pointer. I have tried if (next($row)) { } but that advances the pointer. Any tips on finding out if the array pointer has reached the last element ? $n_elts = count($myarray); for ($i=0; $i $n_elts ; $i++) { if ($i = $n_elts -1) { echo On last element; break; } else { echo Somwhere in the middle; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: end of array
M. Sokolewicz [EMAIL PROTECTED] writes: Raj Shekhar wrote: $n_elts = count($myarray); for ($i=0; $i $n_elts ; $i++) { if ($i = $n_elts -1) ^^^ Use of == required to make it work { echo On last element; break; } else { echo Somwhere in the middle; } } that's an eternal loop in case you hadn't noticed (*rolls eyes*) Oops :( not eternal loop though, only one loop -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Search engine
Rosen [EMAIL PROTECTED] writes: Hi, Can someone recommend me a search engine script in PHP for inside one site? If you need to index through static pages phpdig can be useful for you http://www.phpdig.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php installation
hello all, i need to install php, postgresql and apache. i had redhat 7.3 running. i like to know, the comaptible versions of the above three. i couldn't install the current version of the above three as it is asking for GLIBC-2.3. but i had GLIBC-2.2.5 running. it is not possible to update GLIBC. thanks in advance - Do you Yahoo!? vote.yahoo.com - Register online to vote today!
[PHP] PHP 4.3.7 build failed on HP-UX 11.23 IPF
Hello All, I can built PHP 4.3.7 on 11.23 IPF IC71L. But I got core dumped when I give gmake test. I used the following steps to build: $ ./configure --prefix=/opt/hpws/apache/php --with-apxs2=/opt/hpws/apache/bin/apxs --with-gettext --with-xml $ gmake $ gmake test /bin/sh: 13218 Memory fault(coredump) gmake: [test] Error 139 (ignored) $ gcc version 3.3.2. Note: In HP-C compiler, the gmake test hangs. Regards, Durai. __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Secure login script
On Mon, 31 May 2004 16:11:07 -0600, René Fournier [EMAIL PROTECTED] wrote: If I MUST learn these two things in order to copy the security of the sample script, I will, but is it really necessary in your opinion? Let me see. Will you let a surgeon who does not know how to handle a scalpel to operate upon you ? It is good to know the tools you are going to use . You can simply copy paste the code and it might or might not work. However when some trouble crops up and you have no idea where to look, you will be in real trouble. Regards Raj Shekhar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql blob and phpmysqladmin
On Thu, 13 May 2004 17:53:20 -0400, Jianping Zhu [EMAIL PROTECTED] wrote: I have mysql table call com. One colum of table com will store user's comments. Because user-provided comment might be too big to fit in char(255), i use blob. but when i try to see it by use phpmysqladmin, i can only see something like [BLOB 345 byes] i can not read the text of the comment. Is there a way to let see the user-provide comments from phpmysqladmin? In the latest phpmysqladmin, a T is formed in the upper right part of the table which have data of type blob (when you choose to browse a table) . Clicking on the T will show the text stored in blob. Regards Raj Shekhar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: thumbnails of images
Edward Peloke epeloke at echoman.com writes: won't the gd library do this? http://www.php.net/manual/en/function.exif-thumbnail.php I have used Imagemagick to convert images to highres to thumbsize and watermark images. I had used GD library to do this earlier but Apache gave me some funky memory limit exceeded errors whenever I tried to load the image bigger than 2M using imagecreatefromjpeg . This was a problem when I was using the stock PHP 4.3.something + Apache2 combination that comes with Fedora Release 1. imagecreatefromjpeg worked well when I used Red hat 9 (PHP 4.2.2 + Apache 2.0.40). /*Using imagemagick function to watermark and resize images*/ $cmdmakethumb = composite -size .$thumbwidth .x.$thumbheight -quality 40 -compose Over -gravity center .$GLOBALS['watermark_thumb_image']. $filename +profile \*\ -resize .$thumbwidth .x.$thumbheight $dstthumb ; system($cmdmakethumb); $GLOBALS['watermark_thumb_image'] - gives the absolute path of the image which has to be placed as a watermark on the thumbnail $filename - the absolute path of the high res image that has to be resized $thumbwidth - width of the thumbnail $thumbheight - height of the thumbnail {had a function which gave the height and width based on high res image's width and height} $dstthumb - absolute path of the thumbnail image. I have a few functions to handle images. I can mail them offline to you if you want. Regards \/ (oo) +ooO-- -Ooo-+ |Raj Shekhar| |System Administrator | |Media Web India| |http://www.netphotograph.com | +---+ |__|__| || || ooO Ooo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] web-based survey form design : PHP MySQL
Hi all, I am newbie in PHP. I am just learning the PHP through tutorials and this mailing list. I have very first goal of doing one project Design web-based survey using PHP and MySQL. I would appreciate if anybody give me some links that help to develope such skills. Thanks and sorry for asking a lazy question. Dipendra __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem running php
Hi, Though i am running php on apache server on my win98 machine perfectly, recently i install apache and php on my win2000 server, apache start very well but php is not working, as it seems, though when i run phpinfo out of my server with php.exe it runs but it dosen't show in browser whenever i go through localhost\phpinfo.php. What's matter. I faced this problem on my win98 maching too, but somehow it worked, and probable that too after installing PWS and making script executable one. I will thankful to you if u solve my problem with explanation. Regards, Raj k Bhatt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] problem running php
Hi, Though i am running php on apache server on my win98 machine perfectly, recently i install apache and php on my win2000 server, apache start very well but php is not working, as it seems, though when i run phpinfo out of my server with php.exe it runs but it dosen't show in browser whenever i go through localhost\phpinfo.php. What's matter. I faced this problem on my win98 maching too, but somehow it worked, and probable that too after installing PWS and making script executable one. I will thankful to you if u solve my problem with explanation. Regards, Raj k Bhatt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]