-
R_PPC_REL24 relocation out of range
Date: 11/29/05
Keywords: php, web, apache
Looking all over the web for this error and a solution or workaround, but so far no luck. That is, I've found some mention of others with the problem, but no solutions. A few posts mentioning -fPIC flag to the compiler, but I've been doing that.
Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: R_PPC_REL24 relocation at 0x0e56191c for symbol `floor' out of range
Any ideas? I'm using Apache 2.0.55, kernel 2.6.10-1.ydl.1 on a PPC 750, with PHP 5.0.5 built as a DSO.
Source: http://community.livejournal.com/php_dev/62432.html
-
obfuscation and encoding
Date: 10/29/05
Keywords: php, security, web
i have a case where i'm trying to provide some unsubscribe functionality via a link to a website in an email. i need to encode some information in the url, specifically a user id and a list so i know who they are and which list they are unsubscribing to. Security is of course important, I don't want anyone to be able to just submit with random user ids and lists so i need to encode it with some sort of obfuscation, but also with a checksum or something that would prevent tampering or at least let me know.
Anyone have any experience with this or ideas? ideally, i'd like to use something readily available in PHP (and also perl if possible since the encrypting part will happen in perl, but presumably i could port easily enough). maybe like generate a url string, such as "user_id=x&list=y", base64 encode it (which also shrinks it and is a plus) and then add a crc byte on the end? then my url would be http://www.example.com/file.php?hash="gobbledygook"
does anyone know of something in PHP that would do this? if not any suggestions for rolling your own (like algorithms, i don't need actual code probably unless you either have it, know of it on a free site, or really feel like writing it ;-) ) maybe using compression utils with a password? that would i think require recompiling php or using external programs which is doable, but not as desireable. plus if someone guessed the password, they could decrypt, but i suppose that is true for any algorithm that's one way. perhaps using ssl or pgp somehow? having 2 keys, then no one could decrypt it without the private key? that might be overkill. or mhash for hashing, but then might that be easy to crack and can it be computed in perl?
xposted to php
Source: http://www.livejournal.com/community/php_dev/61842.html
-
obfuscation and encoding
Date: 10/29/05
Keywords: php, security, web
i have a case where i'm trying to provide some unsubscribe functionality via a link to a website in an email. i need to encode some information in the url, specifically a user id and a list so i know who they are and which list they are unsubscribing to. Security is of course important, I don't want anyone to be able to just submit with random user ids and lists so i need to encode it with some sort of obfuscation, but also with a checksum or something that would prevent tampering or at least let me know.
Anyone have any experience with this or ideas? ideally, i'd like to use something readily available in PHP (and also perl if possible since the encrypting part will happen in perl, but presumably i could port easily enough). maybe like generate a url string, such as "user_id=x&list=y", base64 encode it (which also shrinks it and is a plus) and then add a crc byte on the end? then my url would be http://www.example.com/file.php?hash="gobbledygook"
does anyone know of something in PHP that would do this? if not any suggestions for rolling your own (like algorithms, i don't need actual code probably unless you either have it, know of it on a free site, or really feel like writing it ;-) ) maybe using compression utils with a password? that would i think require recompiling php or using external programs which is doable, but not as desireable. plus if someone guessed the password, they could decrypt, but i suppose that is true for any algorithm that's one way. perhaps using ssl or pgp somehow? having 2 keys, then no one could decrypt it without the private key? that might be overkill. or mhash for hashing, but then might that be easy to crack and can it be computed in perl?
xposted to php
Source: http://community.livejournal.com/php_dev/61842.html
-
Mail form
Date: 10/26/05
Keywords: php
Hello!!
I have made a PHP mail form on my site.. but it's doesn't seems to work..Do you know why? Do you have any advices? :)
thank you!! I'm very new to PHP and I'm a little bit confused..
EDIT:
:)
I have found the PHP script here : http://www.ibdhost.com/contact/
and my form action should be here
Let me know if you need more informations.. thanks again!!
Source: http://www.livejournal.com/community/php_dev/61489.html
-
Mail form
Date: 10/26/05
Keywords: php
Hello!!
I have made a PHP mail form on my site.. but it's doesn't seems to work..Do you know why? Do you have any advices? :)
thank you!! I'm very new to PHP and I'm a little bit confused..
EDIT:
:)
I have found the PHP script here : http://www.ibdhost.com/contact/
and my form action should be here
Let me know if you need more informations.. thanks again!!
Source: http://community.livejournal.com/php_dev/61489.html
-
INI handling functions... They were nonexistent as far as I knew...
Date: 10/11/05
Keywords: php, mysql, database, sql, web
This has irked me for some time: The lack of INI handlers in PHP.
I was moving my website around from host to host, until I settled, and needed a universal standard that I could write on and rely on that would work anywhere as I really wouldn't have a MySQL database everywhere I went. So I wrote this up after not finding a shred of a command for userlevel INI file handling. INI.Lib (Last Built Oct. 3rd, 2004)
I hope some other people can make some use out of it as well I was able to. If you see any major errors or when you use it you can't for the life of you get past a certain bug, let me know and I will see if this one is any real difference from my current build (Apr. 3rd 2005). I may have just patched up a few commands here and there with my build that I caught in the original code and done a few optimizations. If anyone wants the current build, go ahead and drop me a line to cynagen at cynagen dot com, and I'll be more than happy to send you a copy of the current copy on my server; if enough of you report problems, I'll just repackage my current build and post that instead.
(X-Posted on October 10th 19:54)
Source: http://www.livejournal.com/community/php_dev/61141.html
-
INI handling functions... They were nonexistent as far as I knew...
Date: 10/11/05
Keywords: php, mysql, database, sql, web
This has irked me for some time: The lack of INI handlers in PHP.
I was moving my website around from host to host, until I settled, and needed a universal standard that I could write on and rely on that would work anywhere as I really wouldn't have a MySQL database everywhere I went. So I wrote this up after not finding a shred of a command for userlevel INI file handling. INI.Lib (Last Built Oct. 3rd, 2004)
I hope some other people can make some use out of it as well I was able to. If you see any major errors or when you use it you can't for the life of you get past a certain bug, let me know and I will see if this one is any real difference from my current build (Apr. 3rd 2005). I may have just patched up a few commands here and there with my build that I caught in the original code and done a few optimizations. If anyone wants the current build, go ahead and drop me a line to cynagen at cynagen dot com, and I'll be more than happy to send you a copy of the current copy on my server; if enough of you report problems, I'll just repackage my current build and post that instead.
(X-Posted on October 10th 19:54)
Source: http://community.livejournal.com/php_dev/61141.html
-
PHP Programmers Needed
Date: 10/05/05
Keywords: no keywords
Hello everyone!
Please bare with me because I'm completely new at asking for help, or requesting interest.
I work for a new coming of age petsite called "Teripets" and although we do have our own programmers, we are currently seeking new programmers to help us get things up and running.
I realize that many of you have "real" jobs, but this site means a lot to those that use it on a day to day basis. We are here to make sure people have fun and enjoy the things we have to offer. The site is mainly run by volunteering since we are still using advertisements to pay for our host -- so unfortunately to anyone that wishes to help us out, this will be a volunteer job. We are hoping to change this in the future.
If anyone is interested, you may contact me directly (sunlicked@msn.com) or please contact the site's owner at Chris@teripets.com
Thank you so much for your time
--Melissa
Source: http://www.livejournal.com/community/php_dev/60789.html
-
PHP Programmers Needed
Date: 10/05/05
Keywords: no keywords
Hello everyone!
Please bare with me because I'm completely new at asking for help, or requesting interest.
I work for a new coming of age petsite called "Teripets" and although we do have our own programmers, we are currently seeking new programmers to help us get things up and running.
I realize that many of you have "real" jobs, but this site means a lot to those that use it on a day to day basis. We are here to make sure people have fun and enjoy the things we have to offer. The site is mainly run by volunteering since we are still using advertisements to pay for our host -- so unfortunately to anyone that wishes to help us out, this will be a volunteer job. We are hoping to change this in the future.
If anyone is interested, you may contact me directly (sunlicked@msn.com) or please contact the site's owner at Chris@teripets.com
Thank you so much for your time
--Melissa
Source: http://community.livejournal.com/php_dev/60789.html
-
fake 404 error redirection.
Date: 10/04/05
Keywords: php, apache
ok, so maybe I have this thought out incorrectly, so I am looking for some advice.
In my apache config we have
ErrorDocument 404 /path/to/file.php
so that anything that receives a 404 response should get redirected...
I have a script..
header("HTTP/1.1 404 Not Found");
?>
This sends a 404 message. I would expect it to redirect to the ErrorDocument, but it doesn't Is this what is suppose to happen? or am I missing a piece to the puzzle?
Source: http://www.livejournal.com/community/php_dev/60484.html
-
fake 404 error redirection.
Date: 10/04/05
Keywords: php, apache
ok, so maybe I have this thought out incorrectly, so I am looking for some advice.
In my apache config we have
ErrorDocument 404 /path/to/file.php
so that anything that receives a 404 response should get redirected...
I have a script..
header("HTTP/1.1 404 Not Found");
?>
This sends a 404 message. I would expect it to redirect to the ErrorDocument, but it doesn't Is this what is suppose to happen? or am I missing a piece to the puzzle?
Source: http://community.livejournal.com/php_dev/60484.html
-
PHP and Forms
Date: 10/04/05
Keywords: php, java
I'm after a bit of help with a complex form i have on my site. I am aware that this may actually be a Javascript issue, but i'm only "advanced beginner" in PHP, so i'm not too sure. hopefully if i explain my goal, someone can pooint me in the right direction, or offer up some code :)
I have a form that has a row of drop-down menus, that when each one is selected and filled out, the variables should all amke up one long instruction. For example the first box might be numbers 1 to 10, the second box might be a list of fruit. by selecting the number (say 3) and then the fruit (say apples) '$var1 $var2' would eaqual '3 apples'. So, what i would like to happen is when a submit button is pressed, '$var1 $var2' is written to a textarea underneath the form, and '3 apples' would be shown in the textarea. But it doesn't end there! I'd also like the user to then be able to select another '$var1 $var2' combination, and upon submit have it add that underneath the first one in the textarea.
And as a final piece, pressing a second submit button underneath the textarea will pass the texarea variable onto the next page of the form (which i plan to store in a hidden var). I can kind of figure out this final part, but it all depends onhow the other stuff is done i guess.
I'm really hoping it isn't javascript, or at least not too much, heh. Any help or pointers? :)
please, and thanks! :)
paul.
Source: http://www.livejournal.com/community/php_dev/60274.html
-
PHP and Forms
Date: 10/04/05
Keywords: php, java
I'm after a bit of help with a complex form i have on my site. I am aware that this may actually be a Javascript issue, but i'm only "advanced beginner" in PHP, so i'm not too sure. hopefully if i explain my goal, someone can pooint me in the right direction, or offer up some code :)
I have a form that has a row of drop-down menus, that when each one is selected and filled out, the variables should all amke up one long instruction. For example the first box might be numbers 1 to 10, the second box might be a list of fruit. by selecting the number (say 3) and then the fruit (say apples) '$var1 $var2' would eaqual '3 apples'. So, what i would like to happen is when a submit button is pressed, '$var1 $var2' is written to a textarea underneath the form, and '3 apples' would be shown in the textarea. But it doesn't end there! I'd also like the user to then be able to select another '$var1 $var2' combination, and upon submit have it add that underneath the first one in the textarea.
And as a final piece, pressing a second submit button underneath the textarea will pass the texarea variable onto the next page of the form (which i plan to store in a hidden var). I can kind of figure out this final part, but it all depends onhow the other stuff is done i guess.
I'm really hoping it isn't javascript, or at least not too much, heh. Any help or pointers? :)
please, and thanks! :)
paul.
Source: http://community.livejournal.com/php_dev/60274.html
-
Help with Regex
Date: 07/22/05
Keywords: no keywords
I need some help with a regex string.
What I want to match is this:
All characters that appear between the first space after the character 'a' and the character 'z' EXCEPT for the characters that appear before the first white space after the letter 'i'.
Confused?
Here's an example:
Ok - I've got a string that looks like this:
"abc defgh ijk z"
What I want to return is "defgh"
If the string is like this:
"abc def gh ijk lm n opq z"
Then I'd want to return this:
"def gh lm n opq"
Anyone got any ideas on how to do this?
Source: http://www.livejournal.com/community/php_dev/60148.html
-
Help with Regex
Date: 07/22/05
Keywords: no keywords
I need some help with a regex string.
What I want to match is this:
All characters that appear between the first space after the character 'a' and the character 'z' EXCEPT for the characters that appear before the first white space after the letter 'i'.
Confused?
Here's an example:
Ok - I've got a string that looks like this:
"abc defgh ijk z"
What I want to return is "defgh"
If the string is like this:
"abc def gh ijk lm n opq z"
Then I'd want to return this:
"def gh lm n opq"
Anyone got any ideas on how to do this?
Source: http://community.livejournal.com/php_dev/60148.html
-
PHP_SELF versus SCRIPT_NAME
Date: 07/08/05
Keywords: php
Apparently there is plenty of debate over which is better (more portable, best practice, preferred, etc.) What is the concensus? I've been using PHP_SELF since I first started using PHP, but lately I've had to convert some 3rd party applications, and found that only SCRIPT_NAME really worked 100% of the time. Digging deeper I found this to be common question, though I never had to deal with it until now: how should your script refer to itself?
Source: http://www.livejournal.com/community/php_dev/59743.html
-
PHP_SELF versus SCRIPT_NAME
Date: 07/08/05
Keywords: php
Apparently there is plenty of debate over which is better (more portable, best practice, preferred, etc.) What is the concensus? I've been using PHP_SELF since I first started using PHP, but lately I've had to convert some 3rd party applications, and found that only SCRIPT_NAME really worked 100% of the time. Digging deeper I found this to be common question, though I never had to deal with it until now: how should your script refer to itself?
Source: http://community.livejournal.com/php_dev/59743.html
-
Xoops
Date: 07/04/05
Keywords: no keywords
Any xoops developers around here? If so, are you interested in writing a simple module for me?
Source: http://www.livejournal.com/community/php_dev/59528.html
-
Xoops
Date: 07/04/05
Keywords: no keywords
Any xoops developers around here? If so, are you interested in writing a simple module for me?
Source: http://community.livejournal.com/php_dev/59528.html
-
Optimising MySQL
Date: 06/28/05
Keywords: mysql, database, sql, google
I'm working on a site at the moment and I'm trying to optimise the MySQL queries, to place less of a strain on the server and make generally neater code. I'm currently using this technique to pull the last 10 topics flagged as news from the database:
$query = mysql_query( "SELECT * FROM frm_topics t WHERE t.tpc_news = '1' AND t.tpc_news_mod_id > 0 ORDER BY t.tpc_sticky DESC, t.tpc_time DESC LIMIT 10", $_GLOBALS[ 'sql' ] );
Then in the loop created by $results = mysql_fetch_array( $query ) using a second query to pull the content of the post:
$news_sql = mysql_query( "SELECT * FROM frm_posts p WHERE p.pst_tpc_id = '".$results[ 'tpc_id' ]."' ORDER BY pst_time ASC LIMIT 1", $_GLOBALS[ 'sql' ] );
Now, although this works, it currently uses 11 queries, plus various others I'm using to create each page; so I'm trying to find a neater solution. I've tried some tutorials on sub-queries found on Google, to no avail. The following works if there's only one news topic but falls over if there's more:
$query = mysql_query( "SELECT * FROM frm_posts p, frm_topics t WHERE p.pst_tpc_id = ( SELECT tpc_id FROM frm_topics t WHERE t.tpc_news = '1' AND t.tpc_news_mod_id > 0 ORDER BY t.tpc_sticky DESC, t.tpc_time DESC LIMIT 10 ) AND t.tpc_id = p.pst_tpc_id ORDER BY p.pst_time ASC LIMIT 1", $_GLOBALS[ 'sql' ] );
I'd really appreciate it if anyone could lend a hand or point me in the right direction.
Source: http://www.livejournal.com/community/php_dev/59389.html