Jump to content

charlie321

Members
  • Posts

    55
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

charlie321's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. Thanks for the suggestions. I did find a solution which seems funky, but worked. In php.ini I changed the save session to an empty string. I had seen this fix in another search. Hope this is a permanent fix. Not sure but we will see! Charlie
  2. OK.. Yes godaddy has been little help. They never got back to me and after finally figuring out how to get to the phpinfo file in cpanel, it was set to php 7.4 instead of 5.6 which is what they told me it had been set to. Water over the dam I guess. At any rate I checked in the phpinfo file and it looks like it is set to the correct file path in php.ini. BUT IT STILL DOESN'T WORK! After several hours of screwing around with this I am at a loss again. I did see that possibly set the save session to /tmp could work, but i haven't done that as I am afraid of doing more damage. I am not sure how to move forward with this but would really like to get it fixed! Any more suggestions please? Charlie
  3. Thanks so much. With your information I am hoping godaddy will be able to fix this. Charlie
  4. I am not sure if this is a cpanel problem or coding problem. I found another post from 4 years ago with almost an identical error code and it had something to do with an ini file in the cpanel i think. I am not very good with the cpanel, so im at a loss. I talked with several people from godaddy yesterday. They said they can't help even though whatever they did caused the problem. This is for a golf leage that I wrote most of the code for several years ago. They could take me back to php 5.6. This was written around 5.2 I believe. I am not very good with php! This is the error I am getting: start error [28-Mar-2024 12:52:36 UTC] PHP Warning: session_start(): open(/var/cpanel/php/sessions/ea-php56/sess_6308705c679006fc92d1c71ffed09d18, O_RDWR) failed: No such file or directory (2) in /home/rgxb6tc5wk5q/public_html/golf/login/login.php on line 20 [28-Mar-2024 12:52:36 UTC] PHP Warning: session_start(): Failed to read session data: files (path: /var/cpanel/php/sessions/ea-php56) in /home/rgxb6tc5wk5q/public_html/golf/login/login.php on line 20 end of error. Sure would appreciate any help!! Please let me know if you need code. Charlie
  5. We had to update our Linux server from php 5.4 to php 7.4. Something has changed and I have a feeling it is due to changes in fputcsv. When running the code below, instead of opening a csv file in libre calc, it fills the browser with the result. Is there a way of fixing this so I get the csv file again? <code>date_default_timezone_set("America/New_York"); $filename = "import.csv"; $fp = fopen('php://output', 'w'); header('Content-type: application/csv'); header('Content-Disposition: attachment; filename='.$filename); $then = time() - 3601; $query = "SELECT * FROM ppb_listings where user_id = '4' and unix_timestamp(start_time) > $then"; $result = mysqli_query($conn, $query); while($row = mysqli_fetch_row($result)) { fputcsv($fp, $row); } echo $result; exit; ?> </code> Thanks for any help.
  6. Hi... Thanks so much for your help. Think I figured it out. Works this way: <code> $then = time() - 3601; $query = "SELECT * FROM ppb_listings where user_id = '4' and unix_timestamp(start_time) > $then"; </code> Nothing better than finally figuring out a stupid problem!!
  7. Thanks for the info. I tried your query and does the same thing. (nothing) I'm wondering if possibly it has something to do with sql or something. I even tried making it a week and it still finds nothing. Anyone have any other suggestions?
  8. Hi I am sorry. I forgot to mention that. start_time is a datetime field. And yes.. If starttime is 7pm, and query for the csv file, all records starting at 7pm would show up show up on the csv file until approximately 7:59 PM. Thanks for your consideration.
  9. I am trying to import into a csv file and filter the results to a particular user and only results based on the time the data was uploaded within one hour. In other words anything not uploaded within the last hour of the start_time will not appear in the csv file. Everything works fine except for the time part. I get no results at all with the 'and unix_timestamp........ For all I know possibly I am way off with my effort. The field name is start_time. Here is code below. Appreciate any help. <code> header('Content-type: application/csv'); header('Content-Disposition: attachment; filename='.$filename); $then = time() + 3601; $query = "SELECT * FROM ppb_listings where user_id = '4' and unix_timestamp(start_date) < $then"; $result = mysqli_query($conn, $query); while($row = mysqli_fetch_row($result)) { fputcsv($fp, $row); } echo $result; exit; </code>
  10. OK It does parse an html file on my localhost server. So what changed the ability to parse an html file? Linux, php, windows? Just curious to find out why I can do it on localhost (workbench-windows) and not on linux-mariadb. Thanks.
  11. No.. Actually I have been saying that from the beginning of this thread. If I tried to pass this from the html file to the php file it passed nothing or 0. That was on my mariadb server. If I passed it on my localhost workbench server it worked. When I changed the html file to a php file ie test.php it worked on both servers. Like I said I'd love to know why even though I did find a work around. The original html and php scripts for this is in the original thread above.
  12. OK I have no idea why but I changed the html file to a php file and echoed the form. It actually works now on both the localhost and server. time() just would not pass from my html localhost script. I would love to know why. It might have something to do with the fact that my localhost is workbench and the server is mariadb. Or the server could be a newer version of php. Really appreciate the help and suggestions.
  13. OK I think I understand. You threw me off by calling the semi-colon a colon. Unfortunately that did not solve the problem.
  14. You are talking about a semi-colon not colon? You are talking about the php script? What specific line are you talking about?
×
×
  • 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.