Closed astaseen closed 9 years ago
Can you isolate the code where you having problem? Like put a test file in git and give filename here. No need to write code here.
If your issue is regarding php library of Cassandra then just call that function in php and echo its output. Then let me know what's going wrong.
If your issue is regarding Ajax them better post it on stackoverflow.com
Yeh,, Finally I got Problem. Thanks Abhishek Sir for to the point suggestion to run code in separate file. Actual problem when running using jquery is that it does not respond any messege regarding timeout execution. When running on separate file without jquery or ajax I got php execution timeout problem. As from local it take time to fetch data from casandra due to internet speed. I hope every where we use set_time_limit(0);
file inside report_hierarchy_header.php where fuction to call casandra function
get_all_vehicle_radio_details_search($account_id,'all') { code ... for($j=0;$j<$root->data->VehicleCnt;$j++) //using tree {
$vehicle_id = $root->data->VehicleID[$j]; $vehicle_name = $root->data->VehicleName[$j]; $vehicle_imei = $root->data->DeviceIMEINo[$j]; $logDate=date('Y-m-d');
$logResult=hasImeiLogged($o_cassandra, $vehicle_imei, $logDate); if ($logResult!="") { //code --- $vehicle_name_arr[$color][] =$vehicle_name; } else { //code-- $vehicle_name_arr[$color][] =$vehicle_name; } echo"x ".$vehicle_id." "; //for debug } echo"y "; //for debug //code --- common_display_vehicle_radio_details_search($vehicle_name_arr[$color],$vehicleid_or_imei_arr[$color],$color,'',$vehicle_transporter_arr,$vehicle_gps_vendor_arr,$factory_name_arr,$trip_status_arr); //code --- }
Calling from page manage_add_trip.php
include_once("../../../phpApi/Cassandra/Cassandra.php");
include_once("../../../phpApi/libLog.php");
$o_cassandra = new Cassandra(); $o_cassandra->connect($s_server_host, $s_server_username, $s_server_password, $s_server_keyspace, $i_server_port);
global $o_cassandra; echo'
'; $o_cassandra->close();
output: (debug) x 6463 x 6464 x 6465 x 6782 x 6793 x 6794 x 6795 x 6796 x 6797 x 6798 x 6799 x 6800 x 6801 x 6802 x 6803 x 6804 x 6805 x 6806 x 6807 x 6808 x 6809 x 6810 x 6811 x 6812 x 6813 x 6814 x 6815 x 6816 x 6817 x 6818 x 6819 x 6821 x 6823 x 6826 x 6827 x 6828 x 6829 x 6830 x 6831 x 6832 x 6833 x 6834 x 6835 x 6836 x 6837 x 6838 x 6839 x 6840 x 6841 x 6842 x 6843 x 6844 x 6845 x 6846 x 6847 x 6848 x 6849 x 6850 x 6851 x 6852 x 6853 x 6854 x 6855 x 6856 x 6857 x 6858 x 6859 x 6860 x 6861 x 6862 x 6863 x 6864 x 6865 x 6866 x 6867 x 6868 x 6869 x 6870 x 6871 x 6872 x 6873 x 6874 x 6875 x 6876 x 6877 x 6878 x 6879 x 6880 x 6881 x 6882 x 6883 x 6884 x 6885 x 6886
Trouble: echo"y " not printed from report_hierarchy_header.php. and not further function is called.
if we commented we process all records $logResult=hasImeiLogged($o_cassandra, $vehicle_imei, $logDate);
x 6463 x 6464 x 6465 x 6782 x 6793 x 6794 x 6795 x 6796 x 6797 x 6798 x 6799 x 6800 x 6801 x 6802 x 6803 x 6804 x 6805 x 6806 x 6807 x 6808 x 6809 x 6810 x 6811 x 6812 x 6813 x 6814 x 6815 x 6816 x 6817 x 6818 x 6819 x 6821 x 6823 x 6826 x 6827 x 6828 x 6829 x 6830 x 6831 x 6832 x 6833 x 6834 x 6835 x 6836 x 6837 x 6838 x 6839 x 6840 x 6841 x 6842 x 6843 x 6844 x 6845 x 6846 x 6847 x 6848 x 6849 x 6850 x 6851 x 6852 x 6853 x 6854 x 6855 x 6856 x 6857 x 6858 x 6859 x 6860 x 6861 x 6862 x 6863 x 6864 x 6865 x 6866 x 6867 x 6868 x 6869 x 6870 x 6871 x 6872 x 6873 x 6874 x 6875 x 6876 x 6877 x 6878 x 6879 x 6880 x 6881 x 6882 x 6883 x 6884 x 6885 x 6886 x 6887 x 6888 x 6889 x 6890 x 6891 x 6892 x 6893 x 6894 x 6895 x 6896 x 6897 x 6898 x 6899 x 6900 x 6901 x 6902 x 6903 x 6904 x 6905 x 6906 x 6907 x 6908 x 6909 x 6910 x 6911 x 6912 x 6913 x 6914 x 6915 x 6916 x 6917 x 6918 x 6919 x 6920 x 6921 x 6922 x 6923 x 6923 x 6924 x 6925 x 6926 x 6927 x 6928 x 6929 x 6930 x 6931 x 6932 x 6946 x 7239 x 7240 x 7241 x 7242 x 7243 x 7244 x 7245 x 7246 x 7247 x 7248 x 7249 x 7250 x 7251 x 7252 x 7253 x 7254 x 7255 x 7256 x 7257 x 7258 x 7259 x 7260 x 7261 x 7262 x 7263 x 7264 x 7265 x 7266 x 7267 x 7268 x 7269 x 7270 x 7271 x 7272 x 7273 x 7282 x 7299 x 7300 x 7301 x 7302 x 7305 x 7306 x 7307 x 7308 x 7309 x 7310 x 7311 x 7312 x 7313 x 7314 x 7315 x 7316 x 7317 x 7318 x 7319 x 7320 x 7321 x 7322 x 7323 x 7324 x 7325 x 7326 x 7327 x 7328 x 7329 x 7330 x 7331 x 7332 x 7333 x 7334 x 7335 x 7336 x 7337 x 7338 x 7339 x 7340 x 7341 x 7342 x 7343 x 7344 x 7345 x 7346 x 7347 x 7348 x 7349 x 7350 x 7351 x 7352 x 7353 x 7354 x 7355 x 7356 x 7357 x 7358 x 7359 x 7360 x 7361 x 7362 x 7363 x 7364 x 7365 x 7366 x 7367 x 7368 x 7369 x 7370 x 7371 x 7372 x 7373 x 7374 x 7375 x 7376 x 7377 x 7378 x 7379 x 7380 x 7381 x 7382 x 7383 x 7384 x 7385 x 7386 x 7387 x 7388 x 7389 x 7390 x 7391 x 7392 x 7393 x 7394 x 7395 x 7396 x 7397 x 7398 x 7399 x 7400 x 7401 x 7402 x 7403 x 7404 x 7405 x 7406 x 7407 x 7408 x 7409 x 7410 x 7411 x 7412 x 7413 x 7414 x 7415 x 7416 x 7417 x 7418 x 7419 x 7420 x 7421 x 7422 x 7423 x 7424 x 7425 x 7426 x 7427 x 7428 x 7429 x 7430 x 7431 x 7432 x 7433 x 7434 x 7435 x 7436 x 7437 x 7438 x 7439 x 7440 x 7441 x 7442 x 7443 x 7444 x 7445 x 7446 x 7447 x 7448 x 7618 x 7619 x 7620 x 7621 y