Jump to content

btherl

Staff Alumni
  • Posts

    3,893
  • Joined

  • Last visited

Everything posted by btherl

  1. Does header.php produce any output? This includes blank lines outside the php tags.
  2. "Array" means you tried to echo an array, instead of echoing an item from the array. You can use var_dump() or print_r() to see the structure of the item you want to display.
  3. You might find some useful info in the list of php.ini directives. session.gc_maxlifetime is the time before your server will delete old sessions. session.cookie_lifetime is how long the session cookie lives for in the user's browser. For the session configuration, sessions typically use a cookie, but they also store data on the server. Some options relate to the cookie, others to the data.
  4. Yes that is rather confusing. I'll attempt to offer a simpler explanation (Which you can correct if necessary) You have a set of users. You want to make a request using those usernames, and making the request is fine. Then you will get an XML response back including data for each username, and you want to parse that data and use it. Does that sound right? Do you have an idea already of how you will parse the XML response or are you looking for a way to do that?
  5. $nickname comes from the list of actual directories, not from the user's nickname. So it doesn't need further processing before going into fopen(). Mark's initial suggestion is still better though, from the POV of an experienced programmer.
  6. BBCode and similar things should always be done on output. That allows you to be flexible, in case you want to disable a tag and have that change be retrospective, for example. If you did those conversions on input then you'll have a big headache trying to find where the conversions took place. It's part of the general principle of storing data in a form that can be easily manipulated by your program, and only converting it to the user readable form when it needs to be read by a user. It also allows you to display those tags in different ways for different purposes, such as an RSS feed, or XML.
  7. You don't need the select. alter table is a command on its own. Try this: ALTER TABLE t CHANGE COLUMN old_name new_name INTEGER Make sure you give the same type as the column was before. The docs say this:
  8. The regexp for \W or space is /[\W ]/ The regexp for \W followed by space is /\W / About the syntax, illegalChars is an object. You can call an object's methods, but you cannot call an object itself. "test" is a method of illegalChars. As an analogy, you could say btherl.eat(burger), but not btherl(burger), otherwise I wouldn't know what to do with the burger.
  9. You can use the ALTER TABLE command. Or an admin interface like mysqladmin should be able to do this also.
  10. As for in-process threads (like posix threads) rather than processes, I'm pretty sure php doesn't support them. We may be able to give some more detailed help if you give us your php version, OS and architecture (eg php 5.2.3 on Windows XP SP2 with Intel E2180).
  11. mysql_fetch_row() fetches a result row as an integer indexed array. will give you the column names.
  12. And the join option.. SELECT * FROM favorites JOIN songs USING (song_id) WHERE user_name = '$user_name'
  13. You can fetch the expiry value from the database and then compare it. Or you can ask the database to compare it for you. Are you already fetching the expiry value from the database? If so, please show the code. How to do the comparison depends on what format the date is in.
  14. Each option tag should be closed. To set the default, you mark one of them as "selected" like this: echo "<option value='$industry' selected>-Any Dicipline-</option>"
  15. When you want to apply conditions to aggregated values (such as a count), you must use "having" SELECT category FROM posts GROUP BY category HAVING count(*) > 1 ORDER BY category ASC Try this out. HAVING is applied after GROUP BY. I'm not sure if it'll work with distinct, but group by is equivalent to distinct.
  16. Actually, no it won't, because of the order of evaluation. But you can do this: echo "<tr> <td style='text-align: center; font-weight: bold'> Date & Time</td> <td>"; choosedatetime(); echo "</td> </tr>";
  17. echo "<tr> <td style='text-align: center; font-weight: bold'> Date & Time</td> <td>" . choosedatetime() . " </td> </tr>"; should work.
  18. Those queries look fine to me .. which one gives the error?
  19. Thanks for that link. The problem is with php unfortunately, not the filesystem. We use the same filesystems here with 64 bit php and it deals with files over 2GB without trouble. It's just this particular job had to run on an older 32 bit machine (using the same fs via nfs). In the end we resolved it by making the necessary changes to have the job run on a 64 bit machine. aschk, we have both 32 bit and 64 bit OS here, and use 32 bit php on the 32 bit ones and 64 bit php on the 64 bit ones I'm not sure if you can make a 32 bit php on the 64 bit OS. But you definitely can't make the 64 bit on on a 32 bit OS.
  20. The operation in question is fopen() followed by fwrite(). When I tested it on the 32 bit php 4.3.10, it stopped writing at 2^31 - 1 bytes and crashed. So it's not about 2 gb php script I hope no-one has written one of those..
  21. I'm looking for a summary of php's issues with file sizes, but have been unable to find anything useful in google. From what I can tell from experimenting, the 32 bit php (version 4.3.10) cannot handle any file larger than 2GB, but the 64 bit php is ok. Is there anything I should know? Is a later version of 32 bit php able to handle large files? Thanks!
  22. Buy "uses php" do you mean it makes an ajax call back to a php script? popup0x() itself is a javascript function, so you should be able to download that one even if it's in another page. Whether you can get anything useful from the definition is another question..
  23. popup0x() is a javascript function. It must be defined somewhere. Either it is defined on the same page, or on a page included by that page. You need to find where it's defined so you can see what it does.
  24. popup0x() will either be on the page itself, or in another page included from that page (probably in the head section at the top).
  25. Are you writing the exact same contents to the file as you do to the browser? Perhaps you should try giving the file the ".html" extension instead, which will have it rendered in a browser when someone opens it.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.