Well that's it, I just pulled my last hair out so now I have to ask. (can't find what I need in a search either)
I've created a page in page builder, Arcade, now I'm trying to get index.php to run within it, (free games room script)
I've tried an html block and php block but I either get a blank white screen or my page with no block at all.
If I type in the url it all works fine,
Is this even possible? Or am I now bald for nothing?
I've included the file index.php that I'm trying to run within the block just in case someone can help with this.
|
First of all:
Have you done the right modifications to the code to make Dolphin accept the php blocks?
If not please follow this thread:
http://www.boonex.com/unity/forums/#topic/Add-PHP-blocks-to-Pagebuilder-for-D7.htm
If you have already done it, please in your php ini switch on the display_errors = On
I think it's probably something wrong with the path to the file.
Web Development, Multimedia Design and Social Media. |
When using a PHP block make sure the code is placed in the block WITHOUT the opening and closing php tags <?PHP and the ?> are not to be included when used in a block.
https://www.deanbassett.com |
Thanks YobiLab
The code changes in that post for BxDolPageViewAdmin.php "have not been done"
So even though I used Deanos tools 1.8.1 to add a php block to my new page do I need to make these changes?
I'm running 7.0.4
And yes deano92964 I knew to exclude the <?PHP and the ?>
Thanks for the help guys,
|
No. The blocks mod is not needed if your using my tools.
The other possible issue might be that it's not finding the includes it needs.
For example this is one of your includes.
require_once("./includes/corefunctions.php"); // Load the AMCMS3 functions
Now. this is going to try and look for this one folder back relative from the folder the page the block is loading on. Thats what the ./ does. These loads are relative so may not be correct when used in a dolphin block.
So try replacing these with the full path to where these files reside on your server.
https://www.deanbassett.com |
Thanks Deano
I'll give that a try and will let you know,
|
Just entered the full path throughout that index.php file with no better luck.
Did get this error though,
PHP Parse error: syntax error, unexpected '<' in /home/******/public_html/inc/classes/BxDolPageView.php(597) : eval()'d code on line 1
I've removed the <?PHP and the ?> from the php block.
|
There is no reason for that error if the php tags were removed.
Do you have the dolphin page block cache turned on? If so, shut it off or try clearing your cache files.
https://www.deanbassett.com |
Could you please attach that file here.
We will check it
Web Development, Multimedia Design and Social Media. |
All cache were off but cleared the cache via ftp anyway,
I'm not getting the error any more, just a blank white screen.
Thanks Yobilab, here are the files.
|
To prevent this, I often just create my php content or widget in its own directory. For example, lets say, I want to present my photos from the database in a unique way. Of course, I'm going to have to use PHP to do this. This is how I would approach it:
1) Create a directory with a name like "uniquephotos" in the root of dolphin
2) Create my script using something like the script below, (then naming it something like "myphotos.php")(:
$querystring ("SELECT * FROM bx_photos_main");
while ($rows = mysql_fetch_assoc($querystring)) {
$ID = $PhotoID;
echo "<div> <img src=" . $pathtophotos . $PhotoID . ".jpg" </div>"...
}....yadda, yadda, yadda....(of course, this is dummy mock-up code
3) Save the file to the newly created "uniquephotos" directory
4) Create my Php Block using Deanos Tools or the PHP Block Mod and in that box, simply do an include or a require like this
include('uniquephotos/myphotos.php');
5) Done.
----------------------------------
I do it this way because it allows me to quickly create little mods without cluttering up my blocks with coding. Hope this helps someone with some ideas.
|
All cache were off but cleared the cache via ftp anyway,
I'm not getting the error any more, just a blank white screen.
Thanks Yobilab, here are the files.
mhh the file is fine..
There must be somwthing wrong in the php code you are trying to include.
Web Development, Multimedia Design and Social Media. |
Thanks for the input Chap1978
I tried the include, page comes up but no block displayed,
received this error.
PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening 'http://*******.com/arcadem/index.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/********/public_html/inc/classes/BxDolPageView.php(597) : eval()'d code on line 1
|
Thanks for the input Chap1978
I tried the include, page comes up but no block displayed,
received this error.
PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening 'http://*******.com/arcadem/index.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/********/public_html/inc/classes/BxDolPageView.php(597) : eval()'d code on line 1
As I said this is a problem with the include.
Be sure to give that the full path.
Could you please paste here the include function you are using and tell us where you have exactly placed this file?
Web Development, Multimedia Design and Social Media. |
Want to thank you guys for all the effort you're putting into this.
The include I tried is,
include 'http://*******.com/arcadem/index.php';
and the file is in,
http://*****.com/arcadem/index.php
|
Want to thank you guys for all the effort you're putting into this.
The include I tried is,
include 'http://*******.com/arcadem/index.php';
and the file is in,
http://*****.com/arcadem/index.php
Is the file in the same domain name where Dolphin is installed?
Web Development, Multimedia Design and Social Media. |
I would use a relative path
include ('arcadem/index.php');
Then manually clear your cache via FTP, then clear your browser cache. 90% of the time when I see this message it's a caching issue.
|
Send me your web address...I will try to check it out. |
Yes, Dolphin is installed to the root of my domain.
If I type in the url
http://*****.com/arcadem/index.php
the arcade script and all the games work perfectly.
Just can't get it going within a php block.
|
Yes I think chap is right.
You should not use the http address on your include function..
Web Development, Multimedia Design and Social Media. |
Odd, when I use the full url in the include include 'http://*******.com/arcadem/index.php'; I get the page up but with no block,
when I use include 'arcadem/index.php'; I get a blank white screen.
|
Please provide a screenshot that shows what you say for "no block" Web Development, Multimedia Design and Social Media. |
I have to go now.
If you do not find anyone else able to help you with this, PM me and tomorrow I 'll give it a deeper look.
Or send a mail at test@yobilab.com
Bye for now
Web Development, Multimedia Design and Social Media. |
Are you putting the include statement in parentheses like:
include('arcadem/index.php');
|
Which page are you trying to add this to? I'm at the site, but don't know where the block is supposed to be located. Please advise. |
This is it,
include('arcadem/index.php');
Just get a white screen now.
|
Still trying to get this to work and might have just made some headway, that is if anyone can tell me what this error is about.
PHP Warning: require_once() [<a href='function.require-once'>function.require-once</a>]: URL file-access is disabled in the server configuration in /home/******/public_html/inc/classes/BxDolPageView.php(597) : eval()'d code on line 1
|
Well that does not make sense. The error means that allow_url_fopen is off. That PHP setting is supposed to be on. It's one of dolphins requirements per this doc. http://www.boonex.com/trac/dolphin/wiki/DolTech
The reason i say it makes no sense, is because if this php option is indeed off you should be having problems with some features of dolphin. If fact, you can't properly register a dolphin licence key without this option on.
https://www.deanbassett.com |
Checked and allow_url_fopen is on.
No doubt a result of all my screwing about with this script,
thanks to all who tried to help with this, time to move on.
|