wts03202509 Posted June 20, 2007 Share Posted June 20, 2007 I'm doing a database query tool. On 1 report, I allow the user to click on the value of the first field, this in turn calls a php program via href. In this second report, I allow the same thing but I'm href'ing a different php program from the 2nd report. The problem is that no matter what I do, the href in the 2nd called php program keeps referencing the href that was used in the first php program called. In bullet form: php program1 > allows user to click on node name, this calls php program2 via href, php program2 > creates another report, allows user to click on serial # and pull report, calls php program3 my problem is that when php program 2 tries to call php program3 via the href, it keeps referring to itself even though the href clearly references another program (php program 3). Is there some limitation on how many times you can call a php program from a php program? Link to comment https://forums.phpfreaks.com/topic/56403-limitation-on-how-many-php-programs-can-be-called/ Share on other sites More sharing options...
effigy Posted June 20, 2007 Share Posted June 20, 2007 The only limitations I'm aware of are how many connections the server allows and how much memory you have. What do you mean by referencing/referring? Is something being cached, perhaps? Link to comment https://forums.phpfreaks.com/topic/56403-limitation-on-how-many-php-programs-can-be-called/#findComment-278557 Share on other sites More sharing options...
ball420 Posted June 20, 2007 Share Posted June 20, 2007 you can call up as many as you want only limitation is from the server he's right Link to comment https://forums.phpfreaks.com/topic/56403-limitation-on-how-many-php-programs-can-be-called/#findComment-278558 Share on other sites More sharing options...
wts03202509 Posted June 20, 2007 Author Share Posted June 20, 2007 How would I programatically (or otherwise I guess) eliminate caching as the issue? The syntax that I use for these calls is as follows: print '<td NOWRAP>'."<a href=\"Allfields-50.php/$href_top_x\">$href_top_x</a>".'</td>'; I use $PATH_INFO in my called program to grab the parameters. Link to comment https://forums.phpfreaks.com/topic/56403-limitation-on-how-many-php-programs-can-be-called/#findComment-278575 Share on other sites More sharing options...
Caesar Posted June 20, 2007 Share Posted June 20, 2007 It looks to me like you're not formatting your links correctly. What's with the forward slash after the .php page? Also.... print '<td NOWRAP>'."<a href=\"Allfields-50.php/$href_top_x\">$href_top_x[/url]".'</td>'; <?php echo'<td NOWRAP><a href="Allfields-50.php'./.'$href_top_x.'">'.$href_top_x.'[/url]</td>; ?> But I'm still not clear on what you're doing. Would have to see the rest of your code...or how the link is actually echo'ing out. Link to comment https://forums.phpfreaks.com/topic/56403-limitation-on-how-many-php-programs-can-be-called/#findComment-278584 Share on other sites More sharing options...
effigy Posted June 20, 2007 Share Posted June 20, 2007 You can use headers or append a random number to the query string. Caching was just a guess though--I don't understand what you're trying to communicate. If you view the source, is the URL correct? Link to comment https://forums.phpfreaks.com/topic/56403-limitation-on-how-many-php-programs-can-be-called/#findComment-278587 Share on other sites More sharing options...
wts03202509 Posted June 20, 2007 Author Share Posted June 20, 2007 The URL is correct in my code. I have no idea why the href is referencing the code of the calling program. The / slash after the php is a way of feeding parameters to the php program. I got it from tips and tricks on zend. This way you dont need to do all the variable name=value stuff. You just list it as a URL and break out all the values from the $PATH_INFO array. so you can do stuff like a href=reporting.php/$fieldvalue/$fromclause/$whereclause/ etc. then in reporting.php you'd do list($var1, $var2, $var3) = explode ('/', substr($PATH_INFO,1)) I dont know where that [/url] came from in my posted code. after $href_top_x it should have just had <?php </a>".'</td>'; ?> Well I cant figure out how to get it to post right and I cant find the posting guidelines that cover this. thats supposed to be < / a > ". '</td>' without all the spaces of course. So I'm trying to call the Allfields-50.php program from within my top-x.php program but the listed href keeps calling top-x.php instead of Allfields-50.php........which I find impossible....but its happening. Link to comment https://forums.phpfreaks.com/topic/56403-limitation-on-how-many-php-programs-can-be-called/#findComment-278667 Share on other sites More sharing options...
wts03202509 Posted June 20, 2007 Author Share Posted June 20, 2007 Ok, I figured out how to force it to work (still not a solution) and I'm not sure why I had to do this. just using href=\"myphp.php"/param\" was not working. It was putting the totally wrong program in the link. In fact it was putting the program of which this code is a part of in the link. I had to do the following to get it to work: href=\"http://localhost/blah/dev/myphp.php/$param\" in order for it to work. Any ideas on why I had to do this? All the programs are in the same directory and I have never had to do this until now. In fact the .php file that calls this one does not have to be listed that way. Of course this wont work as I cant go around chaning paths in my programs. Anybody have an idea whats going on? Link to comment https://forums.phpfreaks.com/topic/56403-limitation-on-how-many-php-programs-can-be-called/#findComment-278731 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.