Notice: Undefined variable: content in (...)\index.php on line 34 #2

Closed
opened 2021-03-14 21:49:32 +00:00 by alexvf · 3 comments
alexvf commented 2021-03-14 21:49:32 +00:00 (Migrated from github.com)

Apache v2.4.33
PHP v7.2.4

I just uploaded the files to my web server, edited the variable "$base_url" in index.php, and loaded the blog on the web browser.
I get the message "Notice: Undefined variable: content in C:\xampp\htdocs\blog\index.php on line 34".

I tried both relative and absolute URLs in the "$base_url"variable and the results were the same.

I also tried to load the available page (2018-10-30.txt) directly using http://127.0.0.1/blog/?post=2018-10-30 and the page loads fine, without errors.

The problem seems to be only in the "home page" of the website.

Apache v2.4.33 PHP v7.2.4 I just uploaded the files to my web server, edited the variable "$base_url" in index.php, and loaded the blog on the web browser. I get the message "Notice: Undefined variable: content in C:\xampp\htdocs\blog\index.php on line 34". I tried both relative and absolute URLs in the "$base_url"variable and the results were the same. I also tried to load the available page (2018-10-30.txt) directly using http://127.0.0.1/blog/?post=2018-10-30 and the page loads fine, without errors. The problem seems to be only in the "home page" of the website.
paintedsky commented 2021-03-25 18:29:41 +00:00 (Migrated from github.com)

Hi Alex,

Thanks for making this issue. I suspect the problem has to do with running the app via XAMPP instead of on a "real" web server, but I will investigate this (I have XAMPP on my machine as well, just haven't tried using it for this yet) and let you know what I find. If it's not too onerous to update this so it will work on local environments as well, I'll do so.

Hi Alex, Thanks for making this issue. I suspect the problem has to do with running the app via XAMPP instead of on a "real" web server, but I will investigate this (I have XAMPP on my machine as well, just haven't tried using it for this yet) and let you know what I find. If it's not too onerous to update this so it will work on local environments as well, I'll do so.
paintedsky commented 2022-11-15 20:02:37 +00:00 (Migrated from github.com)

Closed as version 1.1 has tested successfully while running XAMPP on localhost.

Closed as version 1.1 has tested successfully while running XAMPP on localhost.
alexvf commented 2022-11-16 22:36:12 +00:00 (Migrated from github.com)

It's working great.
Thanks!

It's working great. Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: paintedsky/dead-simple-blog#2
No description provided.