11
Liliplanet
Re: Strange error in custom PHP blocks
  • 2006/4/19 22:31

  • Liliplanet

  • Just popping in

  • Posts: 31

  • Since: 2006/4/16


Thank you for your reply.

Still deleting and then upgrading, bit of a nightmare, seems now have files on my computer that are corrupt and crashing.

Hope it works tomorrow.

Thank you for your help and would appreciate your assistance once all is back up ... if there is the problem.

3 am here ... till later.
Lilian

12
Will_H
Re: Strange error in custom PHP blocks
  • 2006/4/20 0:28

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


While your script follows the correct syntax I thought that when you selected php script as the content of the block, XOOPS automatically added the tags around the script. So what I am getting at is that you essentially have this

<?PHP
<?PHP
$number=3;
$category=5;
include("/home/mysite/edition/show_news.php");
?>
?>

Would this cause problems with the script.... Beats the hell outta me.

Its just that whenever I use a php script I omit the tags and it works great

13
etoolman
Re: Strange error in custom PHP blocks
  • 2006/4/20 8:54

  • etoolman

  • Just popping in

  • Posts: 9

  • Since: 2006/3/20


I had the same problem running 2.0.13. Most all of my custom blocks would not work, but almost all of the affiliate banner I was running would not show up. I did a source view of the page to find out that there was no HTML/PHP code at all in the custom blocks.

After reading this post I decided to try something drastic, so I backed up everything and upgraded from 2.0.13 to 2.2.3a. This still did no solve the problem, but did totally screw up the front page center blocks. I found out that it was easily fixed by going into the blocks admin page and setting which pages they are supposed to be visible.

Last I decided to try the latest update from 2.2.3a to 2.2.4 out of desperation. Although at now the code for the link shows up, the image code is not showing up. After a little testing it seems that XOOPS has problems with images that are external to the site itself. At least from what I can see that is the problem.

Has anyone else used external images in a block and had it work. Sometimes it will work, but most of the time there is nothing but blank.


eToolMan
Tools & Tech - eCommerce Resource Center

14
etoolman
Re: Strange error in custom PHP blocks
  • 2006/4/20 8:54

  • etoolman

  • Just popping in

  • Posts: 9

  • Since: 2006/3/20


I had the same problem running 2.0.13. Most all of my custom blocks would not work, but almost all of the affiliate banner I was running would not show up. I did a source view of the page to find out that there was no HTML/PHP code at all in the custom blocks.

After reading this post I decided to try something drastic, so I backed up everything and upgraded from 2.0.13 to 2.2.3a. This still did no solve the problem, but did totally screw up the front page center blocks. I found out that it was easily fixed by going into the blocks admin page and setting which pages they are supposed to be visible.

Last I decided to try the latest update from 2.2.3a to 2.2.4 out of desperation. Although at now the code for the link shows up, the image code is not showing up. After a little testing it seems that XOOPS has problems with images that are external to the site itself. At least from what I can see that is the problem.

Has anyone else used external images in a block and had it work. Sometimes it will work, but most of the time there is nothing but blank.


eToolMan
Tools & Tech - eCommerce Resource Center

15
etoolman
Re: Strange error in custom PHP blocks
  • 2006/4/20 8:56

  • etoolman

  • Just popping in

  • Posts: 9

  • Since: 2006/3/20


Sorry about the double-post. I accicently double-clicked the submit button...

16
PocketLnt
Re: Strange error in custom PHP blocks
  • 2006/4/20 14:15

  • PocketLnt

  • Just popping in

  • Posts: 4

  • Since: 2006/4/19


Just to not be rude and not post, I found the solution to my problem using some rather drastic measures.

I loaded up the block's information from the block_instance table in phpmyadmin and copied only the PHP code into an external editor. Sure enough, in the editor I could see that my escape characters themselves were not being escaped for storage my MySQL.

In another words, the strings were being stored in MySQL with the format:

printf("<table align=\"right\">\n");

Instead of the necessary:

printf("<table align=\\"right\\">\\n");

So I manually edited the files to escape the necesary characters, changed the character count variable, and poof. It worked. I'm sure this does not help with most of the other individual's problems on here, but this helped my specific problem.

Login

Who's Online

233 user(s) are online (151 user(s) are browsing Support Forums)


Members: 0


Guests: 233


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits