Blog Entry not showing

Hi,
I am trying to implement ALLOY on our website. I started up an AWS Linux 2, Python 2.718 webserver. Uploaded, adjusted the Editor with hashed password, created some blogs… published (I tried the folder name /novidades, instead of “blog”… but then switched back. The index file is index.php"). Long story short… Nothing shows… What is wrong?

What version of PHP is your server running?

Provide us a copy of your project file please, along with a link to the live site.

Additionally it would also be helpful to have a copy of your posts folder as well.

Create a ZIP file containing your project file and the posts from your server. This is the file you open in RapidWeaver to edit your site. After creating the ZIP file, upload it using a service like Dropbox, WeTransfer, Droplr, or a similar service to create download link for us. Paste that download link in your reply.

Hi Adam,
http://test.embatek.com.br/blog/index.php
is the page

is the download link.
PHP, as said is 2.7.18. I am on a AWS Linux2 EC2 instance for testing. HTTPS is not working yet.
I saw, that I can also not upload pictures into blogs… must be the same culprit.

Hm, is PHP not something like 7.x as version?

Unfortunately that is not what was stated. You said Python originally:

PHP and Python are completely different things. That said, you need to be running PHP 7.4. I’ve never used AWS so I don’t know if they support PHP or not. If so I suspect you have to install it yourself. I’m pretty sure S3 does not support PHP.

I’ve uploaded a test of your project to my server, which meets Alloys requirements, and everything is working as it should. You can log into the Editor here: Editor | embatek

user: admin
password: password

Write a post, upload an image, etc and give it a try. Then you can view it on the blog page: novidades | embatek

Haha… I am so out of shape with Linux…
I mixed up PHP with Python… starts with a “P”…
so PHP is 8.0.2… obviously… Sorry about this…

Woow… great support… So… I KNOW that python and PHP is different things… I really do not know why I commit such a slip… hehe.
But… hey… so… the culprit is PHP 8.x… I will downgrade then… and see it it works… thank you.
i am the guy who renounced his licence (had my site static on S3… ) … still have to rebuy… Will do as soon as installed… Thanks a lot

I installed version 7.4… Uploaded all fresh, reset a new password hash, but still… cannot upload pictures, cannot see the posts on the “novidades”, which is “news” in Portuguese page.
I think something is wrong with my PHP, mariadb, setup. Can anyone tell me where to look?

Foundry doesn’t use a database, so no need for MariaDB.

Do you have access to a server that is not Amazon based? If so you might publish a test there.

Also, if you provide me a copy of your PHP Error Log file I can have a look at it and see if I can’t suss anything out. That said your project file seems to be working as expected here in my tests, so I don’t think it is something with Alloy itself, but I could be wrong.

here it comes

[ec2-user@ip-172-31-9-60 ~]$ sudo tail -f /var/log/httpd/error_log
[Wed Aug 31 18:35:51.721217 2022] [php7:notice] [pid 3197] [client 104.28.63.119:58883] PHP Notice:  Undefined index: page in /var/www/html/e
ditor/index.php on line 1031, referer: http://test.embatek.com.br/editor/index.php?tab=blog
[Wed Aug 31 18:35:51.721221 2022] [php7:notice] [pid 3197] [client 104.28.63.119:58883] PHP Notice:  Undefined index: page in /var/www/html/e
ditor/index.php on line 1032, referer: http://test.embatek.com.br/editor/index.php?tab=blog
[Wed Aug 31 18:35:51.721232 2022] [php7:notice] [pid 3197] [client 104.28.63.119:58883] PHP Notice:  Undefined variable: prefix in /var/www/h
tml/editor/index.php on line 1091, referer: http://test.embatek.com.br/editor/index.php?tab=blog
[Wed Aug 31 18:35:51.721237 2022] [php7:notice] [pid 3197] [client 104.28.63.119:58883] PHP Notice:  Undefined variable: authorList in /var/w
ww/html/editor/index.php on line 1091, referer: http://test.embatek.com.br/editor/index.php?tab=blog
[Wed Aug 31 18:35:51.721241 2022] [php7:notice] [pid 3197] [client 104.28.63.119:58883] PHP Notice:  Undefined variable: categoriesList in /v
ar/www/html/editor/index.php on line 1098, referer: http://test.embatek.com.br/editor/index.php?tab=blog
[Wed Aug 31 18:35:51.721315 2022] [php7:notice] [pid 3197] [client 104.28.63.119:58883] PHP Notice:  Undefined variable: blogPostSmallLabelPl
aceholder in /var/www/html/editor/index.php on line 1141, referer: http://test.embatek.com.br/editor/index.php?tab=blog
[Wed Aug 31 18:35:51.721338 2022] [php7:notice] [pid 3197] [client 104.28.63.119:58883] PHP Notice:  Undefined variable: tagsplaceholder in /
var/www/html/editor/index.php on line 1269, referer: http://test.embatek.com.br/editor/index.php?tab=blog
[Wed Aug 31 18:35:51.721345 2022] [php7:notice] [pid 3197] [client 104.28.63.119:58883] PHP Notice:  Undefined index: HTTPS in /var/www/html/
editor/index.php on line 150, referer: http://test.embatek.com.br/editor/index.php?tab=blog
[Wed Aug 31 18:35:55.682825 2022] [php7:error] [pid 3197] [client 104.28.63.119:58883] PHP Fatal error:  Uncaught Error: Call to undefined fu
nction imagecreatetruecolor() in /var/www/html/editor/files/upload.php:59\nStack trace:\n#0 /var/www/html/editor/files/upload.php(99): resize
_crop_image(90, 60, '/tmp/phpKfZuL5', '/var/www/html/e...')\n#1 {main}\n  thrown in /var/www/html/editor/files/upload.php on line 59, referer
: http://test.embatek.com.br/editor/index.php?tab=blog
[Wed Aug 31 18:36:00.352620 2022] [php7:error] [pid 3203] [client 104.28.63.119:59176] PHP Fatal error:  Uncaught Error: Call to undefined fu
nction imagecreatetruecolor() in /var/www/html/editor/files/upload-easymde.php:59\nStack trace:\n#0 /var/www/html/editor/files/upload-easymde
.php(99): resize_crop_image(90, 60, '/tmp/phpCXRvwh', '/var/www/html/e...')\n#1 {main}\n  thrown in /var/www/html/editor/files/upload-easymde
.php on line 59, referer: http://test.embatek.com.br/editor/index.php?tab=blog

I take it you configured your PHP install yourself correct? If so, be sure you installed the GD Library. As that is where your two errors originate:

Here my phpInfo.
http://test.embatek.com.br/phpinfopcf.php

It seems here that GD is installed… Could tell me if something is amiss here? So sorry for my problems. But… we are a business and are already AWS customers… so I wanted to stay with them. An Lightsail was not possible because none in SouthAmerica region. So I spun up a EC2 instance and installed PHP, HTTP and some other stuff… Did I forget anything?
yours
P

I can’t really give server setup and configuration help. It is not my area of expertise. I’m especially not familiar with AWS. I pay for a host to handle that stuff for me so I don’t have to be and can concentrate on what other things.

Beyond that I don’t provide such a service with the purchase of my products even if I was an expert in server setup and maintenance.

As for your PHPInfo – I’m not seeing GD Support listed anywhere, so this indicates to me that it is not installed. I’d suggest installing it for PHP 7.4 again and then restart your Apache server.

ok… installed GD support… now I can add pictures in the blog editor… but… I still see no entries when I open “novidades” .
Anyway… thank you so much. I completely understand your reluctance, on the other hand an Amazon EC2 Linux2… is supposed to be a plain vanilla setup.
The error log now only say “undefined index”

itor/index.php?tab=blog
[Wed Aug 31 21:09:49.455476 2022] [php7:notice] [pid 3241] [client 104.28.63.45:23124] PHP Notice:  Undefined 
variable: allFuturePosts in /var/www/html/editor/index.php on line 1800, referer: http://test.embatek.com.br/e
ditor/index.php?tab=blog
[Wed Aug 31 21:09:49.455593 2022] [php7:notice] [pid 3241] [client 104.28.63.45:23124] PHP Notice:  Undefined 
index: mode in /var/www/html/editor/index.php on line 2227, referer: http://test.embatek.com.br/editor/index.p
hp?tab=blog
[Wed Aug 31 21:09:49.455600 2022] [php7:notice] [pid 3241] [client 104.28.63.45:23124] PHP Notice:  Undefined 
index: mode in /var/www/html/editor/index.php on line 2300, referer: http://test.embatek.com.br/editor/index.p
hp?tab=blog

Those are notices and are not errors. You can disregard those, they will not halt the code’s execution.

That said, these are on the Editor page, and not the blog page, which you’re saying you’re still having problems with.

Yes, but most hosts out there do not install purely vanilla setups because people need and use many of the PHP libraries by default. If you’re running your own server that stuff falls on you to handle and troubleshoot. Another reason I pay a host to handle that stuff. Running one’s own server comes with a lot of responsibility and needing to wear a lot of hats. I definitely get what I pay for by using a host instead of doing it myself.

AWS might be cheaper, but it has cost you a lot of time already just today.

This is the error Chrome developer tools is reporting back on that page:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

If you have a separate PHP error log for that page share it with us. An error 500 is really vague usually. Could be a lot of things, but it will likely be server related.

The server error.log file says

[ec2-user@ip-172-31-9-60 ~]$ sudo tail -f /var/log/httpd/error_log
[Wed Aug 31 21:46:04.523944 2022] [php7:notice] [pid 3268] [client 68.202.143.222:62666] PHP Notice:  Undefine
d index: extension in /var/www/html/editor/index.php on line 137
[Wed Aug 31 21:46:04.523949 2022] [php7:notice] [pid 3268] [client 68.202.143.222:62666] PHP Notice:  Undefine
d variable: urlID in /var/www/html/editor/index.php on line 493
[Wed Aug 31 21:46:04.524000 2022] [php7:notice] [pid 3268] [client 68.202.143.222:62666] PHP Notice:  Undefine
d index: mode in /var/www/html/editor/index.php on line 2227
[Wed Aug 31 21:46:04.524005 2022] [php7:notice] [pid 3268] [client 68.202.143.222:62666] PHP Notice:  Undefine
d index: mode in /var/www/html/editor/index.php on line 2300
[Wed Aug 31 21:46:04.524010 2022] [php7:notice] [pid 3268] [client 68.202.143.222:62666] PHP Notice:  Undefine
d index: mode in /var/www/html/editor/index.php on line 2402
[Wed Aug 31 21:46:04.524014 2022] [php7:notice] [pid 3268] [client 68.202.143.222:62666] PHP Notice:  Undefine
d index: mode in /var/www/html/editor/index.php on line 2454
[Wed Aug 31 21:46:04.524017 2022] [php7:notice] [pid 3268] [client 68.202.143.222:62666] PHP Notice:  Undefine
d index: mode in /var/www/html/editor/index.php on line 2529
[Wed Aug 31 21:46:04.524025 2022] [php7:notice] [pid 3268] [client 68.202.143.222:62666] PHP Notice:  Undefine
d index: mode in /var/www/html/editor/index.php on line 2657
[Wed Aug 31 21:46:04.524028 2022] [php7:notice] [pid 3268] [client 68.202.143.222:62666] PHP Notice:  Undefine
d index: mode in /var/www/html/editor/index.php on line 2793
[Wed Aug 31 21:46:04.524032 2022] [php7:notice] [pid 3268] [client 68.202.143.222:62666] PHP Notice:  Undefine
d index: mode in /var/www/html/editor/index.php on line 2856

Yeah, again all notices, no errors. These will not halt the execution of the code or cause any problems.

I loaded your posts using your project file, both which you supplied to me previously, on my server, and they’re working fine there: novidades | embatek

Seems like a server error of some sort. If it were a PHP error there’d be an error mentioned in the log.

and the php-fpm/www-error log says…
some Variable $urlID and $urlCategory seem not to get defined.
can you make any sense of this? Help really appreciated.

[ec2-user@ip-172-31-9-60 log]$ sudo tail -f /var/log/php-fpm/www-error.log
[31-Aug-2022 15:43:27 UTC] PHP Warning:  Undefined variable $urlID in /var/www/html/blog/index.php on line 901
[31-Aug-2022 15:43:27 UTC] PHP Warning:  Undefined variable $urlCategory in /var/www/html/blog/index.php on li
ne 901
[31-Aug-2022 15:43:27 UTC] PHP Warning:  Undefined variable $urlTag in /var/www/html/blog/index.php on line 90
1
[31-Aug-2022 15:43:27 UTC] PHP Warning:  Undefined variable $urlSearch in /var/www/html/blog/index.php on line
 901
[31-Aug-2022 15:43:27 UTC] PHP Warning:  Undefined variable $urlID in /var/www/html/blog/index.php on line 915
[31-Aug-2022 15:43:27 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mb_strlen() in /var/ww
w/html/blog/files/truncate.php:7
Stack trace:
#0 /var/www/html/blog/index.php(920): truncateHTML('', 350)
#1 {main}
  thrown in /var/www/html/blog/files/truncate.php on line 7

Best suggestion I can make: get a real web host. You are spinning your wheels for no particularly good reason. I believe Adam already stated he can’t provide server setup and configuration help … which is exactly what you’re asking for.

Avoid Amazon S3 (unless super simple website … which yours isn’t) and avoid GoDaddy. I’m sure lots of us can provide good hosting suggestions. The good hosting options are not expensive.

… this just seems … a bit crazy on your part.

1 Like

Again, most of those are notices. If it says Notice next to it ignore it. You need to pay attention for lines that are labeled as Errors.

The one Error that stands out in that log file is this one:

31-Aug-2022 15:43:27 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mb_strlen() in /var/ww
w/html/blog/files/truncate.php:7

This again comes from not having a PHP extension installed. If you give Uncaught Error: Call to undefined function mb_strlen() a search on google you’ll find that you need to install the mbstring extension in your PHP setup. Again this is not a vanilla extension, but one that most hosts install by default for customers.