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.
if (isset($_POST['submitflag'])) { foreach ($_POST as $key => $value) { echo "$key = $value "; } echo '
'; }
if (isset($_POST['submitflag'])) { foreach ($_FILES['photo'] as $key => $value) { echo "$key = $value "; } echo ''; }
// Move the uploaded file to the Member Photos Directory. $uploaddir = 'D:\\TravelNet\\Member%20Photos\\'; $uploadfile = $uploaddir . basename($_FILES['photo']['name']);
echo '
'
; if (move_uploaded_file($_FILES['photo']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.; } else { echo "Possible file upload attack!; }
echo 'Here is some more debugging info:'; print_r($_FILES);
print "";
?>
include('./footer.inc.php'); ?>
And here's the output from the post and the files array...
Warning: move_uploaded_file(D:\TravelNet\Member%20Photos\Feeling-Blue.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in G:\Special\Intranet\dev\ulphoto.php on line 74
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\PHP\uploadtemp\php177A.tmp' to 'D:\TravelNet\Member%20Photos\Feeling-Blue.jpg' in G:\Special\Intranet\dev\ulphoto.php on line 74
Possible file upload attack! Here is some more debugging info:Array ( [photo] => Array ( [name] => Feeling-Blue.jpg [type] => image/jpeg [tmp_name] => C:\PHP\uploadtemp\php177A.tmp [error] => 0 [size] => 22304 )
)
Any help you guys can provide would be appreciated.
I've been working on a random sql row script, but I am sort of stumped at the last part...
Since I am not familiar with php, I have been trying to learn by reading up on the functions, and looking at the code for different scripts that sort of do what I want, and seeing if I can merge them together to fully do what I want (I apologise if this is a bad thing, but it helps me learn ... u_u)
Anyway, the script is pretty much a "random cast"... Similar to how the Livejournal Quizzes are (only this will be used with vBulletin). Type in how many fields you want, type in the name of the characters/whoever, select their gender, and it results in randomly selecting a person from the appropriate table. I have the first two, but I haven't attempted to do the gender specification yet -- however, the last one is what gives me trouble. It will display a random entry, but it will be the same entry for all the fields, like this:
Boogeyman is played by: Name#1 Scarecrow is played by: Name#1 Dorothy is played by: Name#1
I found a way to display three different entries, however, it will display the three different entries beside just one name/custom field like this (as an example):
Boogeyman is played by: Name#1Name#2Name#3 Scarecrow is played by: Dorothy is played by:
I apologise if this seems vague, but since I am not very knowledgable I'd feel stupid trying to explain myself like I'm an expert D: I have been trying to figure this out on my own for a few days and seem to keep hitting the same dead ends. Does anyone have any ideas?
никак не могу найти решение для (как мне казалось) простой задачи. Ситуация такая: на сайт загружается графический файл. Его название и номер объекта, к которому относится этот файл, заносятся в таблицу. При этом мне те же значения ('$id','$filename') нужно занести в ещё в одну таблицу. Можно ли сделать это за один прогон? Мне не знаком вариант insert с двумя таблицами. Может вы что-то подскажете?
спасибо!
upd sorry, a wrong community (or a wrong lanuage for the rihgt community) the question was if it’s possible to insert values into two tables at once – I upload a file and insert information about this file into two tables (PHP&MySQL). I’d like to know if there is a way to do it with one insert only …
I'm pretty new to db design. I had a class on MS Access/SQL back at PSU, but never really used it. So, I'm familiar, but I still don't know how to figure things out very well.
Anyway, here is my problem: I am attempting to make a db for the upcoming college bowl season. Every year, my family picks the bowl games and whoever wins gets a special prize. I want to make it into a db this year, though, so that you can view any pickset without having to see ALL of them (there are 28 bowls + at least 10 people, so you can see that is a ton).
I tried making a table with the bowls in it like this:
ID | Name | Winner ------------------------------ 1 | Bowl 1 | Team 1 2 | Bowl 2 | Team 2
then tried making a table with the picks in it like this:
ID | Name | Pick ------------------------- 1 | Jim | Team 1 2 | Tony | Team 2
but as you can see that doesn't work out, because each person only gets one pick in the table.
So the next thing I tried was making a seperate table for each person's picks with just the bowl name and the pick in it. It seems like that will amount to a ton of tables, though, so I'd rather try something more compact.
The next thing I toyed around with was making a table like so:
Table: Pickset
ID | Name | Bowl 1 | Bowl 2 | Bowl 3 -------------------------------------------------------- 1 | Jim | Pick 1 | Pick 2 | Pick 3 2 | Tony | Pick 1 | Pick 2 | Pick 3
But I can't figure out how to relate it to the other table. Maybe I don't need to? I will be using PHP to display it on the web, by the way.
Basically I want the page to say:
Display Picksets: Jim [ ] Tony [ ] SUBMIT
So that whatever you check off will display in a nice table.
So every year my friends and I do a Secret Santa exchange (the basic idea under a normal setup is to take a set of n names and derange them, so each person buys a gift for someone else, the 'secret' part being that nobody knows who's shopping for whom)... but we have a large group and there's some people who simply don't know each other, so being the programmer that I am, I scripted up a few PHP pages and a database to allow people to sign up to partipate, and then select the members that they would be willing to shop for. Ideally, I can call the "assignment" algorithm, write the results back to the database, and never know who has whom.
The trick now is to write an efficient (ideally! correctness is vital, no approximations! and n is not THAT large that exponential is out of the question) algorithm to find the shopping assignments OR prove that the input does not allow an assignment where every participant is: 1) being shopped for by exactly one person and 2) shops for exactly one person other than himself
Algorithmically speaking:
GIVEN: D, a simple digraph (no loops), where a node is a person and an edge from X to Y indicates X is willing to shop for Y
FIND: D', a subset of D, where forall v in V, indegree(v) = outdegree(v) = 1. D' need not be connected (there is no guarantee D is). OR prove that given D, there is no satisfying D'.
CONSTRAINTS: Must be correct. Time is key. A large but reasonable amount of space may be used. Bonus points if the algorithm can be randomized (or even produces different output if you start at a different node, so long as other constraints are still met).
Since I have a small n, I can play around with insane solutions like "select a random assignment, check for validity, if not valid repeat"... but it seems like there should be some sort of algorithm to do this, but at the same time, I wonder if maybe it is more difficult than it seems...
Hello! I am working on a site where users will create an account, which will grant them access to a subdirectory via .htpasswd. So I made the form, found some slick code that allows a PHP script to add users to .htpasswd, got it all put together, tried it, and *crash*. I get this error: fopen(): SAFE MODE Restriction - in researching it, I find that it's because the .htpasswd file is in my client's account root, and my php script is in the public_html directory and it won't work that way. Now, I have NO clue if the .htpasswd file needs to be where it is or not. Any ideas? Also, do any of you have any ways to work around the other issue or am I SOL?
I'm looking for a way to open a zip file, and decompress a text file that's in it, allowing it to be opened and parsed. I've found several very useful ones, but they use a specialized library for it. Believe me, if I could use that library, I would, but there's no way my host would install it, and unfortunately, switching hosts is not an option(not my decision).
I need something that will allow me to do the above, but without installing anything on the server besides a php script.
Hello everyone As an update to my previous post, I've started playing with mod_rewrite, which so far is working out great, just got 1 problem though, passing variables through the page. Example, I had a page called main.php and each page is passed though using p. Soo i can link's like this
but now I has form's and such like, now before I just simply put in the form action
main.php?p=1&action=addtask
but now, how do I go about putting that into .htaccess, to grab action. But...and this is a big thing I'm asking for, all of the page's have a common select box, for changing offices (dont ask :)) so I need that to work on everything, again simular thing
?p=$p&office=officename
where $p, the current page, so if I was on p=3 then it would be 3, obviously. Anyway, the first page, ict/mytasks, works, but anything else, nope, well it wont.
every other variable passed, other than p, are charactors/text, only p is a number. Anyone any idea's? Cheers.
i'm looking for a php script of an online store for tshirts, mugs and that kind of crappy merchandise. the thing is that i want the client to be able to choose the kind of shirt ( sleeves, no sleeves, etc ) and then choose an image from a galery and sees a preview of the whole ( shirt + image )
Still operating off of PHP 4.2.2. I decided tonight was the night for change (and losing hair).
I am clueless when it comes to linux but that's the OS (Linux 9.0) I got up and running to create an intranet prototype of my site. I've never actually configured PHP before but am trying to get 5.1.1 up and going. From the previous version, apparently Linux enabled a LOT of PHP configurations (according to phpmyadmin). I'm running into a lot of walls errors with libxml and other --with configs. So my question is two part:
1) what NEEDS to be configured?
2) If I come back later to configure something else to PHP, do I have to include ALL ./config statements, INLCUDING ones I may have done upon previous configuring?
(This is why I use windows and Dreamweaver for development :)
I am trying to set-up my own guestbook and blogging software on my site (http://www.tavishmisra.com/) but it is not letting me run PHP or CGI scripts. How do I enable this on my server?
I plowing along, trying to get a PHP script to work. I've using some pieces of code that I've gotten from other various sites saved as .php files. One I'm using displays a thumbnail of a filename that is past to it. No problem. I echo out a img src tag in my main script with the external filename and arguments and it displays it fine.
Now the problem. After chosing a thumbnail, entering some form elements, etc, it goes to another script that is suppose to resize the files in a directory that was chosen. It doesn't display the files, just copies them over to a new directory. This code is in a external file (in the same directory) named resizeandwatermark.php. How do I call this file from within (and pass it it's needed values, aka source and destiante filenames) my main php script?
I appreciate the help. I'm banging my head against this.
I am beginning to work on multiple sites on my home test server and need to set up virtual hosts.
My server is running SuSE 10 with Apache 2, and is accessed by typing in "talon" in firefox's address bar. I copied vhosts.template to site1.conf and edited it as follows:
Next I opened /etc/hosts and edited as follows:
Then, rcrestart apache2.... ok.
And here is where I am stumped.. (and btw I googled the bit about /etc/hosts - i'm not sure if that's how it should be). If I type in http://talon/site1 Apache says page can't be found. If I try http://site1 page can't be found. My site1 files exist in the DocumentRoot listed in the site1.conf file above.
I also read through apache's documentation on virtual hosts but the way they explained it didn't make as much sense to me.
Thanks for any and all help.. I've wanted to learn vhosts for some time now.
There should be a 1 pixel high (black) row after "Show/Hide Specifications". In IE this appears as expected. In Firefox the row appears to be 3 pixels tall instead of 1.
What do I need to do to code tables correctly for Firefox? I'm still learning so please be nice.
I have a DB. Had RedHat 9.0. Went to Ubuntu (I love it). I've been setting everything back up. Before wiping the drive, I copied my entire DB folder (had mysql folder and my db folder). I thought that was sufficient to back it up. Upon installing Ubuntu, I apparently have a newer version of MySQL.
I usually use phpmyadmin to manage the db. It's going crazy with errors not being able to find tables (mainly .frm files).
I think I made a serious mistake. Was I supposed to use some kind of export command before making it portable? Is there any way of even getting my tables into a normal view? At this point, I don't even mind manually entering everything as long as I can get it viewed!
Warning: Your privilege table structure seems to be older than this MySQL version! Please run the script mysql_fix_privilege_tables that should be included in your MySQL server distribution to solve this problem!
I'm on Linux (Ubuntu). where is this function/module and how do you call it? Through mysqladmin?